Defines | |
#define | BALLAST_3D_FIX_COUNT 10 |
Number of consecutive 3D GPS fixes required to assert altitude as valid. | |
#define | BALLAST_HOLD_ALTITUDE 30500l |
Altitude in feet used to control ballast pump. | |
Enumerations | |
enum | BALLAST_MODE { WAIT_ACTIVATION, CONTROL_ALTITUDE, PUMP_RUN, PUMP_RUN_DELAY } |
Ballast pump state machine. More... | |
Functions | |
uint16_t | ballastGetPumpCount () |
Return the number of times the ballast pump has been commanded to run. | |
void | ballastInit () |
Setup the ballast controls system. | |
void | ballastSetState (bool_t state) |
Set the ballast control operation. | |
void | ballastLogEvent (bool_t state) |
Log the ballast pump command on or off. | |
void | ballastCheck () |
Function that should be called once a second with each GPS fix to determine ballast pump operation. | |
Variables | |
uint16_t | ballastPumpCount |
Number of times the ballast pump has been commanded to run. | |
uint8_t | ballast3DFixCount |
Count of 3D fixes required to assert GPS altitude is valid. | |
uint8_t | ballastTimeCount |
Counter used to track number of seconds pump is on or off. | |
BALLAST_MODE | ballastMode |
Enumerated type that indicates the current ballast mode. | |
bool_t | ballastState |
Flag used to enable/disable ballast control. |
#define BALLAST_3D_FIX_COUNT 10 |
Number of consecutive 3D GPS fixes required to assert altitude as valid.
Referenced by ballastCheck().
#define BALLAST_HOLD_ALTITUDE 30500l |
enum BALLAST_MODE |
Ballast pump state machine.
void ballastCheck | ( | ) |
Function that should be called once a second with each GPS fix to determine ballast pump operation.
References ballast3DFixCount, BALLAST_3D_FIX_COUNT, BALLAST_HOLD_ALTITUDE, ballastLogEvent(), ballastMode, ballastPumpCount, ballastState, ballastTimeCount, CONTROL_ALTITUDE, GPS_3D_FIX, gpsGetFixType(), gpsPosition, IO_BALLAST_PUMP, PUMP_RUN, PUMP_RUN_DELAY, timeGetHours(), timeGetMinutes(), and WAIT_ACTIVATION.
Referenced by main().
uint16_t ballastGetPumpCount | ( | ) |
Return the number of times the ballast pump has been commanded to run.
References ballastPumpCount.
Referenced by psk31CreateDataPacket().
void ballastInit | ( | ) |
Setup the ballast controls system.
References ballast3DFixCount, ballastMode, ballastPumpCount, ballastState, ballastTimeCount, and WAIT_ACTIVATION.
Referenced by main().
void ballastLogEvent | ( | bool_t | state | ) |
Log the ballast pump command on or off.
state | boolean that indicates if pump was turned on or off |
References gpsPosition, LOG_PUMP, logInt32(), logType(), and logUint8().
Referenced by ballastCheck().
void ballastSetState | ( | bool_t | state | ) |
Set the ballast control operation.
state | true to enable pump operation; otherwise false |
References ballastState.
Count of 3D fixes required to assert GPS altitude is valid.
Referenced by ballastCheck(), and ballastInit().
Enumerated type that indicates the current ballast mode.
Referenced by ballastCheck(), and ballastInit().
Number of times the ballast pump has been commanded to run.
Referenced by ballastCheck(), ballastGetPumpCount(), and ballastInit().
Flag used to enable/disable ballast control.
Referenced by ballastCheck(), ballastInit(), and ballastSetState().
Counter used to track number of seconds pump is on or off.
Referenced by ballastCheck(), and ballastInit().