mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-07-29 01:52:51 +00:00
Merge remote-tracking branch 'emsesp/dev' into dev
This commit is contained in:
@@ -13,7 +13,7 @@ For more details go to [emsesp.org](https://emsesp.org/).
|
|||||||
- signed value for solarInfuence [#3077](https://github.com/emsesp/EMS-ESP32/issues/3077)
|
- signed value for solarInfuence [#3077](https://github.com/emsesp/EMS-ESP32/issues/3077)
|
||||||
- set bin file upload limit to 1M again [3086](https://github.com/emsesp/EMS-ESP32/issues/3086)
|
- set bin file upload limit to 1M again [3086](https://github.com/emsesp/EMS-ESP32/issues/3086)
|
||||||
- check arithmetric operations on strings [#3127](https://github.com/emsesp/EMS-ESP32/discussions/3127)
|
- check arithmetric operations on strings [#3127](https://github.com/emsesp/EMS-ESP32/discussions/3127)
|
||||||
- Prevent system crash during WiFi network discovery on ESP32-S3 hardware [#3128](https://github.com/emsesp/EMS-ESP32/pull/3128)
|
- Fix: Prevent system crash during WiFi network discovery on ESP32-S3 hardware [#3128](https://github.com/emsesp/EMS-ESP32/pull/3128)
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
|
|
||||||
|
|||||||
@@ -38,9 +38,9 @@ void WiFiScanner::listNetworks(AsyncWebServerRequest * request) {
|
|||||||
} else if (numNetworks == -1) {
|
} else if (numNetworks == -1) {
|
||||||
request->send(202); // special code to indicate scan in progress
|
request->send(202); // special code to indicate scan in progress
|
||||||
} else {
|
} else {
|
||||||
auto * response = new AsyncJsonResponse(false);
|
auto * response = new AsyncJsonResponse(false);
|
||||||
JsonObject root = response->getRoot();
|
JsonObject root = response->getRoot();
|
||||||
JsonArray networks = root["networks"].to<JsonArray>();
|
root["networks"].to<JsonArray>();
|
||||||
response->setLength();
|
response->setLength();
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -377,19 +377,23 @@ void Roomctrl::temperature(uint8_t addr, uint8_t dst, uint8_t hc) {
|
|||||||
|
|
||||||
// send telegram 0x047B only for RC100H
|
// send telegram 0x047B only for RC100H
|
||||||
void Roomctrl::humidity(uint8_t addr, uint8_t dst, uint8_t hc) {
|
void Roomctrl::humidity(uint8_t addr, uint8_t dst, uint8_t hc) {
|
||||||
|
int16_t dew = calc_dew(remotetemp_[hc], remotehum_[hc]);
|
||||||
|
int8_t dew8 = EMS_VALUE_INT8_NOTSET;
|
||||||
|
if (dew != EMS_VALUE_INT16_NOTSET) {
|
||||||
|
dew8 = static_cast<int8_t>((dew >= 0 ? dew + 5 : dew - 5) / 10);
|
||||||
|
}
|
||||||
uint8_t data[11];
|
uint8_t data[11];
|
||||||
data[0] = addr | EMSbus::ems_mask();
|
data[0] = addr | EMSbus::ems_mask();
|
||||||
data[1] = dst & 0x7F;
|
data[1] = dst & 0x7F;
|
||||||
uint16_t dew = calc_dew(remotetemp_[hc], remotehum_[hc]);
|
data[2] = 0xFF;
|
||||||
data[2] = 0xFF;
|
data[3] = 0;
|
||||||
data[3] = 0;
|
data[4] = 3;
|
||||||
data[4] = 3;
|
data[5] = 0x7B + hc;
|
||||||
data[5] = 0x7B + hc;
|
data[6] = static_cast<uint8_t>(dew8);
|
||||||
data[6] = dew == EMS_VALUE_INT16_NOTSET ? EMS_VALUE_INT8_NOTSET : (uint8_t)((dew + 5) / 10);
|
data[7] = remotehum_[hc];
|
||||||
data[7] = remotehum_[hc];
|
data[8] = static_cast<uint8_t>(static_cast<uint16_t>(dew) >> 8);
|
||||||
data[8] = (uint8_t)(dew << 8);
|
data[9] = static_cast<uint8_t>(static_cast<uint16_t>(dew) & 0xFF);
|
||||||
data[9] = (uint8_t)(dew & 0xFF);
|
data[10] = EMSbus::calculate_crc(data, 10); // append CRC
|
||||||
data[10] = EMSbus::calculate_crc(data, 10); // append CRC
|
|
||||||
EMSuart::transmit(data, 11);
|
EMSuart::transmit(data, 11);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user