Fix bug with reporting set camera direction backwards as set camera forwards

This commit is contained in:
Matt McWilliams 2025-11-30 11:08:19 -08:00
parent 28e6dfe959
commit a5f3691177
2 changed files with 12 additions and 4 deletions

View File

@ -1,6 +1,9 @@
#include "Intval2.h"
/**
*
**/
void Intval2::begin () {
PinsInit();
@ -321,6 +324,8 @@ void Intval2::Indicator (boolean state) {
}
}
String Intval2::State () {
if (timed_exposure) {
return String(timed_exposure_avg);

View File

@ -5,9 +5,10 @@ McopySerial mc;
Intval2 intval2;
volatile char cmd_char = 'z';
volatile boolean camera_running;
volatile boolean open_running;
volatile boolean close_running;
volatile boolean camera_running = false;
volatile boolean open_running = false;
volatile boolean close_running = false;
volatile boolean debug = false;
String timed_exposure_str = "0";
volatile unsigned long timed_exposure_ms = 0;
@ -62,6 +63,8 @@ void cmd (char val) {
SetExposure();
} else if (val == mc.STATE) {
State();
} else if (val == mc.DEBUG) {
debug = !debug;
}
}
@ -79,7 +82,7 @@ void SetDirection (boolean state) {
mc.confirm(mc.CAMERA_FORWARD);
mc.log("camera_direction(true)");
} else {
mc.confirm(mc.CAMERA_FORWARD);
mc.confirm(mc.CAMERA_BACKWARD);
mc.log("camera_direction(false)");
}
}