Added arbitrary exposure via buttons

This commit is contained in:
Matt 2016-07-05 09:45:25 -04:00
parent ee0555cd5d
commit 00df49a7c8
1 changed files with 9 additions and 8 deletions

View File

@ -241,14 +241,14 @@ void button_end (int index, long buttontime) {
Output(2, 250);
}
} else if (index == 2) { // set speed
if (buttontime <= 1000) {
fwd_speed = FAST_PWM;
bwd_speed = FAST_PWM;
Output(1, 500);
} else if (buttontime > 1000) {
fwd_speed = SLOW_PWM;
bwd_speed = SLOW_PWM;
if (buttontime >= 1000) {
timed_delay = buttontime - BOLEX_C;
timed = true;
Output(2, 250);
} else if (buttontime < 1000) {
timed_delay = 0;
timed = false;
Output(1, 500);
}
} else if (index == 3) { //set delay
if (buttontime < 42) {
@ -401,3 +401,4 @@ void log (String msg) {
Serial.println(msg);
}
}