Skip to content

Commit

Permalink
Update Buttons.ino
Browse files Browse the repository at this point in the history
  • Loading branch information
Timur-Khabibulin authored Mar 25, 2022
1 parent 0b01d1e commit b0933d7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions IntervalometerForCamera/Buttons.ino
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ void valueDown() {
if (pos[2] == true && camSettings.frame_rate != 0) camSettings.frame_rate--;
if (pos[3] == true) {
if (modes.pos == modes.MANUAL_SHUTTER_SPEED && SSCounter != 0)SSCounter--;
if (modes.pos == modes.BULB_SHUTTER_SPEED && camSettings.BulbShutterSpeed != 0) camSettings.BulbShutterSpeed--;
if (modes.pos == modes.BULB_SHUTTER_SPEED && camSettings.BulbShutterSpeed > 1) camSettings.BulbShutterSpeed--;
}
if (pos[4] == true && modes.pos == modes.BULB_SHUTTER_SPEED) camSettings.longExpNR = !camSettings.longExpNR;
if (pos[5] == true) camSettings.AFControl = !camSettings.AFControl;
Expand All @@ -59,15 +59,9 @@ void longPressright() {
}
void longPressOK() {
if (!start) {
if (modes.pos == modes.AUTO_SHUTTER_SPEED) {
if (camSettings.interval > 0 && camSettings.frame_rate > 0) start = true;
} else {
if ((camSettings.interval * 1000) > camSettings.shutter_speed && camSettings.frame_rate > 0 && camSettings.shutter_speed > 0 && camSettings.longExpNR == false) start = true;
if ((camSettings.interval * 1000) > (camSettings.shutter_speed * 2) && camSettings.frame_rate > 0 && camSettings.shutter_speed > 0 && camSettings.longExpNR == true) start = true;
}
if (camSettings.interval > 0 && camSettings.frame_rate > 0) start = true;
} else {
start = false;
lr_button = 0;
}
draw();
}

0 comments on commit b0933d7

Please sign in to comment.