Quote:
|
Originally Posted by devicenull
Not quite.. that code requires a very fast trigger finger..
Basically:
Code:
char oldstate;
if (p1_sw_top && !oldstate) {
relay1_fwd = !relay1_fwd;
relay1_rev = !relay1_rev;
}
if (p1_sw_top != oldstate) oldstate = p1_sw_top;
Should work. It requires you to release the button and press it again to re-activate the change.
|
Would you put the toggle switch code after the initialization of the default relay switches? If not where? Would you want to comment out the default relay switch setup?
I am editing the default camera files for the toggle switch. I think it is possible that the camera files won't let the toggle switch work (until I change something at least) because it won't printfs won't print (the camera ones do though)