Files
gronod f87ab0c65f
ci / test (push) Successful in 1m9s
ci / firmware (wroom, sdkconfig.wroom, esp32) (push) Successful in 4m9s
ci / firmware (jc4827w543, sdkconfig.s3, esp32s3) (push) Successful in 4m10s
Fix temp_task starvation bug on non-WROOM
2026-09-16 21:21:12 +01:00

27 lines
375 B
C

#include "hal_temp.h"
#include <stddef.h>
int stub_temp_fail;
float stub_temp_c = 20.0f;
void hal_temp_init(void)
{
stub_temp_fail = 0;
stub_temp_c = 20.0f;
}
void hal_temp_tick(void)
{
}
esp_err_t hal_temp_read_c(float *out)
{
if (stub_temp_fail) {
return ESP_FAIL;
}
if (out != NULL) {
*out = stub_temp_c;
}
return ESP_OK;
}