From 1383aa9592dd6f89ce3abdbe2d17de540d76366e Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 14 Dec 2022 09:47:27 -0500 Subject: [PATCH] take_photo variable --- .../esp32-cam-send-jpeg-serial.ino | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cubesatsim/esp32-cam-send-jpeg-serial/esp32-cam-send-jpeg-serial.ino b/cubesatsim/esp32-cam-send-jpeg-serial/esp32-cam-send-jpeg-serial.ino index b659373e..e8816b75 100644 --- a/cubesatsim/esp32-cam-send-jpeg-serial/esp32-cam-send-jpeg-serial.ino +++ b/cubesatsim/esp32-cam-send-jpeg-serial/esp32-cam-send-jpeg-serial.ino @@ -212,17 +212,17 @@ void setup() { void loop() { bool timeout = false; - bool continue = false; + bool take_photo = false; unsigned long timer_ms = millis(); while ((Serial.available() < 0) || !timeout) { - if ((millis() - timer_ms) > 10000) timeout = true; + if ((millis() - timer_ms) > 10000) timeout = true; // poll serial for 10 seconds } if (Serial.available() > 0) { char result = Serial.read(); if ((result == 'f') || (result == 'F')) PIFFS.format(); - continue = true; + take_photo = true; } - if (!continue) { + if (!take_photo) { esp_sleep_enable_timer_wakeup(5 * 1000000); // sleep for 10 seconds