dont crash if sensors fail to detect

This commit is contained in:
DrathVader
2026-02-27 23:17:36 +01:00
parent b3a2e84097
commit 317a73dac3

View File

@@ -102,11 +102,8 @@ void Application::sensorsThread(const std::stop_token& st) {
ret += gpu::detect(&m_sensors.gpu, m_config.gpu_pciaddr);
ret += sys::detect(&m_sensors.sys, m_config.sys_sensor);
m_sensors.home.mountpoint = m_config.home_dir;
if (ret < 0) {
if (ret < 0)
applog(LOG::ERR, "Failed to detect some sensors");
this->Crash(ret);
return;
}
while (!st.stop_requested()) {
auto start = std::chrono::steady_clock::now();
@@ -209,4 +206,4 @@ void Application::displayThread(const std::stop_token& st) {
// goodbye msg
lcd.writeBuf(2, 0, utils::center("Goodbye", 40));
lcd.flushBuf();
}
}