30void ssSetLeds(int8_t RGB)
53 pStatus->
next = status;
55 uint8_t blink =
false;
80 if ((!blink) | (status != pStatus->
previous))
114 ssSetStatusNow(pStatus,
NORMAL);
129 ssSetStatusNow(pStatus,
OFF);
144 pStatus->
next = status;
151 ssSetStatusNow(pStatus, pStatus->
next);
157 pStatus->
next = status;
158 ssUpdateStatus(pStatus);
171 pStatus->
set = ssSetStatus;
172 pStatus->
get = ssGetStatus;
173 pStatus->
queue = ssQueueStatus;
174 pStatus->
update = ssUpdateStatus;
175 pStatus->
test = ssTest;
177 pStatus->
set(pStatus,
OFF);
182 LED_RED_INIT(LOGIC_LED_OFF);
183 LED_GREEN_INIT(LOGIC_LED_OFF);
184 LED_BLUE_INIT(LOGIC_LED_OFF);
Board configuration file.
Provides function prototypes for driver level interfaces It does not have a corresponding ....
The sensor_fusion.h file implements the top level programming interface.
fusion_status_t
Application-specific serial communications system.
@ RECEIVING_WIRED
Receiving commands over wired interface (momentary)
@ HARD_FAULT
Non-recoverable FAULT = something went very wrong.
@ LOWPOWER
Running in reduced power mode.
@ NORMAL
Operation is Nominal.
@ RECEIVING_WIRELESS
Receiving commands over wireless interface (momentary)
@ INITIALIZING
Initializing sensors and algorithms.
@ OFF
These are the state definitions for the status subsystem.
@ SOFT_FAULT
Recoverable FAULT = something went wrong, but we can keep going.
void initializeStatusSubsystem(StatusSubsystem *pStatus)
Application-specific status subsystem.
StatusSubsystem() provides an object-like interface for communicating status to the user.
fusion_status_t previous
Previous status state - fusion_status_t is defined in sensor_fusion.h.
ssUpdateStatus_t * update
make pending status active/visible
uint8_t toggle
This implementation can change LED color and have either solid/toggle.
ssUpdateStatus_t * test
unit test which simply increments to next state
ssSetStatus_t * set
change status immediately - no delay
ssSetStatus_t * queue
queue status change for next regular interval
ssGetStatus_t * get
return status
fusion_status_t status
Current status.
fusion_status_t next
Pending status change.