diff --git a/flight/modules/PathFollower/inc/vtolvelocitycontroller.h b/flight/modules/PathFollower/inc/vtolvelocitycontroller.h index c5209a3d1..8d1108087 100644 --- a/flight/modules/PathFollower/inc/vtolvelocitycontroller.h +++ b/flight/modules/PathFollower/inc/vtolvelocitycontroller.h @@ -62,7 +62,6 @@ public: private: void UpdateVelocityDesired(void); int8_t UpdateStabilizationDesired(bool yaw_attitude, float yaw_direction); - void fallback_to_hold(void); VtolPathFollowerSettingsData *vtolPathFollowerSettings; PIDControlNE controlNE; diff --git a/flight/modules/PathFollower/pathfollower.cpp b/flight/modules/PathFollower/pathfollower.cpp index 4c688e7e8..f96328965 100644 --- a/flight/modules/PathFollower/pathfollower.cpp +++ b/flight/modules/PathFollower/pathfollower.cpp @@ -242,6 +242,7 @@ static void pathFollowerSetActiveController(void) if (activeController == 0) { // Initialise pathFollowerInitializeControllersForFrameType(); + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_OK); switch (frameType) { case FRAME_TYPE_MULTIROTOR: @@ -273,6 +274,7 @@ static void pathFollowerSetActiveController(void) break; default: activeController = 0; + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_UNINITIALISED); break; } break; @@ -289,6 +291,7 @@ static void pathFollowerSetActiveController(void) break; default: activeController = 0; + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_UNINITIALISED); break; } break; @@ -305,12 +308,14 @@ static void pathFollowerSetActiveController(void) break; default: activeController = 0; + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_UNINITIALISED); break; } break; default: activeController = 0; + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_UNINITIALISED); break; } } diff --git a/flight/modules/PathFollower/vtolbrakefsm.cpp b/flight/modules/PathFollower/vtolbrakefsm.cpp index 6401e0a2f..addf95806 100644 --- a/flight/modules/PathFollower/vtolbrakefsm.cpp +++ b/flight/modules/PathFollower/vtolbrakefsm.cpp @@ -130,11 +130,6 @@ void VtolBrakeFSM::Activate() setState(BRAKE_STATE_BRAKE, FSMBRAKESTATUS_STATEEXITREASON_NONE); } -void VtolBrakeFSM::Abort(void) -{ - setState(BRAKE_STATE_HOLD, FSMBRAKESTATUS_STATEEXITREASON_NONE); -} - PathFollowerFSMState_T VtolBrakeFSM::GetCurrentState(void) { switch (mBrakeData->currentState) {