ArduinoMenu icon indicating copy to clipboard operation
ArduinoMenu copied to clipboard

Max EDIT field size limit?

Open melkati opened this issue 4 years ago • 0 comments

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

melkati avatar Jan 31 '22 21:01 melkati