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 --- include/driver/sen5x.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/driver') diff --git a/include/driver/sen5x.h b/include/driver/sen5x.h index 64e116b..47d92a0 100644 --- a/include/driver/sen5x.h +++ b/include/driver/sen5x.h @@ -22,6 +22,15 @@ class SEN5x { signed short const VOC_INVALID = 0x7fff; signed short const NOX_INVALID = 0x7fff; + struct { + unsigned int fan_speed_warning : 1; + unsigned int fan_cleaning_active : 1; + unsigned int gas_sensor_error : 1; + unsigned int rht_sensor_error : 1; + unsigned int laser_failure : 1; + unsigned int fan_failure : 1; + }; + /* * PM1.0 value, scaled by 10. * PM1.0 [µg/m³] = pm10 / 10 @@ -73,7 +82,10 @@ class SEN5x { void start(); void stop(); + void cleanFan(); + bool read(); + bool readStatus(); }; extern SEN5x sen5x; -- cgit v1.2.3