khoih-prog / ESPAsync_WiFiManager

This is an ESP32 (including ESP32-S2 and ESP32-C3) / ESP8266 WiFi Connection Manager, using ESPAsyncWebServer, with fallback web configuration portal. Use this library for configuring ESP32, ESP8266 modules' WiFi, etc. Credentials at runtime. You can also specify static DNS servers, personalized HostName, fixed or random AP WiFi channel. With examples supporting ArduinoJson 6.0.0+ as well as 5.13.5- . Using AsyncDNSServer instead of DNSServer now.
MIT License
291 stars 73 forks source link

Exception 9: LoadStoreAlignmentCause: Load or store to an unaligned address #31

Closed balucio closed 3 years ago

balucio commented 3 years ago

Hi, I'm trying to use this useful library with "Dynamic Params". I defined the struct as reported at end, but when I try to Serial print the value value of SENSOR_TYPE (Serial.print("TIPO SENSORE ");Serial.println(SENSOR_TYPE);) I get the exception as in subject. Can you help me? Thank you.

#define INFLUXDB_URL_LEN 251
char INFLUXDB_URL[INFLUXDB_URL_LEN + 1] = "http://influx.sapacasa.it:8086";

#define INFLUXDB_NAME_LEN 31
char INFLUXDB_NAME[INFLUXDB_NAME_LEN + 1] = "domus";

#define INFLUXDB_USER_LEN 31
char INFLUXDB_USER[INFLUXDB_USER_LEN + 1] = "usor";

#define INFLUXDB_PASS_LEN 31
char INFLUXDB_PASS[INFLUXDB_PASS_LEN + 1] = "usor";

#define SENSOR_NAME_LEN 31
char SENSOR_NAME[SENSOR_NAME_LEN + 1] = "SonOff";

#define SENSOR_TYPE_LEN 11
char SENSOR_TYPE[SENSOR_TYPE_LEN + 1] = "UNKNOW";

#define SENSOR_LOCATION_LEN 31
char SENSOR_LOCATION[SENSOR_LOCATION_LEN + 1] = "stanza letto";

#define SENSOR_BOOT_STATE_LEN 12
char SENSOR_BOOT_STATE[SENSOR_BOOT_STATE_LEN + 1]   = "ultimo";

MenuItem myMenuItems [] = {
  { "ixul", "Url InfluxDb",      INFLUXDB_URL,  INFLUXDB_URL_LEN  },
  { "ixdb", "Schema Influx",     INFLUXDB_NAME, INFLUXDB_NAME_LEN },
  { "ixun", "Utente Influx",     INFLUXDB_USER, INFLUXDB_USER_LEN },
  { "ixup", "Password Influx",   INFLUXDB_PASS, INFLUXDB_PASS_LEN },
  { "snnm", "Nome Sensore",      SENSOR_NAME,   SENSOR_NAME_LEN },
  { "sndv", "Tipo Sensore",      SENSOR_TYPE,   SENSOR_TYPE_LEN },
  { "ubic", "Ubicazione",        SENSOR_LOCATION, SENSOR_LOCATION_LEN },
  { "bste", "Stato iniziale",    SENSOR_BOOT_STATE, SENSOR_BOOT_STATE_LEN },
};

uint16_t NUM_MENU_ITEMS = sizeof(myMenuItems) / sizeof(MenuItem);  //MenuItemSize;