mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 12:46:34 +00:00
Merge pull request #8874 from d0m1n1qu3/development
repair float int problems for MI Flora moisture and fertility
This commit is contained in:
commit
316d12ce89
@ -1222,10 +1222,10 @@ void MI32Show(bool json)
|
|||||||
ResponseAppend_P(PSTR(",\"" D_JSON_ILLUMINANCE "\":%u"), MIBLEsensors[i].lux);
|
ResponseAppend_P(PSTR(",\"" D_JSON_ILLUMINANCE "\":%u"), MIBLEsensors[i].lux);
|
||||||
}
|
}
|
||||||
if (!isnan(MIBLEsensors[i].moisture)) {
|
if (!isnan(MIBLEsensors[i].moisture)) {
|
||||||
ResponseAppend_P(PSTR(",\"" D_JSON_MOISTURE "\":%d"), MIBLEsensors[i].moisture);
|
ResponseAppend_P(PSTR(",\"" D_JSON_MOISTURE "\":%f"), MIBLEsensors[i].moisture);
|
||||||
}
|
}
|
||||||
if (!isnan(MIBLEsensors[i].fertility)) {
|
if (!isnan(MIBLEsensors[i].fertility)) {
|
||||||
ResponseAppend_P(PSTR(",\"Fertility\":%d"), MIBLEsensors[i].fertility);
|
ResponseAppend_P(PSTR(",\"Fertility\":%f"), MIBLEsensors[i].fertility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MIBLEsensors[i].type > FLORA){
|
if (MIBLEsensors[i].type > FLORA){
|
||||||
@ -1273,10 +1273,10 @@ void MI32Show(bool json)
|
|||||||
WSContentSend_PD(HTTP_SNS_ILLUMINANCE, kMI32SlaveType[MIBLEsensors[i].type-1], MIBLEsensors[i].lux);
|
WSContentSend_PD(HTTP_SNS_ILLUMINANCE, kMI32SlaveType[MIBLEsensors[i].type-1], MIBLEsensors[i].lux);
|
||||||
}
|
}
|
||||||
if (!isnan(MIBLEsensors[i].moisture)) {
|
if (!isnan(MIBLEsensors[i].moisture)) {
|
||||||
WSContentSend_PD(HTTP_SNS_MOISTURE, kMI32SlaveType[MIBLEsensors[i].type-1], MIBLEsensors[i].moisture);
|
WSContentSend_PD(HTTP_SNS_MOISTURE, kMI32SlaveType[MIBLEsensors[i].type-1], int(MIBLEsensors[i].moisture));
|
||||||
}
|
}
|
||||||
if (!isnan(MIBLEsensors[i].fertility)) {
|
if (!isnan(MIBLEsensors[i].fertility)) {
|
||||||
WSContentSend_PD(HTTP_MI32_FLORA_DATA, kMI32SlaveType[MIBLEsensors[i].type-1], MIBLEsensors[i].fertility);
|
WSContentSend_PD(HTTP_MI32_FLORA_DATA, kMI32SlaveType[MIBLEsensors[i].type-1], int(MIBLEsensors[i].fertility));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (MIBLEsensors[i].type>FLORA) { // everything "above" Flora
|
if (MIBLEsensors[i].type>FLORA) { // everything "above" Flora
|
||||||
|
Loading…
x
Reference in New Issue
Block a user