solarcaratuva / Rivanna2

Embedded system code for Rivanna 2
5 stars 1 forks source link

PowerAux errors #109

Closed edward-noe closed 2 years ago

edward-noe commented 2 years ago

We should create a new struct for PowerAux errors. This can replace the PowerAuxExampleStruct. This struct should only be sent if one of the errors is active. We should send the message every 1 second if that is the case.

PowerAuxErrors

Bits Field Name
0 fan_error
1 brake_light_error
2 headlight_error
3 bms_strobe_error
4 left_turn_error
5 right_turn_error

fan_error should be set based on the FanTach pin. If the value is below an arbitrary threshold (TBD), the pin should be set.

For each light, the error field should be set if: