Skip to content

Commit

Permalink
Update Cart_Reader.ino
Browse files Browse the repository at this point in the history
Add the possibility to hide Self Test from menu
  • Loading branch information
PsyK0p4T authored Sep 25, 2023
1 parent 603a221 commit b2415c0
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions Cart_Reader/Cart_Reader.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1076,6 +1081,9 @@ byte countMenuEntries() {
#endif
#ifdef enable_FLASH
count++;
#endif
#ifdef enable_selftest
count++;
#endif
return count;
}
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b2415c0

Please sign in to comment.