Group onboard
Functions and data structures used by the onboard firmware.
Classes
| Type | Name |
|---|---|
| class | dataStruct Class for the telemetry and flight data. |
| class | ledStruct Class for all LEDs. |
Public Functions
| Type | Name |
|---|---|
| void | buzzerSound (uint8_t pinBuzzer) Function to play a sound when the setup is completed. |
| void | buzzerSoundError (uint8_t pinBuzzer) Function to play a sound according to a error during setup. |
| void | commandExecute (uint8_t command, RC17xxHP_RC232 * radioModule, dataStruct * dataVariables, ledStruct * pinLed, uint8_t * flightMode, Subsystem ** subsystemsList, uint8_t subsystemsCount, Subsystem * subsystemSens, Subsystem * subsystemControl, Packet * flightDataPacket, Packet * telemetryDataPacket, uint8_t pinArm, uint8_t pinSleep) Changes the values of the loop variables and therefore the state of flight computer. |
| void | commandReceive (RC17xxHP_RC232 * radioModule, Packet * commandPacket) Returns the latest single-byte command from the uplink module (rc1701hp, on Serial3), or 0 if command is bad/unknown. |
| void | flashWrite (dataStruct * dataVariables) Function to write to the onbaord flash. f. |
| void | ledUpdate (uint8_t state, ledStruct * pinLed) Function to update LEDs to display different states of the system. |
| void | loopVariablesUpdate (uint32_t * loopCount, uint32_t * loopStartTime, uint8_t loopFrequency, uint8_t pinLedLoop) Function that update the loop variables. |
| void | packetSend (RC17xxHP_RC232 * radioModule, uint8_t packetType, Packet * flightDataPacket, Packet * telemetryDataPacket) Function to build up the package depending on an identifyer. |
| uint8_t | packetSendCheck (uint8_t * flightmode, uint8_t loopFrequency, uint8_t timeBetweenStandbyPackets, uint32_t loopCount) Function that handle the decision of sending a package depending on the timeBetweenStandbyPackets. In addition handles the decision of sending either the telemetry or flight package. |
| void | radioModulesSetup (RC17xxHP_RC232 * rc1780hp, RC17xxHP_RC232 * rc1701hp, ledStruct * pinLed, uint8_t pinBuzzer) Configures both radio modules; lights each module's status LED on success and sounds buzzzer. |
Public Functions Documentation
function buzzerSound
Function to play a sound when the setup is completed.
Parameters:
pinBuzzer
function buzzerSoundError
Function to play a sound according to a error during setup.
Parameters:
pinBuzzer
function commandExecute
Changes the values of the loop variables and therefore the state of flight computer.
void commandExecute (
uint8_t command,
RC17xxHP_RC232 * radioModule,
dataStruct * dataVariables,
ledStruct * pinLed,
uint8_t * flightMode,
Subsystem ** subsystemsList,
uint8_t subsystemsCount,
Subsystem * subsystemSens,
Subsystem * subsystemControl,
Packet * flightDataPacket,
Packet * telemetryDataPacket,
uint8_t pinArm,
uint8_t pinSleep
)
Parameters:
commandradioModuledataVariablespinLedflightModesubsystemsListsubsystemsCountsubsystemSenssubsystemControlpinArmpinSleep
function commandReceive
Returns the latest single-byte command from the uplink module (rc1701hp, on Serial3), or 0 if command is bad/unknown.
Parameters:
radioModule
Returns:
uint8_t
function flashWrite
Function to write to the onbaord flash. f.
Parameters:
dataVariables
function ledUpdate
Function to update LEDs to display different states of the system.
Parameters:
statepinLed
function loopVariablesUpdate
Function that update the loop variables.
void loopVariablesUpdate (
uint32_t * loopCount,
uint32_t * loopStartTime,
uint8_t loopFrequency,
uint8_t pinLedLoop
)
Parameters:
loopCountloopStartTimeloopFrequencypinLedLoop
function packetSend
Function to build up the package depending on an identifyer.
void packetSend (
RC17xxHP_RC232 * radioModule,
uint8_t packetType,
Packet * flightDataPacket,
Packet * telemetryDataPacket
)
Parameters:
radioModuledataVariablespinLedpacketIdentifier
function packetSendCheck
Function that handle the decision of sending a package depending on the timeBetweenStandbyPackets. In addition handles the decision of sending either the telemetry or flight package.
uint8_t packetSendCheck (
uint8_t * flightmode,
uint8_t loopFrequency,
uint8_t timeBetweenStandbyPackets,
uint32_t loopCount
)
Parameters:
flightmodeloopFrequencytimeBetweenStandbyPacketsloopCount
Returns:
uint8_t
function radioModulesSetup
Configures both radio modules; lights each module's status LED on success and sounds buzzzer.
void radioModulesSetup (
RC17xxHP_RC232 * rc1780hp,
RC17xxHP_RC232 * rc1701hp,
ledStruct * pinLed,
uint8_t pinBuzzer
)
Parameters:
rc1780hprc1701hppinLedpinBuzzer