diff options
author | sanni <[email protected]> | 2024-07-13 10:46:59 +0200 |
---|---|---|
committer | sanni <[email protected]> | 2024-07-13 10:46:59 +0200 |
commit | 8d99ac572ff43615bdb8f294e74113f94a3d343c (patch) | |
tree | acf503cb5b9baa57d57896555882cc756566abde /Cart_Reader/Cart_Reader.ino | |
parent | 8323aaeca91beaf0b618e0b114b6f2934ab64c25 (diff) | |
download | cartreader-8d99ac572ff43615bdb8f294e74113f94a3d343c.tar.gz cartreader-8d99ac572ff43615bdb8f294e74113f94a3d343c.zip |
Fix Serial Monitor errors/warnings
Diffstat (limited to 'Cart_Reader/Cart_Reader.ino')
-rw-r--r-- | Cart_Reader/Cart_Reader.ino | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index c0c62f9..a672655 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -830,7 +830,7 @@ boolean checkCartSelection(FsFile& database, void (*readData)(FsFile&, void*), v print_STR(press_to_select_STR, 1);
#elif defined(SERIAL_MONITOR)
println_Msg(F("U/D to Change"));
- println_Msg(F("Space to Select"));
+ println_Msg(F("Space/Zero to Select"));
#endif
display_Update();
@@ -905,7 +905,7 @@ void printInstructions() { print_STR(press_to_select_STR, 1);
# elif defined(SERIAL_MONITOR)
println_Msg(F("U/D to Change"));
- println_Msg(F("Space to Select"));
+ println_Msg(F("Space/Zero to Select"));
# endif /* ENABLE_OLED | ENABLE_LCD | SERIAL_MONITOR */
display_Update();
@@ -980,6 +980,15 @@ int navigateMenu(int min, int max, void (*printSelection)(int)) { }
}
}
+#elif defined(SERIAL_MONITOR)
+int navigateMenu(__attribute__((unused)) int min,__attribute__((unused)) int max, void (*printSelection)(int)) {
+ printSelection(0);
+ Serial.println(F("Enter number to change:_"));
+ while (Serial.available() == 0) {}
+ int selectedNumber = Serial.parseInt();
+ delay(200);
+ return selectedNumber;
+}
# endif /* (ENABLE_OLED | ENABLE_LCD) */
# endif /* ENABLE_<CORES> */
@@ -2844,18 +2853,24 @@ void blinkLED() { #if defined(ENABLE_VSELECT)
// Nothing
#elif defined(HW5)
+ // 3mm LED on D38, front of PCB
PORTD ^= (1 << 7);
#elif defined(ENABLE_OLED)
+ // 5mm LED on D10, above SD slot
PORTB ^= (1 << 4);
-#elif defined(ENABLE_LCD)
+#elif defined(ENABLE_LCD) // HW4
+ // TX LED on D1, build-in
PORTE ^= (1 << 1);
#elif defined(ENABLE_SERIAL)
- PORTB ^= (1 << 4);
+ // 5mm LED on D10, above SD slot (HW3)
+ PORTB ^= (1 << 4); //HW4/HW5 LCD RST connects there now too
+ // 3mm LED on D38, front of PCB (HW5)
PORTB ^= (1 << 7);
#endif
}
#if defined(HW5) && !defined(ENABLE_VSELECT)
+// 3mm LED on D38, front of PCB
void statusLED(boolean on) {
if (!on)
PORTD |= (1 << 7);
@@ -3159,7 +3174,7 @@ uint8_t checkButton() { }
//Selection
- else if (incomingByte == 240) {
+ else if ((incomingByte == 240) || (incomingByte == -16) || (incomingByte == 0)) {
return 3;
}
|