mysensors / NodeManager

Plugin for a rapid development of battery-powered sensors
130 stars 82 forks source link

SensorSHT31.h #551

Open NickLplus opened 2 years ago

NickLplus commented 2 years ago

A small one: SensorSHT31.h reports temperature in ° Fahrenheit even when I_CONFIG is 0 ('Metric').

user2684 commented 2 years ago

Hi, never seen this behaviour before, will mark it as a bug and try to reproduce it. In case you have logs to share would be great. Thanks

NickLplus commented 2 years ago

Thank you for looking into it. The line temperature = nodeManager.celsiusToFahrenheit(temperature); seems to be executed always, without a check for I_CONFIG value.

user2684 commented 2 years ago

Actually the check is inside the function (https://github.com/mysensors/NodeManager/blob/master/nodemanager/Node.cpp#L138). The logs should tell you if I_CONFIG is updated correctly, let's have a look :-)