neu-rah / ArduinoMenu

Arduino generic menu/interactivity system
GNU Lesser General Public License v2.1
931 stars 189 forks source link

Max EDIT field size limit? #378

Open melkati opened 2 years ago

melkati commented 2 years ago

Hi.

Is there a maximum size limit for the buffer in an EDIT field?

I have a working menu with 30 byte buffer sizes and I need to make it bigger for a WiFi configuration (32 bytes for SSID and 67 bytes for password).

I modified the buffer sizes to accommodate SSID and PASSWORD but looks like I'm unable to input more than 31 bytes in the menu field.

This is how I'm doing it:

Buffer definition:

char tempWiFiSSID[] = "                                ";
char tempWiFiPasswrd[] = "                                                                   ";

Menu definition:

MENU(wifiConfigMenu, "WIFI Config", doNothing, noEvent, wrapStyle
  ,SUBMENU(activeWIFIMenu)
  ,EDIT("SSID", tempWiFiSSID, ssidChars, doSetWiFiSSID, exitEvent, wrapStyle)
  ,EDIT("Pass:", tempWiFiPasswrd, allChars, doSetWiFiPasswrd, exitEvent, wrapStyle)
  ,EDIT("Host:", tempHostName, allChars, doSetHostName, exitEvent, wrapStyle)
  ,EXIT("<Back"));

Full source code is published here: https://github.com/melkati/CO2-Gadget/blob/fix-wifi-ssid-password-lengths/CO2_Gadget_Menu.h