dont crash if sensors fail to detect
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user