mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 01:39:30 +02:00
Merge branch 'main' into bugfix/LED-S3
This commit is contained in:
commit
f8138b04eb
2 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ void update_machineryprotection() {
|
||||||
/* Check if the ESP32 CPU running the Battery-Emulator is too hot.
|
/* Check if the ESP32 CPU running the Battery-Emulator is too hot.
|
||||||
We start with a warning, you can start to see Wifi issues if it becomes too hot
|
We start with a warning, you can start to see Wifi issues if it becomes too hot
|
||||||
If the chip starts to approach the design limit, we perform a graceful shutdown */
|
If the chip starts to approach the design limit, we perform a graceful shutdown */
|
||||||
if (datalayer.system.info.CPU_temperature > 80.0f) {
|
if (datalayer.system.info.CPU_temperature > 87.0f) {
|
||||||
set_event(EVENT_CPU_OVERHEATING, 0);
|
set_event(EVENT_CPU_OVERHEATING, 0);
|
||||||
} else {
|
} else {
|
||||||
clear_event(EVENT_CPU_OVERHEATING);
|
clear_event(EVENT_CPU_OVERHEATING);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
TEST(SafetyTests, ShouldSetEventWhenTemperatureTooHigh) {
|
TEST(SafetyTests, ShouldSetEventWhenTemperatureTooHigh) {
|
||||||
init_events();
|
init_events();
|
||||||
datalayer.system.info.CPU_temperature = 82;
|
datalayer.system.info.CPU_temperature = 88;
|
||||||
update_machineryprotection();
|
update_machineryprotection();
|
||||||
|
|
||||||
auto event_pointer = get_event_pointer(EVENT_CPU_OVERHEATING);
|
auto event_pointer = get_event_pointer(EVENT_CPU_OVERHEATING);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue