Merge pull request #10558 from iNavFlight/MrD_Correct-comments-on-OSD-symbols
[inav.git] / src / main / sensors / diagnostics.h
blobfd976fa010515259c43d92cb3815cd0d7813948f
2 /**
3 * Collects hardware failure information from devices.
4 * No hardware checking should be actually performed,
5 * rather already known hardware status should be returned.
6 */
8 #pragma once
10 typedef enum {
11 HW_SENSOR_NONE = 0, // Not selected
12 HW_SENSOR_OK = 1, // Selected, detected and healthy (ready to be used)
13 HW_SENSOR_UNAVAILABLE = 2, // Selected in configuration but not detected
14 HW_SENSOR_UNHEALTHY = 3, // Selected, detected but is reported as not healthy
15 } hardwareSensorStatus_e;
17 // Sensor is considered healthy if it's either
18 // not configured or either configured and working.
19 #define HW_SENSOR_IS_HEALTHY(status) (status == HW_SENSOR_NONE || status == HW_SENSOR_OK)
21 hardwareSensorStatus_e getHwGyroStatus(void);
22 hardwareSensorStatus_e getHwAccelerometerStatus(void);
23 hardwareSensorStatus_e getHwCompassStatus(void);
24 hardwareSensorStatus_e getHwBarometerStatus(void);
25 hardwareSensorStatus_e getHwGPSStatus(void);
26 hardwareSensorStatus_e getHwRangefinderStatus(void);
27 hardwareSensorStatus_e getHwPitotmeterStatus(void);
28 hardwareSensorStatus_e getHwOpticalFlowStatus(void);
30 bool isHardwareHealthy(void);