|
good idea
Our team goes back an forth about whether on not this is a good idea. We debate it over and over.
If you decide to do this, I think you have done a pretty good job. One thing I may suggest is that when you wake up (at the initialization of the code) you can check the state of some buttons (dedicate a button or pick an unusual combination of buttons that are unlike to be pressed upon reset) and then only recalibrate if these bottons are pressed.
You don't have to have a live recalibrate button if you only check this at the initialization of the code. If you wake up and your robot is insane because of a bad calibration (perhap you had a zero calibrated from an old joystick an you just put in a new joystick with a different zero point), you can just press robot reset on the operator interface along with the other buttons for recalibrate and viola! you're back in business.
Just a consideration.
FYI, we always come to the conclusion that it is better to leave the code alone and set the joysticks to proper trim value. Two reasons drive this. #1 we are already code hungry fools, giving us less to have to do every loop may be the difference between missing 2 data packets and missing only 1 -- this is a worth goal. #2 we are always worried about having to replace stuff that breaks. We have had balls come over the wall an break oe of our joysticks off. We always prefer to be able just plug in a new joystick and run with it without having to recalibrate.
Just my 2 cents.
Joe J.
|