1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-19 04:52:12 +01:00

REVONANO Guidance alarm clearing on change of mode

This commit is contained in:
abeck70 2015-05-25 22:26:06 +10:00
parent bddb9377a4
commit 4a78602da2
3 changed files with 5 additions and 6 deletions

View File

@ -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;

View File

@ -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;
}
}

View File

@ -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) {