BjarneBitscrambler / SignalK-Orientation

Provides Vessel Attitude, eCompass, Orientation, etc using SensESP, Signal K, and a 9DoF sensor.
BSD 3-Clause "New" or "Revised" License
7 stars 8 forks source link

Web interface changes to reporting interval have no effect #1

Closed BjarneBitscrambler closed 3 years ago

BjarneBitscrambler commented 3 years ago

Noticed on ESP8266 that changing the reporting interval for the Attitude parameter did not seem to change the actual interval, even after rebooting. It stayed at the compiled-in rate. Compass heading however, did seem to change.

BjarneBitscrambler commented 3 years ago

Found that changes made in the web interface were not being written to non-volatile memory, as demonstrated by looking at the serial debug messages during booting of the ESP.

The reason is that there is a 32-character limit on the length of the configuration path that is defined in main.cpp and used when instantiating each sensor. This config path is used when writing config values to EEPROM, and if the given path is too long then the write attempt in Configurable::save_configuration() of configurable.cpp will fail.

Solution is to ensure the supplied paths are shorter than 32 characters in length.