SHA2017-badge / micropython-esp32

MicroPython ported to the SHA2017 badge
https://micropython.org/
MIT License
12 stars 16 forks source link

Some NVS settings are unreachable #209

Closed klondi closed 7 years ago

klondi commented 7 years ago

https://wiki.sha2017.org/w/Projects:Badge/Documentation#NVS_settings documents certain settings like battery.volt.min and battery.volt.max on the splash namespace.

Since these are larger than 15 characters (actually 16) it is impossible to access it as _nvs_check_namespace_key in modbadge.c will throw a KeyInvalid exception.

If larger than 16 character keys are allowed this should be reflected in modbadge.c otherwise the keys should be changed and the firmware and documentation updated to reflect this.

Roosted7 commented 7 years ago

Thanks for reporting! The NVS system itself does not support long keys. We found that out when we tried to use those long keys..

The keys on the wiki are not up to date, they have been shortened. I'll fix the nvs keys on the wiki straight away.

The documentation is quite lacking in some places sadly.. (want to help out?)