Skip to content

Commit ccd148f

Browse files
committed
Alow user to open menuMain on startup to disable resetOnZeroDeviceCount
1 parent 99d89dc commit ccd148f

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

Firmware/OpenLog_Artemis/OpenLog_Artemis.ino

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -379,12 +379,18 @@ void setup() {
379379
beginQwiicDevices(); //Begin() each device in the node list
380380
loadDeviceSettingsFromFile(); //Load config settings into node list
381381
configureQwiicDevices(); //Apply config settings to each device in the node list
382-
int deviceCount = printOnlineDevice();
383-
if ((deviceCount == 0) && (settings.resetOnZeroDeviceCount == true))
382+
int deviceCount = printOnlineDevice(); // Pretty-print the online devices
383+
384+
if ((deviceCount == 0) && (settings.resetOnZeroDeviceCount == true)) // Check for resetOnZeroDeviceCount
384385
{
385-
SerialPrintln(F("*** Zero Qwiic Devices Found! Resetting... ***"));
386-
SerialFlush();
387-
resetArtemis(); //Thank you and goodnight...
386+
if ((Serial.available()) || ((settings.useTxRxPinsForTerminal == true) && (SerialLog.available())))
387+
menuMain(); //Present user menu - in case the user wants to disable resetOnZeroDeviceCount
388+
else
389+
{
390+
SerialPrintln(F("*** Zero Qwiic Devices Found! Resetting... ***"));
391+
SerialFlush();
392+
resetArtemis(); //Thank you and goodnight...
393+
}
388394
}
389395
}
390396
else

0 commit comments

Comments
 (0)