mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 00:39:50 +03:00
show CPU temp in C or F
This commit is contained in:
@@ -99,7 +99,8 @@ const HardwareStatus = () => {
|
|||||||
' @ ' +
|
' @ ' +
|
||||||
data.cpu_freq_mhz +
|
data.cpu_freq_mhz +
|
||||||
' Mhz' +
|
' Mhz' +
|
||||||
(data.temperature ? ', T: ' + data.temperature + ' °C' : '')
|
// bit of a hack : if the CPU temp is higher than 90 (=32 Fahrenheit if using Celsius), show F, otherwise C
|
||||||
|
(data.temperature ? ', T: ' + data.temperature + ' °' + (data.temperature > 90 ? 'F' : 'C') : '')
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
|||||||
Reference in New Issue
Block a user