add syrlinks submode handling
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-01-24 19:40:27 +01:00
parent 1f08d85319
commit ae6f6538d2
4 changed files with 117 additions and 21 deletions

View File

@ -21,7 +21,7 @@
class SyrlinksHandler : public DeviceHandlerBase {
public:
SyrlinksHandler(object_id_t objectId, object_id_t comIF, CookieIF* comCookie,
power::Switch_t powerSwitch, FailureIsolationBase* customFdir);
power::Switch_t powerSwitch, FailureIsolationBase* customFdir);
virtual ~SyrlinksHandler();
/**
@ -34,6 +34,7 @@ class SyrlinksHandler : public DeviceHandlerBase {
protected:
void doStartUp() override;
void doShutDown() override;
void doTransition(Mode_t modeFrom, Submode_t subModeFrom) override;
ReturnValue_t buildNormalDeviceCommand(DeviceCommandId_t* id) override;
ReturnValue_t buildTransitionDeviceCommand(DeviceCommandId_t* id) override;
ReturnValue_t buildCommandFromCommand(DeviceCommandId_t deviceCommand, const uint8_t* commandData,
@ -104,12 +105,20 @@ class SyrlinksHandler : public DeviceHandlerBase {
uint16_t rawTempBasebandBoard = 0;
float tempPowerAmplifier = 0;
float tempBasebandBoard = 0;
bool commandExecuted = false;
uint8_t commandBuffer[syrlinks::MAX_COMMAND_SIZE];
enum class StartupState { OFF, ENABLE_TEMPERATURE_PROTECTION, DONE };
enum class InternalState {
OFF,
ENABLE_TEMPERATURE_PROTECTION,
SET_TX_MODULATION,
SET_TX_CW,
SET_TX_STANDBY,
IDLE
};
StartupState startupState = StartupState::OFF;
InternalState internalState = InternalState::OFF;
/**
* This object is used to store the id of the next command to execute. This controls the