mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 05:06:32 +00:00
Fix MQTT heatindex calculation
This commit is contained in:
parent
9cacf2f609
commit
d678666ef0
@ -1356,7 +1356,7 @@ int ResponseAppendTHD(float f_temperature, float f_humidity) {
|
|||||||
Settings->flag2.humidity_resolution, &f_humidity,
|
Settings->flag2.humidity_resolution, &f_humidity,
|
||||||
Settings->flag2.temperature_resolution, &dewpoint);
|
Settings->flag2.temperature_resolution, &dewpoint);
|
||||||
#ifdef USE_HEAT_INDEX
|
#ifdef USE_HEAT_INDEX
|
||||||
float heatindex = CalcTemHumToHeatIndex(TasmotaGlobal.temperature_celsius, TasmotaGlobal.humidity);
|
float heatindex = CalcTemHumToHeatIndex(f_temperature, f_humidity);
|
||||||
int len2 = ResponseAppend_P(PSTR(",\"" D_JSON_HEATINDEX "\":%*_f"),
|
int len2 = ResponseAppend_P(PSTR(",\"" D_JSON_HEATINDEX "\":%*_f"),
|
||||||
Settings->flag2.temperature_resolution, &heatindex);
|
Settings->flag2.temperature_resolution, &heatindex);
|
||||||
return len + len2;
|
return len + len2;
|
||||||
|
@ -190,12 +190,12 @@ typedef struct Lora_t {
|
|||||||
int (* Receive)(char*);
|
int (* Receive)(char*);
|
||||||
bool (* Send)(uint8_t*, uint32_t, bool);
|
bool (* Send)(uint8_t*, uint32_t, bool);
|
||||||
LoraSettings_t settings; // Persistent settings
|
LoraSettings_t settings; // Persistent settings
|
||||||
uint32_t receive_time;
|
volatile uint32_t receive_time;
|
||||||
float rssi;
|
float rssi;
|
||||||
float snr;
|
float snr;
|
||||||
uint8_t packet_size; // Max is 255 (LORA_MAX_PACKET_LENGTH)
|
uint8_t packet_size; // Max is 255 (LORA_MAX_PACKET_LENGTH)
|
||||||
volatile bool received_flag; // flag to indicate that a packet was received
|
volatile bool received_flag; // flag to indicate that a packet was received
|
||||||
bool send_flag;
|
volatile bool send_flag;
|
||||||
bool raw;
|
bool raw;
|
||||||
#ifdef USE_LORAWAN_BRIDGE
|
#ifdef USE_LORAWAN_BRIDGE
|
||||||
uint32_t device_address;
|
uint32_t device_address;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user