Fix a few bugs and implement flags command further
This commit is contained in:
@@ -38,6 +38,14 @@ enum analog_monitor_status {ANALOG_MONITOR_OK = 0,
|
||||
ANALOG_MONITOR_OVER,
|
||||
ANALOG_MONITOR_UNDER};
|
||||
|
||||
struct analog_monitor_info {
|
||||
float value;
|
||||
float min;
|
||||
float max;
|
||||
enum analog_monitor_status status;
|
||||
uint64_t timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Initialize the safety controller
|
||||
*
|
||||
@@ -76,10 +84,16 @@ bool safety_controller_get_flags_by_mask(enum safety_flag mask);
|
||||
|
||||
uint32_t safety_controller_get_flag_count();
|
||||
|
||||
uint32_t safety_controller_get_analog_monitor_count();
|
||||
|
||||
int safety_controller_get_flag_name_by_index(uint32_t index, char *buffer, size_t buffsize);
|
||||
|
||||
int safety_controller_get_flag_by_index(uint32_t index, bool *status, enum safety_flag *flag_enum);
|
||||
|
||||
int safety_controller_get_analog_mon_by_index(uint32_t index, struct analog_monitor_info *info);
|
||||
|
||||
int safety_controller_get_analog_mon_name_by_index(uint32_t index, char *buffer, size_t buffsize);
|
||||
|
||||
#endif /* __SAFETY_CONTROLLER_H__ */
|
||||
|
||||
/** @} */
|
||||
|
Reference in New Issue
Block a user