From f2e4095b8208521bef2f566237b36fe24b949a8a Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 20 May 2022 21:45:17 +0200 Subject: sen5x: add cleanfan and readstatus commands --- src/app/datalogger/main.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/app') diff --git a/src/app/datalogger/main.cc b/src/app/datalogger/main.cc index fd016e7..251d1fa 100644 --- a/src/app/datalogger/main.cc +++ b/src/app/datalogger/main.cc @@ -235,6 +235,26 @@ void loop(void) } else { kout << "SEN5x error" << endl; } + if (sen5x.readStatus()) { + if (sen5x.fan_speed_warning) { + kout << "SEN5x warning: fan speed out of range" << endl; + } + if (sen5x.fan_cleaning_active) { + kout << "SEN5x info: fan cleaning active" << endl; + } + if (sen5x.gas_sensor_error) { + kout << "SEN5x error: gas sensor" << endl; + } + if (sen5x.rht_sensor_error) { + kout << "SEN5x error: RHT sensor" << endl; + } + if (sen5x.laser_failure) { + kout << "SEN5x error: laser current out of range" << endl; + } + if (sen5x.fan_failure) { + kout << "SEN5x error: fan failure" << endl; + } + } #endif #ifdef CONFIG_driver_veml6075 -- cgit v1.2.3