MENWIZ: yet another character lcd menu wizard library

OK, now I seem to be having a problem with the EEPROM saving but first, a tidied up custom key function, in case you want to include it in docs:-

// function to wrap keypad presses and return values to menu as custom keys input
// this uses the logical direction keys and the * and # keys (on a normal 4x4 keypad).
//      2
//   4    6
//      8
//   *    #
int menuKeys()
{
  char keyPressed = keypad1.getKey(); // read the keypad to see if a key has been pressed
  
  switch (keyPressed)
  {
    case NO_KEY:
      return MW_BTNULL; // no key pressed
    case '2':
      return MW_BTU; // key 2 pressed for direction UP
    case '8':
      return MW_BTD; // key 8 pressed for direction DOWN
    case '4':
      return MW_BTL; // key 4 pressed for direction LEFT
    case '6':
      return MW_BTR; // key 6 pressed for direction RIGHT
    case '*':
      return MW_BTE; // key * pressed for ESCAPE
    case '#':
      return MW_BTC; // key # pressed for CONFI|RM
  }

Right, with that out of the way, I am adding the readEeprom() and writeEeprom() methods in my sketch as below:-

void setup(){
  _menu *r,*s1,*s2,*s3; // menu structure, root plus each submenu
  
  keypad1.begin(); // start Keypad number 1

  Serial.begin(115200);
  
  menu.begin(&lcd1,16,2); //declare lcd1 object and screen size to menwiz lib
  
  [b]menu.readEeprom();[/b] // read any stored values in the EEPROM
  
  menu.setBehaviour(MW_MENU_INDEX,false); // turn off the menu index - 1/3 etc

  r=menu.addMenu(MW_ROOT,NULL,F("MAIN MENU"));
 
    s1=menu.addMenu(MW_SUBMENU,r, F("General"));
      s2=menu.addMenu(MW_SUBMENU,s1, F("Game Setup"));
        s3=menu.addMenu(MW_VAR,s2, F("Game Time (m)"));  
          s3->addVar(MW_AUTO_INT,&GAMETIME,0,5999,1);
        s3=menu.addMenu(MW_VAR,s2, F("Pts Period (s)"));
          s3->addVar(MW_AUTO_INT,&POINTPERIOD,0,3600,1);
        s3=menu.addMenu(MW_VAR,s2, F("Red Points"));
          s3->addVar(MW_AUTO_INT,&POINTSPERPERIODRED,0,1000,5);
        s3=menu.addMenu(MW_VAR,s2, F("Blue Points"));
          s3->addVar(MW_AUTO_INT,&POINTSPERPERIODBLUE,0,1000,5); // min, max, increment
        s3=menu.addMenu(MW_VAR,s2, F("Reset Period"));  
          s3->addVar(MW_LIST,&RESETSCOREPERIOD);
          s3->addItem(MW_LIST, F("No")); // returns index 0
          s3->addItem(MW_LIST, F("Yes")); // returns index 1
        s3=menu.addMenu(MW_VAR,s2, F("Countdown (s)"));
          s3->addVar(MW_AUTO_INT,&COUNTDOWNTIMER,0,30,1);
      //s2=menu.addMenu(MW_SUBMENU,s1, F("Device Setup"));
        //s3=menu.addMenu(MW_VAR,s2, F("Splash Screen"));  
          //s3->addVar(MW_LIST,&SPLASHSCREEN);
          //s3->addItem(MW_LIST, F("Off")); // returns index 0
          //s3->addItem(MW_LIST, F("On")); // returns index 1

    s1=menu.addMenu(MW_SUBMENU,r, F("Advanced"));
        s2=menu.addMenu(MW_VAR,s1, F("Wireless"));  
          s2->addVar(MW_LIST,&WIRELESS);
          s2->addItem(MW_LIST, F("Off")); // returns index 0
          s2->addItem(MW_LIST, F("On")); // returns index 1 
        s2=menu.addMenu(MW_SUBMENU,s1, F("LED Control"));
          s3=menu.addMenu(MW_VAR,s2, F("LED Flashing"));  
            s3->addVar(MW_LIST,&LEDBLINK);
            s3->addItem(MW_LIST, F("Off")); // returns index 0
            s3->addItem(MW_LIST, F("On")); // returns index 1
          s3=menu.addMenu(MW_VAR,s2, F("On Time (ms)"));  
            s3->addVar(MW_AUTO_INT,&LEDBLINKON,0,1000,100);
          s3=menu.addMenu(MW_VAR,s2, F("Off Time (ms)"));  
            s3->addVar(MW_AUTO_INT,&LEDBLINKOFF,0,1000,100);
         s2=menu.addMenu(MW_VAR,s1, F("Cursor Flash"));  
           s2->addVar(MW_AUTO_INT,&CURSORBLINKRATE,0,1000,100);
 
    s1=menu.addMenu(MW_SUBMENU,r, F("Developer"));
      s2=menu.addMenu(MW_VAR,s1, F("Serial Debug"));  
        s2->addVar(MW_LIST,&DEBUG);
        s2->addItem(MW_LIST, F("Off")); // returns index 0
        s2->addItem(MW_LIST, F("On")); // returns index 1 

    s1=menu.addMenu(MW_VAR,r, F("SAVE & EXIT"));
      s1->addVar(MW_ACTION,saveSettings);
      //s1->setBehaviour(MW_ACTION_CONFIRM,false); // turn confirmation off

    s1=menu.addMenu(MW_VAR,r, F("EXIT NO SAVE"));
      s1->addVar(MW_ACTION,exitMenu);
      //s1->setBehaviour(MW_ACTION_CONFIRM,false); // turn confirmation off

    //menu.navButtons(UP_BOTTON_PIN,DOWN_BOTTON_PIN,LEFT_BOTTON_PIN,RIGHT_BOTTON_PIN,ESCAPE_BOTTON_PIN,CONFIRM_BOTTON_PIN);
    menu.addUsrNav(menuKeys,6);
      
    Serial.println(menu.freeRam());
  }

The menu now only displays when I want it to, using a displayMenu variable, where 0 = no menu, 1 = display menu.

In the main project this variable will be activated by simultaneously pressing a certain key at the time the device is turned on, a bit like entering the BIOS on a PC.

void loop()
{
  while (displayMenu == 1)
  {
    menu.draw();
  }
 
  lcd1.clear();
  lcd1.setCursor(0,0);
  lcd1.print(F("  Menu  Exited  "));
  lcd1.setCursor(0,1);
  lcd1.print(F("  Game  Starts  "));
  
  while (displayMenu != 1); // do nothing forever, after doing a single print to the LCD; halt changes for test purposes
}

My 'SAVE & EXIT' Option should write the values to Eeprom and then change the value of global displayMenu to 0 so the menu no longer displays and the game starts.

 void saveSettings()
 {
   menu.writeEeprom(); // save the settings to EEPROM
   Serial.println(F("Settings Saved To EEPROM"));
   displayMenu = 0; // set menu to off so it is no longer active and the rest of the sketch continues
 }

When I change a setting and select 'EXIT & SAVE', I then reset the MCU and go back in and the value is back to the originally declared value at the beginning of the sketch. Surely the menu.readEeprom() should update these from stored values?

The most obvious question is; do I have this readEeprom() in the correct place, or does it need to be closer to the beginning of the sketch? I've placed it after the menu class is initialised.