diff options
author | PsyK0p4T <[email protected]> | 2023-09-25 16:12:04 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2023-09-25 16:12:04 +0200 |
commit | b2415c0287d71cb64954c3cf7e28a72703a7197b (patch) | |
tree | ab6132598e8c456bbda4a55b9aaf0663891416df | |
parent | 603a22116c8d470bb865b34b4f9d55f10e32b775 (diff) | |
download | cartreader-b2415c0287d71cb64954c3cf7e28a72703a7197b.tar.gz cartreader-b2415c0287d71cb64954c3cf7e28a72703a7197b.zip |
Update Cart_Reader.ino
Add the possibility to hide Self Test from menu
-rw-r--r-- | Cart_Reader/Cart_Reader.ino | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Cart_Reader/Cart_Reader.ino b/Cart_Reader/Cart_Reader.ino index 112dab5..af1f3bb 100644 --- a/Cart_Reader/Cart_Reader.ino +++ b/Cart_Reader/Cart_Reader.ino @@ -905,7 +905,9 @@ static const char modeItem26[] PROGMEM = "Vectrex"; #ifdef enable_FLASH
static const char modeItem27[] PROGMEM = "Flashrom Programmer";
#endif
+#ifdef enable_selftest
static const char modeItem28[] PROGMEM = "Self Test (3V)";
+#endif
static const char modeItem29[] PROGMEM = "About";
//static const char modeItem30[] PROGMEM = "Reset"; (stored in common strings array)
static const char* const modeOptions[] PROGMEM = {
@@ -990,12 +992,15 @@ static const char* const modeOptions[] PROGMEM = { #ifdef enable_FLASH
modeItem27,
#endif
- modeItem28, modeItem29, string_reset2
+#ifdef enable_selftest
+ modeItem28
+#endif
+ modeItem29, string_reset2
};
// Count menu entries
byte countMenuEntries() {
- byte count = 3;
+ byte count = 2;
#ifdef enable_GBX
count++;
#endif
@@ -1077,6 +1082,9 @@ byte countMenuEntries() { #ifdef enable_FLASH
count++;
#endif
+#ifdef enable_selftest
+ count++;
+#endif
return count;
}
@@ -1220,9 +1228,10 @@ unsigned char fixMenuOrder(unsigned char modeMenu) { currentEntry++;
#endif
- // Self Test
+#if defined(enable_selftest)
translationMatrix[currentEntry] = 27;
currentEntry++;
+#endif
// About
translationMatrix[currentEntry] = 28;
|