[FL-3052] WS: add choice fahrenheit/celsius (#2149)
* WS: add choice fahrenheit/celsius * WS: fix syntax Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -143,8 +143,8 @@ static void ws_protocol_infactory_remote_controller(WSBlockGeneric* instance) {
|
||||
instance->id = instance->data >> 32;
|
||||
instance->battery_low = (instance->data >> 26) & 1;
|
||||
instance->btn = WS_NO_BTN;
|
||||
instance->temp = ws_block_generic_fahrenheit_to_celsius(
|
||||
((float)((instance->data >> 12) & 0x0FFF) - 900.0f) / 10.0f);
|
||||
instance->temp =
|
||||
locale_fahrenheit_to_celsius(((float)((instance->data >> 12) & 0x0FFF) - 900.0f) / 10.0f);
|
||||
instance->humidity =
|
||||
(((instance->data >> 8) & 0x0F) * 10) + ((instance->data >> 4) & 0x0F); // BCD, 'A0'=100%rH
|
||||
instance->channel = instance->data & 0x03;
|
||||
|
Reference in New Issue
Block a user