canon_ble #82

Merged
mattmcw merged 149 commits from canon_ble into main 2023-08-01 03:38:52 +00:00
1 changed files with 7 additions and 1 deletions
Showing only changes of commit 144b408092 - Show all commits

View File

@ -48,6 +48,8 @@ void cmd (char val) {
setDir(false);
} else if (val == mc.CAMERA) {
cam();
} else if (val == mc.STATE) {
state();
}
}
@ -72,12 +74,16 @@ void cam () {
mc.log("cam() -> backward");
}
mc.confirm(mc.CAMERA);
timeFrame(startTime);
mc.log(String(cameraFrame));
}
void timeFrame (long startTime) {
if (cameraFrame == -1) {
cameraFrame = millis() - startTime;
} else {
cameraFrame = round((cameraFrame + (millis() - startTime)) / 2);
}
mc.log(String(cameraFrame));
}
void state () {