SignalK / SensESP

Universal Signal K sensor framework for the ESP32 platform
https://signalk.org/SensESP/
Apache License 2.0
152 stars 81 forks source link

Updated Threshold transform configurations not loaded correctly after restart. #650

Open rogerlittin opened 1 year ago

rogerlittin commented 1 year ago

If an IntThreshold or FloatThreshold is added to a project and then updated via the UI, the updated configuration is not reloaded when the device is restarted. Instead, the original configuration is loaded.

The following error is printed in the debug logs,

(D) (load_configuration)(C1) Loading configuration for path '/Engine/WetExhaustTemp/Threshold' from '/GldheEq+AJu0o14z56OH7hbvvz8='
(W) (set_configuration)(C1) WARNING: set_configuration not defined for this Class
(W) (load_configuration)(C1) WARNING: Could not set configuration for /Engine/WetExhaustTemp/Threshold

Those warnings are coming from configurable.cpp so it looks like the set_configuration override in threshold.cpp isn’t being called for some reason. FloatThreshold has a separate issue where the configuration cannot be saved due to missing parameters. This is resolved in PR #649.