Skip to content

Commit

Permalink
0.8.143
Browse files Browse the repository at this point in the history
* fixed crash #1743
  • Loading branch information
lumapu committed Aug 29, 2024
1 parent 565a69e commit 62ad964
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions src/publisher/pubMqtt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 2 additions & 1 deletion src/publisher/pubMqttDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ const char* const subtopics[] PROGMEM = {
"status",
"connected",
"not_connected",
"ack_pwr_limit"
"ack_pwr_limit",
"cpu_temp"
};

enum {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/web/html/system.html
Original file line number Diff line number Diff line change
Expand Up @@ -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*/
]

Expand Down

0 comments on commit 62ad964

Please sign in to comment.