From ebc4bcf1ff125ad3c2e66ffcce0b76d7d8012dd7 Mon Sep 17 00:00:00 2001 From: morefigs Date: Tue, 7 Nov 2023 01:31:45 +1100 Subject: [PATCH] chore(arduino-modules): Fix mixed whitespace by removing random tab chars (#448) Fixes mixed whitespace in the eepromWriter script. --- arduino-modules/eepromWriter/eepromWriter.ino | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/arduino-modules/eepromWriter/eepromWriter.ino b/arduino-modules/eepromWriter/eepromWriter.ino index 0f58c8483..0cbf75874 100644 --- a/arduino-modules/eepromWriter/eepromWriter.ino +++ b/arduino-modules/eepromWriter/eepromWriter.ino @@ -26,42 +26,42 @@ void clear_port() { } void setup() { - Serial.begin(115200); + Serial.begin(115200); Serial.setTimeout(30); clear_port(); } void loop() { - if (Serial.available() > 0) { + if (Serial.available() > 0) { serial = ""; model = ""; - reading_in_serial = true; - char val; - while (Serial.available() > 0) { + reading_in_serial = true; + char val; + while (Serial.available() > 0) { delay(2); - val = Serial.read(); + val = Serial.read(); if (val == '&') { print_data(); clear_port(); return; } - else if (val == ':'){ - reading_in_serial = false; - } - else if (val == '\r' || val == '\n') { - // ignore newline and return characters - } - else if (reading_in_serial) { - serial += val; - } - else { - model += val; - } - } + else if (val == ':') { + reading_in_serial = false; + } + else if (val == '\r' || val == '\n') { + // ignore newline and return characters + } + else if (reading_in_serial) { + serial += val; + } + else { + model += val; + } + } if (serial.length() && model.length()) { - memory.write_serial(serial); - memory.write_model(model); + memory.write_serial(serial); + memory.write_model(model); } Serial.println(); // acknowledgement - } + } }