Skip to content

Commit 8952644

Browse files
committed
Fix echo and verbose bug in issue #224.
1 parent 499470b commit 8952644

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

firmware/OpenLog_Firmware/OpenLog/OpenLog.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,8 @@ void readSystemSettings(void)
699699
//Read whether we should use verbose responses or not
700700
//Default is true
701701
setting_verbose = EEPROM.read(LOCATION_VERBOSE);
702-
if (setting_verbose != ON && setting_verbose != OFF)
702+
//if (setting_verbose != ON && setting_verbose != OFF)
703+
if (setting_verbose > 1) //0 or 1 are the only valid options
703704
{
704705
setting_verbose = ON; //Reset verbose to true
705706
EEPROM.write(LOCATION_VERBOSE, setting_verbose);
@@ -708,7 +709,8 @@ void readSystemSettings(void)
708709
//Read whether we should echo characters or not
709710
//Default is true
710711
setting_echo = EEPROM.read(LOCATION_ECHO);
711-
if (setting_echo != ON || setting_echo != OFF)
712+
//if (setting_echo != ON || setting_echo != OFF)
713+
if (setting_echo > 1) //0 or 1 are the only valid options
712714
{
713715
setting_echo = ON; //Reset to echo on
714716
EEPROM.write(LOCATION_ECHO, setting_echo);
@@ -2288,4 +2290,3 @@ void toggleLED(byte pinNumber)
22882290
if (digitalRead(pinNumber)) digitalWrite(pinNumber, LOW);
22892291
else digitalWrite(pinNumber, HIGH);
22902292
}
2291-

0 commit comments

Comments
 (0)