mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-05 02:39:57 +02:00
Add CPU temperature monitoring in Webserver
This commit is contained in:
parent
a326a417c0
commit
50fbaf252d
3 changed files with 6 additions and 1 deletions
|
@ -336,6 +336,9 @@ void check_interconnect_available() {
|
||||||
#endif // DOUBLE_BATTERY
|
#endif // DOUBLE_BATTERY
|
||||||
|
|
||||||
void update_calculated_values() {
|
void update_calculated_values() {
|
||||||
|
/* Update CPU temperature*/
|
||||||
|
datalayer.system.info.CPU_temperature = temperatureRead();
|
||||||
|
|
||||||
/* Calculate allowed charge/discharge currents*/
|
/* Calculate allowed charge/discharge currents*/
|
||||||
if (datalayer.battery.status.voltage_dV > 10) {
|
if (datalayer.battery.status.voltage_dV > 10) {
|
||||||
// Only update value when we have voltage available to avoid div0. TODO: This should be based on nominal voltage
|
// Only update value when we have voltage available to avoid div0. TODO: This should be based on nominal voltage
|
||||||
|
|
|
@ -215,6 +215,8 @@ typedef struct {
|
||||||
} DATALAYER_SHUNT_TYPE;
|
} DATALAYER_SHUNT_TYPE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
/** ESP32 main CPU temperature, for displaying on webserver and for safeties */
|
||||||
|
float CPU_temperature = 0;
|
||||||
/** array with type of battery used, for displaying on webserver */
|
/** array with type of battery used, for displaying on webserver */
|
||||||
char battery_protocol[64] = {0};
|
char battery_protocol[64] = {0};
|
||||||
/** array with type of inverter protocol used, for displaying on webserver */
|
/** array with type of inverter protocol used, for displaying on webserver */
|
||||||
|
|
|
@ -928,7 +928,7 @@ String processor(const String& var) {
|
||||||
#ifdef HW_STARK
|
#ifdef HW_STARK
|
||||||
content += " Hardware: Stark CMR Module";
|
content += " Hardware: Stark CMR Module";
|
||||||
#endif // HW_STARK
|
#endif // HW_STARK
|
||||||
content += "</h4>";
|
content += " @ " + String(datalayer.system.info.CPU_temperature, 1) + " °C</h4>";
|
||||||
content += "<h4>Uptime: " + uptime_formatter::getUptime() + "</h4>";
|
content += "<h4>Uptime: " + uptime_formatter::getUptime() + "</h4>";
|
||||||
#ifdef FUNCTION_TIME_MEASUREMENT
|
#ifdef FUNCTION_TIME_MEASUREMENT
|
||||||
// Load information
|
// Load information
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue