ACS Ctrl Action Cmds #401

Merged
muellerr merged 26 commits from eggert/acs-ctrl-action-cmds into develop 2023-02-24 15:51:08 +01:00
2 changed files with 10 additions and 2 deletions
Showing only changes of commit 5ad2fa5e93 - Show all commits

View File

@ -43,7 +43,12 @@ ReturnValue_t AcsController::handleCommandMessage(CommandMessage *message) {
ReturnValue_t AcsController::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy, ReturnValue_t AcsController::executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t *data, size_t size) { const uint8_t *data, size_t size) {
switch (actionId) { switch (actionId) {
case 0: { case SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL: {
guidance.solarArrayDeploymentComplete();
return HasActionsIF::EXECUTION_FINISHED;
}
case RESET_MEKF: {
navigation.resetMekf(&mekfData);
return HasActionsIF::EXECUTION_FINISHED; return HasActionsIF::EXECUTION_FINISHED;
} }
default: { default: {

View File

@ -59,9 +59,12 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes
#endif #endif
enum class InternalState { STARTUP, INITIAL_DELAY, READY }; enum class InternalState { STARTUP, INITIAL_DELAY, READY };
InternalState internalState = InternalState::STARTUP; InternalState internalState = InternalState::STARTUP;
/** Device command IDs */
static const DeviceCommandId_t SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0x0;
static const DeviceCommandId_t RESET_MEKF = 0x1;
ReturnValue_t initialize() override; ReturnValue_t initialize() override;
ReturnValue_t handleCommandMessage(CommandMessage* message) override; ReturnValue_t handleCommandMessage(CommandMessage* message) override;
void performControlOperation() override; void performControlOperation() override;