summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-05-20 21:45:17 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-05-20 21:45:34 +0200
commitf2e4095b8208521bef2f566237b36fe24b949a8a (patch)
tree17185799fe075615d37bf6ab8ed06f00a1598329 /src/app
parent1cb46c9d6adbe4271314fddd765d49ce37681ca1 (diff)
sen5x: add cleanfan and readstatus commands
Diffstat (limited to 'src/app')
-rw-r--r--src/app/datalogger/main.cc20
1 files changed, 20 insertions, 0 deletions
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