Browse Source

0.8.143

* fixed crash #1743
pull/1745/head
lumapu 7 months ago
parent
commit
62ad9648b5
  1. 3
      src/CHANGES.md
  2. 2
      src/defines.h
  3. 5
      src/publisher/pubMqtt.h
  4. 3
      src/publisher/pubMqttDefs.h
  5. 2
      src/utils/helper.cpp
  6. 2
      src/web/html/system.html

3
src/CHANGES.md

@ -1,5 +1,8 @@
# Development Changes
## 0.8.143 - 2024-08-29
* fixed crash #1743
## 0.8.142 - 2024-08-28
* merge PR: add read_temp_c to system + mqtt #1739
* improved sending limits of multiple inverters in very short timeframe #1726

2
src/defines.h

@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 8
#define VERSION_PATCH 142
#define VERSION_PATCH 143
//-------------------------------------
typedef struct {
uint8_t ch;

5
src/publisher/pubMqtt.h

@ -159,8 +159,9 @@ class PubMqtt {
publish(subtopics[MQTT_RSSI], String(WiFi.RSSI()).c_str());
publish(subtopics[MQTT_FREE_HEAP], String(ESP.getFreeHeap()).c_str());
#if defined(ESP32)
publish(subtopics[MQTT_TEMP_SENS_C], String(ah::readTemperature()).c_str());
#else ESP32
snprintf(mVal.data(), mVal.size(), "%.2f", ah::readTemperature());
publish(subtopics[MQTT_TEMP_SENS_C], mVal.data());
#else
publish(subtopics[MQTT_HEAP_FRAG], String(ESP.getHeapFragmentation()).c_str());
#endif
}

3
src/publisher/pubMqttDefs.h

@ -77,7 +77,8 @@ const char* const subtopics[] PROGMEM = {
"status",
"connected",
"not_connected",
"ack_pwr_limit"
"ack_pwr_limit",
"cpu_temp"
};
enum {

2
src/utils/helper.cpp

@ -156,7 +156,7 @@ namespace ah {
// This formula is an approximation and might need to be calibrated for your specific use case.
float temperature = (voltage - 500) / 10.0;*/
#if defined(ESP_32)
#if defined(ESP32)
return temperatureRead();
#else
return 0;

2
src/web/html/system.html

@ -46,7 +46,7 @@
tr("Chip", "CPU: " + obj.chip.cpu_freq + "MHz, " + obj.chip.cores + " Core(s)"),
tr("Chip Model", obj.chip.model)
/*IF_ESP32*/
,tr("Chip temp.", obj.chip.temp_sensor_c + "°C")
,tr("Chip temp.", Math.round(obj.chip.temp_sensor_c * 10) / 10 + "°C")
/*ENDIF_ESP32*/
]

Loading…
Cancel
Save