Skip to content

Commit 62ad964

Browse files
committed
0.8.143
* fixed crash #1743
1 parent 565a69e commit 62ad964

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

src/CHANGES.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Development Changes
22

3+
## 0.8.143 - 2024-08-29
4+
* fixed crash #1743
5+
36
## 0.8.142 - 2024-08-28
47
* merge PR: add read_temp_c to system + mqtt #1739
58
* improved sending limits of multiple inverters in very short timeframe #1726

src/defines.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
//-------------------------------------
1414
#define VERSION_MAJOR 0
1515
#define VERSION_MINOR 8
16-
#define VERSION_PATCH 142
16+
#define VERSION_PATCH 143
1717
//-------------------------------------
1818
typedef struct {
1919
uint8_t ch;

src/publisher/pubMqtt.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,9 @@ class PubMqtt {
159159
publish(subtopics[MQTT_RSSI], String(WiFi.RSSI()).c_str());
160160
publish(subtopics[MQTT_FREE_HEAP], String(ESP.getFreeHeap()).c_str());
161161
#if defined(ESP32)
162-
publish(subtopics[MQTT_TEMP_SENS_C], String(ah::readTemperature()).c_str());
163-
#else ESP32
162+
snprintf(mVal.data(), mVal.size(), "%.2f", ah::readTemperature());
163+
publish(subtopics[MQTT_TEMP_SENS_C], mVal.data());
164+
#else
164165
publish(subtopics[MQTT_HEAP_FRAG], String(ESP.getHeapFragmentation()).c_str());
165166
#endif
166167
}

src/publisher/pubMqttDefs.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ const char* const subtopics[] PROGMEM = {
7777
"status",
7878
"connected",
7979
"not_connected",
80-
"ack_pwr_limit"
80+
"ack_pwr_limit",
81+
"cpu_temp"
8182
};
8283

8384
enum {

src/utils/helper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ namespace ah {
156156
// This formula is an approximation and might need to be calibrated for your specific use case.
157157
float temperature = (voltage - 500) / 10.0;*/
158158

159-
#if defined(ESP_32)
159+
#if defined(ESP32)
160160
return temperatureRead();
161161
#else
162162
return 0;

src/web/html/system.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
tr("Chip", "CPU: " + obj.chip.cpu_freq + "MHz, " + obj.chip.cores + " Core(s)"),
4747
tr("Chip Model", obj.chip.model)
4848
/*IF_ESP32*/
49-
,tr("Chip temp.", obj.chip.temp_sensor_c + "°C")
49+
,tr("Chip temp.", Math.round(obj.chip.temp_sensor_c * 10) / 10 + "°C")
5050
/*ENDIF_ESP32*/
5151
]
5252

0 commit comments

Comments
 (0)