Skip to content

Commit

Permalink
Allow manual disarming when landed
Browse files Browse the repository at this point in the history
Sending a disarm request while in landed state now allows you to skip waiting for the timeout and disarm early.
gemenerik committed Oct 17, 2024
1 parent 80ee72a commit a39b193
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/modules/src/supervisor.c
Original file line number Diff line number Diff line change
@@ -263,9 +263,9 @@ static void postTransitionActions(SupervisorMem_t* this, const supervisorState_t
if (newState == supervisorStateLanded) {
supervisorSetLatestLandingTime(this, currentTick);
}

if ((previousState == supervisorStateLanded) && (newState == supervisorStateReset)) {
DEBUG_PRINT("Landing timeout, disarming\n");
DEBUG_PRINT("Disarming\n");
}

if (newState == supervisorStateLocked) {
4 changes: 2 additions & 2 deletions src/modules/src/supervisor_state_machine.c
Original file line number Diff line number Diff line change
@@ -199,8 +199,8 @@ static SupervisorStateTransition_t transitionsLanded[] = {
.newState = supervisorStateReset,

.triggers = SUPERVISOR_CB_LANDING_TIMEOUT,
.negatedTriggers = SUPERVISOR_CB_NONE,
.triggerCombiner = supervisorAll,
.negatedTriggers = SUPERVISOR_CB_ARMED,
.triggerCombiner = supervisorAny,

.blockerCombiner = supervisorNever,
},

0 comments on commit a39b193

Please sign in to comment.