syrlinks temperature set and temperature protection

This commit is contained in:
Jakob Meier
2022-03-31 17:44:29 +02:00
parent 222f17edcc
commit b29a0cd0fb
4 changed files with 255 additions and 173 deletions

View File

@ -80,10 +80,11 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
* In some cases it is not possible to extract from the received reply the information about
* the associated command. This variable is thus used to remember the command id.
*/
DeviceCommandId_t rememberCommandId = SYRLINKS::NONE;
DeviceCommandId_t rememberCommandId = syrlinks::NONE;
SYRLINKS::RxDataset rxDataset;
SYRLINKS::TxDataset txDataset;
syrlinks::RxDataset rxDataset;
syrlinks::TxDataset txDataset;
syrlinks::TemperatureSet temperatureSet;
const power::Switch_t powerSwitch = power::NO_SWITCH;
@ -93,13 +94,23 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
float tempPowerAmplifier = 0;
float tempBasebandBoard = 0;
uint8_t commandBuffer[SYRLINKS::MAX_COMMAND_SIZE];
uint8_t commandBuffer[syrlinks::MAX_COMMAND_SIZE];
enum class StartupState {
OFF,
ENABLE_TEMPERATURE_PROTECTION,
DONE
};
StartupState startupState = StartupState::OFF;
bool debug = false;
/**
* This object is used to store the id of the next command to execute. This controls the
* read out of multiple registers which can not be fetched with one single command.
*/
DeviceCommandId_t nextCommand = SYRLINKS::READ_RX_STATUS_REGISTERS;
DeviceCommandId_t nextCommand = syrlinks::READ_RX_STATUS_REGISTERS;
/**
* @brief This function converts an uint16_t into its hexadecimal string representation.
@ -192,6 +203,8 @@ class SyrlinksHkHandler : public DeviceHandlerBase {
* @brief Calculates temperature in degree celcius form raw value
*/
float calcTempVal(uint16_t);
ReturnValue_t handleAckReply(const uint8_t* packet);
};
#endif /* MISSION_DEVICES_SYRLINKSHKHANDLER_H_ */