From 89b40f31731433c2dbed99fe32dbfb10a2dac194 Mon Sep 17 00:00:00 2001 From: abeck70 Date: Mon, 25 May 2015 08:50:33 +1000 Subject: [PATCH 01/25] REVONANO: Landing and disarming fixes Also prevent stabi control in land's disarm state --- flight/modules/ManualControl/armhandler.c | 12 ------------ flight/modules/PathFollower/vtollandfsm.cpp | 7 ++++++- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/flight/modules/ManualControl/armhandler.c b/flight/modules/ManualControl/armhandler.c index f83b4644e..fe80141a6 100644 --- a/flight/modules/ManualControl/armhandler.c +++ b/flight/modules/ManualControl/armhandler.c @@ -346,18 +346,6 @@ static bool forcedDisArm(void) return true; } -#ifndef PIOS_EXCLUDE_ADVANCED_FEATURES - // check landing state if active - FlightStatusData flightStatus; - FlightStatusGet(&flightStatus); - if (flightStatus.FlightMode == FLIGHTSTATUS_FLIGHTMODE_LAND) { - StatusVtolLandData statusland; - StatusVtolLandGet(&statusland); - if (statusland.State == STATUSVTOLLAND_STATE_DISARMED) { - return true; - } - } -#endif return false; } diff --git a/flight/modules/PathFollower/vtollandfsm.cpp b/flight/modules/PathFollower/vtollandfsm.cpp index f51b76fe0..f9d7a5064 100644 --- a/flight/modules/PathFollower/vtollandfsm.cpp +++ b/flight/modules/PathFollower/vtollandfsm.cpp @@ -31,6 +31,7 @@ extern "C" { #include #include +#include #include #include #include @@ -638,6 +639,7 @@ void VtolLandFSM::run_thrustdown(__attribute__((unused)) uint8_t flTimeout) void VtolLandFSM::setup_thrustoff(void) { mLandData->thrustLimit = -1.0f; + mLandData->flZeroStabiHorizontal = true; mLandData->flConstrainThrust = true; mLandData->boundThrustMin = -0.1f; mLandData->boundThrustMax = 0.0f; @@ -653,10 +655,13 @@ void VtolLandFSM::setup_disarmed(void) { // nothing to do mLandData->flConstrainThrust = false; - mLandData->flZeroStabiHorizontal = false; + mLandData->flZeroStabiHorizontal = true; mLandData->observationCount = 0; mLandData->boundThrustMin = -0.1f; mLandData->boundThrustMax = 0.0f; + if (flightStatus->ControlChain.PathPlanner != FLIGHTSTATUS_CONTROLCHAIN_TRUE) { + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_CRITICAL); + } } void VtolLandFSM::run_disarmed(__attribute__((unused)) uint8_t flTimeout) From 50d60649aa3e584aeceb5f35280572caa7dcf1ba Mon Sep 17 00:00:00 2001 From: abeck70 Date: Mon, 25 May 2015 22:13:13 +1000 Subject: [PATCH 02/25] REVONANO Fix BrakeController to use vtol VerticalVelPID instead of LandVerticalVelPID --- flight/modules/PathFollower/inc/vtolbrakefsm.h | 2 -- .../modules/PathFollower/vtolbrakecontroller.cpp | 16 ++++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/flight/modules/PathFollower/inc/vtolbrakefsm.h b/flight/modules/PathFollower/inc/vtolbrakefsm.h index 6e5151977..ac10faa0d 100644 --- a/flight/modules/PathFollower/inc/vtolbrakefsm.h +++ b/flight/modules/PathFollower/inc/vtolbrakefsm.h @@ -66,7 +66,6 @@ public: void Activate(void); void Update(void); PathFollowerFSMState_T GetCurrentState(void); - void Abort(void); uint8_t PositionHoldState(void); protected: @@ -103,7 +102,6 @@ protected: // void updateVtolBrakeFSMStatus(); void setStateTimeout(int32_t count); - void fallback_to_hold(void); static PathFollowerFSM_BrakeStateHandler_T sBrakeStateTable[BRAKE_STATE_SIZE]; }; diff --git a/flight/modules/PathFollower/vtolbrakecontroller.cpp b/flight/modules/PathFollower/vtolbrakecontroller.cpp index 271ee907c..960e330de 100644 --- a/flight/modules/PathFollower/vtolbrakecontroller.cpp +++ b/flight/modules/PathFollower/vtolbrakecontroller.cpp @@ -35,6 +35,7 @@ extern "C" { #include #include +#include #include #include #include @@ -138,10 +139,10 @@ void VtolBrakeController::SettingsUpdated(void) controlNE.UpdatePositionalParameters(vtolPathFollowerSettings->HorizontalPosP); controlNE.UpdateCommandParameters(-vtolPathFollowerSettings->BrakeMaxPitch, vtolPathFollowerSettings->BrakeMaxPitch, vtolPathFollowerSettings->BrakeVelocityFeedforward); - controlDown.UpdateParameters(vtolPathFollowerSettings->LandVerticalVelPID.Kp, - vtolPathFollowerSettings->LandVerticalVelPID.Ki, - vtolPathFollowerSettings->LandVerticalVelPID.Kd, - vtolPathFollowerSettings->LandVerticalVelPID.Beta, + controlDown.UpdateParameters(vtolPathFollowerSettings->VerticalVelPID.Kp, + vtolPathFollowerSettings->VerticalVelPID.Ki, + vtolPathFollowerSettings->VerticalVelPID.Kd, + vtolPathFollowerSettings->VerticalVelPID.Beta, dT, 10.0f * vtolPathFollowerSettings->VerticalVelMax); // avoid constraining initial fast entry into brake controlDown.UpdatePositionalParameters(vtolPathFollowerSettings->VerticalPosP); @@ -364,8 +365,11 @@ void VtolBrakeController::UpdateAutoPilot() int8_t result = UpdateStabilizationDesired(); - if (!result) { - fsm->Abort(); // enter PH + if (result) { + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_OK); + } else { + pathStatus->Status = PATHSTATUS_STATUS_CRITICAL; + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_WARNING); } PathStatusSet(pathStatus); From 7d66a075dec741b3a1395991e6709e309d5a3622 Mon Sep 17 00:00:00 2001 From: abeck70 Date: Mon, 25 May 2015 22:19:01 +1000 Subject: [PATCH 03/25] REVONANO Fixes to AutoTakeoff 1. Fix autoyaw to 0 attitude on takeoff post launch. 2. An error condition abort now properly disarms and continues to contrain thrust and stabi during disarmed state. 3. Increase thrustdown time from 2 to 5 seconds on an error condition (e.g. if 3 m deviation from takeoff position on NE). --- .../inc/vtolautotakeoffcontroller.h | 3 +- .../PathFollower/inc/vtolautotakeofffsm.h | 5 -- .../vtolautotakeoffcontroller.cpp | 40 +++--------- .../PathFollower/vtolautotakeofffsm.cpp | 61 ++++--------------- 4 files changed, 24 insertions(+), 85 deletions(-) diff --git a/flight/modules/PathFollower/inc/vtolautotakeoffcontroller.h b/flight/modules/PathFollower/inc/vtolautotakeoffcontroller.h index 64ec94447..4b52bfa9c 100644 --- a/flight/modules/PathFollower/inc/vtolautotakeoffcontroller.h +++ b/flight/modules/PathFollower/inc/vtolautotakeoffcontroller.h @@ -63,8 +63,7 @@ public: private: void UpdateVelocityDesired(void); - int8_t UpdateStabilizationDesired(bool yaw_attitude, float yaw_direction); - void setArmedIfChanged(FlightStatusArmedOptions val); + int8_t UpdateStabilizationDesired(void); VtolAutoTakeoffFSM *fsm; VtolPathFollowerSettingsData *vtolPathFollowerSettings; diff --git a/flight/modules/PathFollower/inc/vtolautotakeofffsm.h b/flight/modules/PathFollower/inc/vtolautotakeofffsm.h index fd6832bd7..6c912baec 100644 --- a/flight/modules/PathFollower/inc/vtolautotakeofffsm.h +++ b/flight/modules/PathFollower/inc/vtolautotakeofffsm.h @@ -73,7 +73,6 @@ public: void BoundThrust(float &ulow, float &uhigh); PathFollowerFSMState_T GetCurrentState(void); void ConstrainStabiDesired(StabilizationDesiredData *stabDesired); - void Abort(void); uint8_t PositionHoldState(void); void setControlState(StatusVtolAutoTakeoffControlStateOptions controlState); @@ -138,9 +137,6 @@ protected: void setup_disarmed(void); void run_disarmed(uint8_t); - void setup_abort(void); - void run_abort(uint8_t); - void initFSM(void); void setState(StatusVtolAutoTakeoffStateOptions newState, StatusVtolAutoTakeoffStateExitReasonOptions reason); int32_t runState(); @@ -150,7 +146,6 @@ protected: void assessAltitude(void); void setStateTimeout(int32_t count); - void fallback_to_hold(void); static PathFollowerFSM_AutoTakeoffStateHandler_T sAutoTakeoffStateTable[AUTOTAKEOFF_STATE_SIZE]; }; diff --git a/flight/modules/PathFollower/vtolautotakeoffcontroller.cpp b/flight/modules/PathFollower/vtolautotakeoffcontroller.cpp index 2c4bdc569..afac9e7e5 100644 --- a/flight/modules/PathFollower/vtolautotakeoffcontroller.cpp +++ b/flight/modules/PathFollower/vtolautotakeoffcontroller.cpp @@ -30,6 +30,7 @@ extern "C" { #include #include +#include #include #include #include @@ -208,7 +209,7 @@ void VtolAutoTakeoffController::UpdateVelocityDesired() VelocityDesiredSet(&velocityDesired); } -int8_t VtolAutoTakeoffController::UpdateStabilizationDesired(bool yaw_attitude, float yaw_direction) +int8_t VtolAutoTakeoffController::UpdateStabilizationDesired() { uint8_t result = 1; StabilizationDesiredData stabDesired; @@ -236,13 +237,8 @@ int8_t VtolAutoTakeoffController::UpdateStabilizationDesired(bool yaw_attitude, ManualControlCommandData manualControl; ManualControlCommandGet(&manualControl); - if (yaw_attitude) { - stabDesired.StabilizationMode.Yaw = STABILIZATIONDESIRED_STABILIZATIONMODE_ATTITUDE; - stabDesired.Yaw = yaw_direction; - } else { - stabDesired.StabilizationMode.Yaw = STABILIZATIONDESIRED_STABILIZATIONMODE_AXISLOCK; - stabDesired.Yaw = stabSettings.MaximumRate.Yaw * manualControl.Yaw; - } + stabDesired.StabilizationMode.Yaw = STABILIZATIONDESIRED_STABILIZATIONMODE_AXISLOCK; + stabDesired.Yaw = stabSettings.MaximumRate.Yaw * manualControl.Yaw; // default thrust mode to cruise control stabDesired.StabilizationMode.Thrust = STABILIZATIONDESIRED_STABILIZATIONMODE_CRUISECONTROL; @@ -259,29 +255,13 @@ void VtolAutoTakeoffController::UpdateAutoPilot() UpdateVelocityDesired(); - // yaw behaviour is configurable in vtolpathfollower, select yaw control algorithm - bool yaw_attitude = true; - float yaw = 0.0f; - - fsm->GetYaw(yaw_attitude, yaw); - - int8_t result = UpdateStabilizationDesired(yaw_attitude, yaw); - - if (!result) { - fsm->Abort(); - } - - if (fsm->GetCurrentState() == PFFSM_STATE_DISARMED) { - setArmedIfChanged(FLIGHTSTATUS_ARMED_DISARMED); + int8_t result = UpdateStabilizationDesired(); + if (result) { + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_OK); + } else { + pathStatus->Status = PATHSTATUS_STATUS_CRITICAL; + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_WARNING); } PathStatusSet(pathStatus); } - -void VtolAutoTakeoffController::setArmedIfChanged(FlightStatusArmedOptions val) -{ - if (flightStatus->Armed != val) { - flightStatus->Armed = val; - FlightStatusSet(flightStatus); - } -} diff --git a/flight/modules/PathFollower/vtolautotakeofffsm.cpp b/flight/modules/PathFollower/vtolautotakeofffsm.cpp index 4fa320f43..524686d1f 100644 --- a/flight/modules/PathFollower/vtolautotakeofffsm.cpp +++ b/flight/modules/PathFollower/vtolautotakeofffsm.cpp @@ -65,7 +65,7 @@ extern "C" { #define TIMER_COUNT_PER_SECOND (1000 / vtolPathFollowerSettings->UpdatePeriod) #define TIMEOUT_SLOWSTART (2 * TIMER_COUNT_PER_SECOND) #define TIMEOUT_THRUSTUP (1 * TIMER_COUNT_PER_SECOND) -#define TIMEOUT_THRUSTDOWN (2 * TIMER_COUNT_PER_SECOND) +#define TIMEOUT_THRUSTDOWN (5 * TIMER_COUNT_PER_SECOND) #define AUTOTAKEOFFING_SLOWDOWN_HEIGHT -5.0f VtolAutoTakeoffFSM::PathFollowerFSM_AutoTakeoffStateHandler_T VtolAutoTakeoffFSM::sAutoTakeoffStateTable[AUTOTAKEOFF_STATE_SIZE] = { @@ -77,8 +77,7 @@ VtolAutoTakeoffFSM::PathFollowerFSM_AutoTakeoffStateHandler_T VtolAutoTakeoffFSM [AUTOTAKEOFF_STATE_HOLD] = { .setup = &VtolAutoTakeoffFSM::setup_hold, .run = &VtolAutoTakeoffFSM::run_hold }, [AUTOTAKEOFF_STATE_THRUSTDOWN] = { .setup = &VtolAutoTakeoffFSM::setup_thrustdown, .run = &VtolAutoTakeoffFSM::run_thrustdown }, [AUTOTAKEOFF_STATE_THRUSTOFF] = { .setup = &VtolAutoTakeoffFSM::setup_thrustoff, .run = &VtolAutoTakeoffFSM::run_thrustoff }, - [AUTOTAKEOFF_STATE_DISARMED] = { .setup = &VtolAutoTakeoffFSM::setup_disarmed, .run = &VtolAutoTakeoffFSM::run_disarmed }, - [AUTOTAKEOFF_STATE_ABORT] = { .setup = &VtolAutoTakeoffFSM::setup_abort, .run = &VtolAutoTakeoffFSM::run_abort } + [AUTOTAKEOFF_STATE_DISARMED] = { .setup = &VtolAutoTakeoffFSM::setup_disarmed, .run = &VtolAutoTakeoffFSM::run_disarmed } }; // pointer to a singleton instance @@ -161,21 +160,12 @@ void VtolAutoTakeoffFSM::Activate() setState(STATUSVTOLAUTOTAKEOFF_STATE_INACTIVE, STATUSVTOLAUTOTAKEOFF_STATEEXITREASON_NONE); } -void VtolAutoTakeoffFSM::Abort(void) -{ - setState(STATUSVTOLAUTOTAKEOFF_STATE_ABORT, STATUSVTOLAUTOTAKEOFF_STATEEXITREASON_NONE); -} - PathFollowerFSMState_T VtolAutoTakeoffFSM::GetCurrentState(void) { switch (mAutoTakeoffData->currentState) { case STATUSVTOLAUTOTAKEOFF_STATE_INACTIVE: return PFFSM_STATE_INACTIVE; - break; - case STATUSVTOLAUTOTAKEOFF_STATE_ABORT: - return PFFSM_STATE_ABORT; - break; case STATUSVTOLAUTOTAKEOFF_STATE_DISARMED: return PFFSM_STATE_DISARMED; @@ -339,7 +329,7 @@ void VtolAutoTakeoffFSM::setControlState(StatusVtolAutoTakeoffControlStateOption setState(STATUSVTOLAUTOTAKEOFF_STATE_HOLD, STATUSVTOLAUTOTAKEOFF_STATEEXITREASON_NONE); break; case STATUSVTOLAUTOTAKEOFF_CONTROLSTATE_ABORT: - setState(STATUSVTOLAUTOTAKEOFF_STATE_ABORT, STATUSVTOLAUTOTAKEOFF_STATEEXITREASON_NONE); + setState(STATUSVTOLAUTOTAKEOFF_STATE_HOLD, STATUSVTOLAUTOTAKEOFF_STATEEXITREASON_NONE); break; } } @@ -540,51 +530,26 @@ void VtolAutoTakeoffFSM::run_thrustoff(__attribute__((unused)) uint8_t flTimeout // STATE: DISARMED void VtolAutoTakeoffFSM::setup_disarmed(void) { - // nothing to do - mAutoTakeoffData->flConstrainThrust = false; - mAutoTakeoffData->flZeroStabiHorizontal = false; + mAutoTakeoffData->thrustLimit = -1.0f; + mAutoTakeoffData->flConstrainThrust = true; + mAutoTakeoffData->flZeroStabiHorizontal = true; mAutoTakeoffData->observationCount = 0; mAutoTakeoffData->boundThrustMin = -0.1f; mAutoTakeoffData->boundThrustMax = 0.0f; + + if (flightStatus->ControlChain.PathPlanner != FLIGHTSTATUS_CONTROLCHAIN_TRUE) { + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_CRITICAL); + } } void VtolAutoTakeoffFSM::run_disarmed(__attribute__((unused)) uint8_t flTimeout) { + if (flightStatus->ControlChain.PathPlanner != FLIGHTSTATUS_CONTROLCHAIN_TRUE) { + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_CRITICAL); + } #ifdef DEBUG_GROUNDIMPACT if (mAutoTakeoffData->observationCount++ > 100) { setState(AUTOTAKEOFF_STATE_WTG_FOR_GROUNDEFFECT, STATUSVTOLAUTOTAKEOFF_STATEEXITREASON_NONE); } #endif } - -void VtolAutoTakeoffFSM::fallback_to_hold(void) -{ - PositionStateData positionState; - - PositionStateGet(&positionState); - pathDesired->End.North = positionState.North; - pathDesired->End.East = positionState.East; - pathDesired->End.Down = positionState.Down; - pathDesired->Start.North = positionState.North; - pathDesired->Start.East = positionState.East; - pathDesired->Start.Down = positionState.Down; - pathDesired->StartingVelocity = 0.0f; - pathDesired->EndingVelocity = 0.0f; - pathDesired->Mode = PATHDESIRED_MODE_GOTOENDPOINT; - - PathDesiredSet(pathDesired); -} - -// abort repeatedly overwrites pathfollower's objective on a landing abort and -// continues to do so until a flight mode change. -void VtolAutoTakeoffFSM::setup_abort(void) -{ - mAutoTakeoffData->boundThrustMin = vtolPathFollowerSettings->ThrustLimits.Min; - mAutoTakeoffData->boundThrustMax = vtolPathFollowerSettings->ThrustLimits.Max; - mAutoTakeoffData->flConstrainThrust = false; - mAutoTakeoffData->flZeroStabiHorizontal = false; - fallback_to_hold(); -} - -void VtolAutoTakeoffFSM::run_abort(__attribute__((unused)) uint8_t flTimeout) -{} From c5715b26af4d7c793b58f1d60110f52c2138186c Mon Sep 17 00:00:00 2001 From: abeck70 Date: Mon, 25 May 2015 22:21:53 +1000 Subject: [PATCH 04/25] REVONANO Landing fixes 1. Forced disarm via guidance alarm critical on disarm state 2. Continue to zero stabi including yaw during disarm state just in case it doesn't actually disarm. --- flight/modules/PathFollower/inc/vtollandfsm.h | 5 -- flight/modules/PathFollower/vtollandfsm.cpp | 66 +++++-------------- 2 files changed, 16 insertions(+), 55 deletions(-) diff --git a/flight/modules/PathFollower/inc/vtollandfsm.h b/flight/modules/PathFollower/inc/vtollandfsm.h index dec143c41..4c582a00a 100644 --- a/flight/modules/PathFollower/inc/vtollandfsm.h +++ b/flight/modules/PathFollower/inc/vtollandfsm.h @@ -47,7 +47,6 @@ typedef enum { LAND_STATE_THRUSTDOWN, // Thrust down sequence LAND_STATE_THRUSTOFF, // Thrust is now off LAND_STATE_DISARMED, // Disarmed - LAND_STATE_ABORT, // Abort on error triggerig fallback to hold LAND_STATE_SIZE } PathFollowerFSM_LandState_T; @@ -75,7 +74,6 @@ public: void ConstrainStabiDesired(StabilizationDesiredData *stabDesired); float BoundVelocityDown(float); void CheckPidScaler(pid_scaler *scaler); - void Abort(void); protected: @@ -130,8 +128,6 @@ protected: void run_thrustoff(uint8_t); void setup_disarmed(void); void run_disarmed(uint8_t); - void setup_abort(void); - void run_abort(uint8_t); void initFSM(void); void setState(StatusVtolLandStateOptions newState, StatusVtolLandStateExitReasonOptions reason); int32_t runState(); @@ -140,7 +136,6 @@ protected: void assessAltitude(void); void setStateTimeout(int32_t count); - void fallback_to_hold(void); static PathFollowerFSM_LandStateHandler_T sLandStateTable[LAND_STATE_SIZE]; }; diff --git a/flight/modules/PathFollower/vtollandfsm.cpp b/flight/modules/PathFollower/vtollandfsm.cpp index f9d7a5064..267299bc6 100644 --- a/flight/modules/PathFollower/vtollandfsm.cpp +++ b/flight/modules/PathFollower/vtollandfsm.cpp @@ -97,8 +97,7 @@ VtolLandFSM::PathFollowerFSM_LandStateHandler_T VtolLandFSM::sLandStateTable[LAN [LAND_STATE_GROUNDEFFECT] = { .setup = &VtolLandFSM::setup_groundeffect, .run = &VtolLandFSM::run_groundeffect }, [LAND_STATE_THRUSTDOWN] = { .setup = &VtolLandFSM::setup_thrustdown, .run = &VtolLandFSM::run_thrustdown }, [LAND_STATE_THRUSTOFF] = { .setup = &VtolLandFSM::setup_thrustoff, .run = &VtolLandFSM::run_thrustoff }, - [LAND_STATE_DISARMED] = { .setup = &VtolLandFSM::setup_disarmed, .run = &VtolLandFSM::run_disarmed }, - [LAND_STATE_ABORT] = { .setup = &VtolLandFSM::setup_abort, .run = &VtolLandFSM::run_abort } + [LAND_STATE_DISARMED] = { .setup = &VtolLandFSM::setup_disarmed, .run = &VtolLandFSM::run_disarmed } }; // pointer to a singleton instance @@ -177,25 +176,16 @@ void VtolLandFSM::Activate() #endif } else { // move to error state and callback to position hold - setState(STATUSVTOLLAND_STATE_ABORT, STATUSVTOLLAND_STATEEXITREASON_NONE); + setState(STATUSVTOLLAND_STATE_DISARMED, STATUSVTOLLAND_STATEEXITREASON_NONE); } } -void VtolLandFSM::Abort(void) -{ - setState(STATUSVTOLLAND_STATE_ABORT, STATUSVTOLLAND_STATEEXITREASON_NONE); -} - PathFollowerFSMState_T VtolLandFSM::GetCurrentState(void) { switch (mLandData->currentState) { case STATUSVTOLLAND_STATE_INACTIVE: return PFFSM_STATE_INACTIVE; - break; - case STATUSVTOLLAND_STATE_ABORT: - return PFFSM_STATE_ABORT; - break; case STATUSVTOLLAND_STATE_DISARMED: return PFFSM_STATE_DISARMED; @@ -432,7 +422,7 @@ void VtolLandFSM::run_wtg_for_descentrate(uint8_t flTimeout) } if (flTimeout) { - setState(STATUSVTOLLAND_STATE_ABORT, STATUSVTOLLAND_STATEEXITREASON_TIMEOUT); + setState(STATUSVTOLLAND_STATE_INITALTHOLD, STATUSVTOLLAND_STATEEXITREASON_TIMEOUT); } } @@ -638,11 +628,11 @@ void VtolLandFSM::run_thrustdown(__attribute__((unused)) uint8_t flTimeout) // STATE: THRUSTOFF void VtolLandFSM::setup_thrustoff(void) { - mLandData->thrustLimit = -1.0f; + mLandData->thrustLimit = -1.0f; mLandData->flZeroStabiHorizontal = true; - mLandData->flConstrainThrust = true; - mLandData->boundThrustMin = -0.1f; - mLandData->boundThrustMax = 0.0f; + mLandData->flConstrainThrust = true; + mLandData->boundThrustMin = -0.1f; + mLandData->boundThrustMax = 0.0f; } void VtolLandFSM::run_thrustoff(__attribute__((unused)) uint8_t flTimeout) @@ -659,48 +649,24 @@ void VtolLandFSM::setup_disarmed(void) mLandData->observationCount = 0; mLandData->boundThrustMin = -0.1f; mLandData->boundThrustMax = 0.0f; + + // force disarm unless in pathplanner mode + // to clear, a new pathfollower mode must be selected that is not land, + // and also a non-pathfollower mode selection will set this to uninitialised. if (flightStatus->ControlChain.PathPlanner != FLIGHTSTATUS_CONTROLCHAIN_TRUE) { - AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_CRITICAL); + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_CRITICAL); } } void VtolLandFSM::run_disarmed(__attribute__((unused)) uint8_t flTimeout) { + if (flightStatus->ControlChain.PathPlanner != FLIGHTSTATUS_CONTROLCHAIN_TRUE) { + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_CRITICAL); + } + #ifdef DEBUG_GROUNDIMPACT if (mLandData->observationCount++ > 100) { setState(STATUSVTOLLAND_STATE_WTGFORGROUNDEFFECT, STATUSVTOLLAND_STATEEXITREASON_NONE); } #endif } - -void VtolLandFSM::fallback_to_hold(void) -{ - PositionStateData positionState; - - PositionStateGet(&positionState); - pathDesired->End.North = positionState.North; - pathDesired->End.East = positionState.East; - pathDesired->End.Down = positionState.Down; - pathDesired->Start.North = positionState.North; - pathDesired->Start.East = positionState.East; - pathDesired->Start.Down = positionState.Down; - pathDesired->StartingVelocity = 0.0f; - pathDesired->EndingVelocity = 0.0f; - pathDesired->Mode = PATHDESIRED_MODE_GOTOENDPOINT; - - PathDesiredSet(pathDesired); -} - -// abort repeatedly overwrites pathfollower's objective on a landing abort and -// continues to do so until a flight mode change. -void VtolLandFSM::setup_abort(void) -{ - mLandData->boundThrustMin = vtolPathFollowerSettings->ThrustLimits.Min; - mLandData->boundThrustMax = vtolPathFollowerSettings->ThrustLimits.Max; - mLandData->flConstrainThrust = false; - mLandData->flZeroStabiHorizontal = false; - fallback_to_hold(); -} - -void VtolLandFSM::run_abort(__attribute__((unused)) uint8_t flTimeout) -{} From cdf1b88cc05269148215d8ca9722cfbf70c5f8bc Mon Sep 17 00:00:00 2001 From: abeck70 Date: Mon, 25 May 2015 22:24:06 +1000 Subject: [PATCH 05/25] REVONANO VelocityRoam fixes 1. New VelocityRoamHorizontalVelPID to allow tuning of VR independent of pathfollower nav modes --- .../PathFollower/vtolvelocitycontroller.cpp | 35 ++++++------------- .../vtolpathfollowersettings.xml | 3 +- 2 files changed, 12 insertions(+), 26 deletions(-) diff --git a/flight/modules/PathFollower/vtolvelocitycontroller.cpp b/flight/modules/PathFollower/vtolvelocitycontroller.cpp index 30cd02107..3934335ce 100644 --- a/flight/modules/PathFollower/vtolvelocitycontroller.cpp +++ b/flight/modules/PathFollower/vtolvelocitycontroller.cpp @@ -30,6 +30,7 @@ extern "C" { #include #include +#include #include #include #include @@ -104,10 +105,10 @@ void VtolVelocityController::SettingsUpdated(void) { const float dT = vtolPathFollowerSettings->UpdatePeriod / 1000.0f; - controlNE.UpdateParameters(vtolPathFollowerSettings->HorizontalVelPID.Kp, - vtolPathFollowerSettings->HorizontalVelPID.Ki, - vtolPathFollowerSettings->HorizontalVelPID.Kd, - vtolPathFollowerSettings->HorizontalVelPID.Beta, + controlNE.UpdateParameters(vtolPathFollowerSettings->VelocityRoamHorizontalVelPID.Kp, + vtolPathFollowerSettings->VelocityRoamHorizontalVelPID.Ki, + vtolPathFollowerSettings->VelocityRoamHorizontalVelPID.Kd, + vtolPathFollowerSettings->VelocityRoamHorizontalVelPID.Beta, dT, vtolPathFollowerSettings->HorizontalVelMax); @@ -201,28 +202,12 @@ void VtolVelocityController::UpdateAutoPilot() float yaw = 0.0f; int8_t result = UpdateStabilizationDesired(yaw_attitude, yaw); - - if (!result) { - fallback_to_hold(); + if (result) { + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_OK); + } else { + pathStatus->Status = PATHSTATUS_STATUS_CRITICAL; + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_WARNING); } PathStatusSet(pathStatus); } - -void VtolVelocityController::fallback_to_hold(void) -{ - PositionStateData positionState; - - PositionStateGet(&positionState); - pathDesired->End.North = positionState.North; - pathDesired->End.East = positionState.East; - pathDesired->End.Down = positionState.Down; - pathDesired->Start.North = positionState.North; - pathDesired->Start.East = positionState.East; - pathDesired->Start.Down = positionState.Down; - pathDesired->StartingVelocity = 0.0f; - pathDesired->EndingVelocity = 0.0f; - pathDesired->Mode = PATHDESIRED_MODE_GOTOENDPOINT; - - PathDesiredSet(pathDesired); -} diff --git a/shared/uavobjectdefinition/vtolpathfollowersettings.xml b/shared/uavobjectdefinition/vtolpathfollowersettings.xml index 5445f1ed0..ebd9b9655 100644 --- a/shared/uavobjectdefinition/vtolpathfollowersettings.xml +++ b/shared/uavobjectdefinition/vtolpathfollowersettings.xml @@ -18,7 +18,6 @@ - @@ -26,6 +25,8 @@ + + From bddb9377a4283ff818704442d150b531a80c0dc5 Mon Sep 17 00:00:00 2001 From: abeck70 Date: Mon, 25 May 2015 22:25:07 +1000 Subject: [PATCH 06/25] REVONANO Land and Takeoff uav changes removing abort state. --- flight/modules/PathFollower/vtollandcontroller.cpp | 9 ++++++--- shared/uavobjectdefinition/statusvtolautotakeoff.xml | 2 +- shared/uavobjectdefinition/statusvtolland.xml | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/flight/modules/PathFollower/vtollandcontroller.cpp b/flight/modules/PathFollower/vtollandcontroller.cpp index 97a7d466f..c2546ed37 100644 --- a/flight/modules/PathFollower/vtollandcontroller.cpp +++ b/flight/modules/PathFollower/vtollandcontroller.cpp @@ -30,6 +30,7 @@ extern "C" { #include #include +#include #include #include #include @@ -266,9 +267,11 @@ void VtolLandController::UpdateAutoPilot() fsm->GetYaw(yaw_attitude, yaw); int8_t result = UpdateStabilizationDesired(yaw_attitude, yaw); - - if (!result) { - fsm->Abort(); + if (result) { + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_OK); + } else { + pathStatus->Status = PATHSTATUS_STATUS_CRITICAL; + AlarmsSet(SYSTEMALARMS_ALARM_GUIDANCE, SYSTEMALARMS_ALARM_WARNING); } PathStatusSet(pathStatus); diff --git a/shared/uavobjectdefinition/statusvtolautotakeoff.xml b/shared/uavobjectdefinition/statusvtolautotakeoff.xml index 0d0d92a85..e36d9a902 100644 --- a/shared/uavobjectdefinition/statusvtolautotakeoff.xml +++ b/shared/uavobjectdefinition/statusvtolautotakeoff.xml @@ -1,7 +1,7 @@ Status of a AutoTakeoff autopilot - + diff --git a/shared/uavobjectdefinition/statusvtolland.xml b/shared/uavobjectdefinition/statusvtolland.xml index 36b04a600..74b71a18f 100644 --- a/shared/uavobjectdefinition/statusvtolland.xml +++ b/shared/uavobjectdefinition/statusvtolland.xml @@ -2,7 +2,7 @@ Status of a Vtol landing sequence + GroundEffect,ThrustDown,ThrustOff,Disarmed" default="0"/> From 4a78602da2d2835bdfb185515c3e9c4ee18c59d2 Mon Sep 17 00:00:00 2001 From: abeck70 Date: Mon, 25 May 2015 22:26:06 +1000 Subject: [PATCH 07/25] REVONANO Guidance alarm clearing on change of mode --- flight/modules/PathFollower/inc/vtolvelocitycontroller.h | 1 - flight/modules/PathFollower/pathfollower.cpp | 5 +++++ flight/modules/PathFollower/vtolbrakefsm.cpp | 5 ----- 3 files changed, 5 insertions(+), 6 deletions(-) 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) { From 85510483541f2c6a3b2648bdc1678829779e6e47 Mon Sep 17 00:00:00 2001 From: samguns Date: Tue, 26 May 2015 15:01:01 +0800 Subject: [PATCH 08/25] REVONANO 1. Sanity check for PWMSync & OneShot while using PWM receiver. 2. Remove CC in hwsettings.xml --- .../boards/revonano/firmware/pios_board.c | 51 ++++++++++++++++++- .../src/plugins/config/configoutputwidget.cpp | 5 +- .../src/plugins/setupwizard/pages/escpage.cpp | 31 ++++++++++- shared/uavobjectdefinition/hwsettings.xml | 8 +-- 4 files changed, 82 insertions(+), 13 deletions(-) diff --git a/flight/targets/boards/revonano/firmware/pios_board.c b/flight/targets/boards/revonano/firmware/pios_board.c index 41a5da831..dcf373a51 100644 --- a/flight/targets/boards/revonano/firmware/pios_board.c +++ b/flight/targets/boards/revonano/firmware/pios_board.c @@ -36,7 +36,8 @@ #include #include #include - +#include +#include #ifdef PIOS_INCLUDE_INSTRUMENTATION #include @@ -52,6 +53,8 @@ */ #include "../board_hw_defs.c" +static SystemAlarmsExtendedAlarmStatusOptions RevoNanoConfigHook(); +static void ActuatorSettingsUpdatedCb(UAVObjEvent *ev); /** * Sensor configurations */ @@ -764,8 +767,54 @@ void PIOS_Board_Init(void) } } #endif + + // Attach the board config check hook + SANITYCHECK_AttachHook(&RevoNanoConfigHook); + // trigger a config check if actuatorsettings are updated + ActuatorSettingsInitialize(); + ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb); } +SystemAlarmsExtendedAlarmStatusOptions RevoNanoConfigHook() +{ + // inhibit usage of oneshot for non supported RECEIVER port modes + uint8_t recmode; + + HwSettingsRM_RcvrPortGet(&recmode); + uint8_t modes[ACTUATORSETTINGS_BANKMODE_NUMELEM]; + ActuatorSettingsBankModeGet(modes); + + switch ((HwSettingsRM_RcvrPortOptions)recmode) { + // Those modes allows oneshot usage + case HWSETTINGS_RM_RCVRPORT_DISABLED: + case HWSETTINGS_RM_RCVRPORT_PPM: + case HWSETTINGS_RM_RCVRPORT_PPMOUTPUTS: + case HWSETTINGS_RM_RCVRPORT_OUTPUTS: + return SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE; + + // inhibit oneshot for the following modes + case HWSETTINGS_RM_RCVRPORT_PWM: + for (uint8_t i = 0; i < ACTUATORSETTINGS_BANKMODE_NUMELEM; i++) { + if (modes[i] == ACTUATORSETTINGS_BANKMODE_PWMSYNC || + modes[i] == ACTUATORSETTINGS_BANKMODE_ONESHOT125) { + return SYSTEMALARMS_EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT;; + } + } + + return SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE; + + default: + break; + } + + return SYSTEMALARMS_EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT;; +} + +// trigger a configuration check if ActuatorSettings are changed. +void ActuatorSettingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev) +{ + configuration_check(); +} /** * @} * @} diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index 6f149dfba..2ba04e8b3 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -472,10 +472,7 @@ void ConfigOutputWidget::updateWarnings(UAVObject *) if (systemAlarms.Alarm[SystemAlarms::ALARM_SYSTEMCONFIGURATION] > SystemAlarms::ALARM_WARNING) { switch (systemAlarms.ExtendedAlarmStatus[SystemAlarms::EXTENDEDALARMSTATUS_SYSTEMCONFIGURATION]) { case SystemAlarms::EXTENDEDALARMSTATUS_UNSUPPORTEDCONFIG_ONESHOT: - setWarning(tr("OneShot and PWMSync output only works with Receiver Port settings marked with '+OneShot'
" - "When using Receiver Port setting 'PPM_PIN8+OneShot' " - "Bank %2 must be set to PWM") - .arg(m_banks.at(3).color().name()).arg(m_banks.at(3).label()->text())); + setWarning(tr("OneShot and PWMSync output DO NOT work with Receiver Port is 'PWM'
")); return; } } diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/escpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/escpage.cpp index d56a2ec1b..f6010f72d 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/escpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/escpage.cpp @@ -73,5 +73,34 @@ void EscPage::initializePage() bool EscPage::isSynchOrOneShotAvailable() { - return true; + bool available = true; + + switch (getWizard()->getControllerType()) { + case SetupWizard::CONTROLLER_NANO: + switch (getWizard()->getVehicleType()) { + case SetupWizard::VEHICLE_MULTI: + switch (getWizard()->getVehicleSubType()) { + case SetupWizard::MULTI_ROTOR_TRI_Y: + case SetupWizard::MULTI_ROTOR_QUAD_X: + case SetupWizard::MULTI_ROTOR_QUAD_H: + case SetupWizard::MULTI_ROTOR_QUAD_PLUS: + available = getWizard()->getInputType() != SetupWizard::INPUT_PWM; + break; + + default: + available = false; + break; + } + break; + + default: + break; + } + break; + + default: + break; + } + + return available; } diff --git a/shared/uavobjectdefinition/hwsettings.xml b/shared/uavobjectdefinition/hwsettings.xml index c7584fea9..d5d991141 100644 --- a/shared/uavobjectdefinition/hwsettings.xml +++ b/shared/uavobjectdefinition/hwsettings.xml @@ -1,10 +1,6 @@ Selection of optional hardware configurations. - - - - @@ -28,9 +24,7 @@ From 0ea8260a876528422ba427a222329a48377d7648 Mon Sep 17 00:00:00 2001 From: abeck70 Date: Tue, 26 May 2015 17:29:51 +1000 Subject: [PATCH 09/25] REVONANO Truely disarm on pathfollower guidance alarm --- flight/modules/ManualControl/armhandler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/flight/modules/ManualControl/armhandler.c b/flight/modules/ManualControl/armhandler.c index fe80141a6..dedd4b03c 100644 --- a/flight/modules/ManualControl/armhandler.c +++ b/flight/modules/ManualControl/armhandler.c @@ -117,6 +117,7 @@ void armHandler(bool newinit, FrameType_t frameType) if (forcedDisArm()) { // PathPlanner forces explicit disarming due to error condition (crash, impact, fire, ...) + armState = ARM_STATE_DISARMED; setArmedIfChanged(FLIGHTSTATUS_ARMED_DISARMED); return; } From 03cef4ee890790ee7a07dae8724736c5fad0515c Mon Sep 17 00:00:00 2001 From: abeck70 Date: Tue, 26 May 2015 21:38:35 +1000 Subject: [PATCH 10/25] REVONANO WhatsNew Update Release 15.05 RC5 updated notes on changes --- WHATSNEW.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 3395d3a19..54dba5515 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,9 +1,14 @@ -Release Notes - OpenPilot - Version RELEASE-15.05 RC4 +Release Notes - OpenPilot - Version RELEASE-15.05 RC5 + +RC5 changes relative to RC4: +1. Landing flight mode now truely disarms to complete its sequence, triggered by a critical guidance alarm. Reset via change of flight mode. +2. VelocityRoam now has its own VelocityRoamHorizontalVelPID to allow independent tuning. +3. Sanity check for PWMSync & OneShot while using PWM receiver. Remove CC in hwsettings.xml RC4 changes relative to RC3: 1. GCS Input flight mode limit fixes hiding unsupported modes. 2. Throttle check on GPSAssist/Stabi whilst in hold removed. Now easy to fly out of hold without reducing throttle. -3. Trialling Rate instead of AxisLock on Yaw during Braking. +3. Trialing Rate instead of AxisLock on Yaw during Braking. 4. VelocityRoam now passing throttle position to AltVario. previously it was stuck in AltHold. 5. OP-1905 Fix OPLN in PPM mode blocking telemetry stream of no USB connected From 68da0d20a2b61f809d993347b3c88ae13343bb80 Mon Sep 17 00:00:00 2001 From: samguns Date: Tue, 26 May 2015 23:09:25 +0800 Subject: [PATCH 11/25] REVONANO A workaround for freeze in setup wizard --- .../openpilotgcs/src/plugins/setupwizard/setupwizard.cpp | 5 ++++- .../src/plugins/uploader/uploadergadgetwidget.cpp | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp index 4568c679f..517c65f3e 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp @@ -96,10 +96,13 @@ int SetupWizard::nextId() const { switch (getControllerType()) { case CONTROLLER_REVO: - case CONTROLLER_NANO: case CONTROLLER_DISCOVERYF4: return PAGE_INPUT; + case CONTROLLER_NANO: + reboot(); + return PAGE_INPUT; + case CONTROLLER_OPLINK: default: return PAGE_NOTYETIMPLEMENTED; diff --git a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp index ba8eebf9c..e218704b1 100644 --- a/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/uploader/uploadergadgetwidget.cpp @@ -1008,6 +1008,14 @@ void UploaderGadgetWidget::startAutoUpdate() void UploaderGadgetWidget::startAutoUpdateErase() { startAutoUpdate(true); + + ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); + UAVObjectUtilManager *utilMngr = pm->getObject(); + int id = utilMngr->getBoardModel(); + + if (id == 0x905) { + systemReset(); + } } void UploaderGadgetWidget::startAutoUpdate(bool erase) From 58bbc9324d412d83302bce78960695f8e1e00faf Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Tue, 26 May 2015 21:32:40 +0200 Subject: [PATCH 12/25] OP-1901 Revonano1505 SRXL wizard artwork --- .../resources/connection-diagrams.svg | 368 +++++++++++++++--- 1 file changed, 312 insertions(+), 56 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg b/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg index ec10733a3..465fd52c4 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg +++ b/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg @@ -30,13 +30,13 @@ inkscape:window-height="928" id="namedview4616" showgrid="false" - inkscape:zoom="4.1218791" - inkscape:cx="466.90655" - inkscape:cy="424.49244" + inkscape:zoom="1.5135025" + inkscape:cx="486.649" + inkscape:cy="636.99287" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" - inkscape:current-layer="layer12" + inkscape:current-layer="layer19" fit-margin-top="15" fit-margin-left="15" fit-margin-right="15" @@ -17750,6 +17750,26 @@ stop-color="#535353" id="stop6585-0-2-1-6-2-4" /> + + @@ -17787,6 +17807,124 @@ inkscape:label="rc-input" style="display:inline" transform="translate(-32.46875,315.85439)"> + + d="m 136.31357,163.05542 l 187.03999,0 c 3.58992,0 6.48,2.89008 6.48,6.48 l 0,8.84015 l -6,0 l 0,122.36001 l 6.00044,0 l -4.4e-4,10.23984 c -1.5e-4,3.58992 -2.89008,6.48 -6.48,6.48 l -187.03999,0 c -3.58993,0 -6.48001,-2.89008 -6.48001,-6.48 l 0,-141.44 c 0,-3.58992 2.89008,-6.48 6.48001,-6.48 z" + style="color:#000000;display:inline;fill:url(#linearGradient13565-9-6);fill-rule:nonzero;stroke:#000000;stroke-width:3.09599996;stroke-miterlimit:4;stroke-dasharray:none;enable-background:accumulate" /> + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:22.39999962px;line-height:125%;font-family:Sans;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#ffffff"> @@ -18306,6 +18444,125 @@ id="tspan11335">Satellite + + + + + + + + + + + + + + + + + + + + + + + + + + + + style="display:none"> @@ -18640,44 +18897,44 @@ id="text20057"> + id="path21266" + inkscape:connector-curvature="0" /> + id="path21268" + inkscape:connector-curvature="0" /> + id="path21270" + inkscape:connector-curvature="0" /> + id="path21272" + inkscape:connector-curvature="0" /> + id="path21274" + inkscape:connector-curvature="0" /> + id="path21276" + inkscape:connector-curvature="0" /> + id="path21278" + inkscape:connector-curvature="0" /> + id="path21280" + inkscape:connector-curvature="0" /> + id="path21282" + inkscape:connector-curvature="0" /> + id="path21284" + inkscape:connector-curvature="0" /> @@ -32230,7 +32487,7 @@ inkscape:connector-curvature="0" /> @@ -40090,7 +40347,6 @@ Date: Tue, 26 May 2015 22:20:46 +0200 Subject: [PATCH 13/25] OP-1901 Adding support for SRXL in vehicle wizard. --- .../plugins/setupwizard/pages/inputpage.cpp | 8 ++-- .../plugins/setupwizard/pages/inputpage.ui | 41 ++++++++++++++++++ .../setupwizard/resources/bttn-srxl-down.png | Bin 0 -> 3148 bytes .../setupwizard/resources/bttn-srxl-up.png | Bin 0 -> 3822 bytes .../vehicleconfigurationhelper.cpp | 6 +++ .../setupwizard/vehicleconfigurationsource.h | 2 +- .../plugins/setupwizard/wizardResources.qrc | 2 + 7 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 ground/openpilotgcs/src/plugins/setupwizard/resources/bttn-srxl-down.png create mode 100644 ground/openpilotgcs/src/plugins/setupwizard/resources/bttn-srxl-up.png diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.cpp index c6c0ad80a..b48bcd444 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.cpp @@ -55,6 +55,8 @@ bool InputPage::validatePage() getWizard()->setInputType(SetupWizard::INPUT_SBUS); } else if (ui->spectrumButton->isChecked()) { getWizard()->setInputType(SetupWizard::INPUT_DSM); + } else if (ui->multiplexButton->isChecked()){ + getWizard()->setInputType(SetupWizard::INPUT_SRXL); } else { getWizard()->setInputType(SetupWizard::INPUT_PWM); } @@ -79,17 +81,15 @@ bool InputPage::restartNeeded(VehicleConfigurationSource::INPUT_TYPE selectedTyp switch (selectedType) { case VehicleConfigurationSource::INPUT_PWM: return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PWM; - case VehicleConfigurationSource::INPUT_PPM: return data.RM_RcvrPort != HwSettings::RM_RCVRPORT_PPM; - case VehicleConfigurationSource::INPUT_SBUS: return data.RM_MainPort != HwSettings::RM_MAINPORT_SBUS; - + case VehicleConfigurationSource::INPUT_SRXL: + return data.RM_FlexiPort != HwSettings::RM_FLEXIPORT_SRXL; case VehicleConfigurationSource::INPUT_DSM: // TODO: Handle all of the DSM types ?? Which is most common? return data.RM_MainPort != HwSettings::RM_MAINPORT_DSM; - default: return true; } break; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui b/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui index 41f487ed8..738dc7622 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui @@ -218,6 +218,47 @@ p, li { white-space: pre-wrap; } + + + + + 10 + + + + Spektrum Satellite + + + QToolButton { border: none } + + + SRXL + + + + :/setupwizard/resources/bttn-srxl-up.png + :/setupwizard/resources/bttn-srxl-down.png:/setupwizard/resources/bttn-srxl-up.png + + + + 100 + 100 + + + + true + + + true + + + Qt::ToolButtonTextUnderIcon + + + true + + + diff --git a/ground/openpilotgcs/src/plugins/setupwizard/resources/bttn-srxl-down.png b/ground/openpilotgcs/src/plugins/setupwizard/resources/bttn-srxl-down.png new file mode 100644 index 0000000000000000000000000000000000000000..9888fb0c2b37878ff531dc833c8e3a75ffd4ff07 GIT binary patch literal 3148 zcmV-S472lzP)lDyghT}dhGAa!+uxZp3=t!YGYsJVtoW;53L1I33jNvN;^Kq!atL%<&mu*M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h<$HA_AFRxuD3=EvnKxo~>SL3;a?%4U# zd9RkDwds z^f-HH6Aw3?y%M9*`9kO0^w*fGuN8OLJk+KBKaj|?*N+}>1-6q)M|)5puf()x1=_O~ zdUEFywjA>O2P~MOw~rnD@D;XA40Jl80$t{3MnsbI)z_eN>%x{DmAE$bf%f)6#=6>u zC7%VkIk*qx1adfi8o|>CoL{gTTN*yZgkBhWh$?6c-mGBO^mfo>danG86#@ z4~eYPGTC_iX)>io7*#M4k|Te7b!3@)UB9 zlqO3W6Pie%NS;zkrjS%;34x2JMx%*QDwX_y1?}VS8XkBqDk}Qy$dMz-Li|BLQCue> z&nPOA*l-h7hsH0#(wLk3^y$+_hJ}SaA*hjv)be4rsn4qskRgz^W5b3G`|;b$uJq>C z@X{-hOp!pPgg~)rEQnNFkgc*%EJrH@CsC8sJc=YqiPM|6)k_F8sx5;TNoVyE(<+Tp z<;W8WBeF`=-? z?oAQ}iat*~fKp;w6*4B2h8;_`d)H0Nz*7Ood}x*#H0l07*qoM6N<$g4{k+TmS$7 literal 0 HcmV?d00001 diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp index e35c688e9..501afc8e9 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp @@ -159,6 +159,9 @@ void VehicleConfigurationHelper::applyHardwareConfiguration() case VehicleConfigurationSource::INPUT_DSM: data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_DSM; break; + case VehicleConfigurationSource::INPUT_SRXL: + data.RM_FlexiPort = HwSettings::RM_FLEXIPORT_SRXL; + break; default: break; } @@ -805,6 +808,9 @@ void VehicleConfigurationHelper::applyManualControlDefaults() case VehicleConfigurationSource::INPUT_DSM: channelType = ManualControlSettings::CHANNELGROUPS_DSMFLEXIPORT; break; + case VehicleConfigurationSource::INPUT_SRXL: + channelType = ManualControlSettings::CHANNELGROUPS_SRXL; + break; default: break; } diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h index cf7127bdb..07a769e5c 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationsource.h @@ -66,7 +66,7 @@ public: GROUNDVEHICLE_MOTORCYCLE, GROUNDVEHICLE_CAR, GROUNDVEHICLE_DIFFERENTIAL }; enum ESC_TYPE { ESC_ONESHOT, ESC_SYNCHED, ESC_RAPID, ESC_STANDARD, ESC_UNKNOWN }; enum SERVO_TYPE { SERVO_ANALOG, SERVO_DIGITAL, SERVO_UNKNOWN }; - enum INPUT_TYPE { INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSM, INPUT_UNKNOWN }; + enum INPUT_TYPE { INPUT_PWM, INPUT_PPM, INPUT_SBUS, INPUT_DSM, INPUT_SRXL, INPUT_UNKNOWN }; enum AIRSPEED_TYPE { AIRSPEED_ESTIMATE, AIRSPEED_EAGLETREE, AIRSPEED_MS4525, AIRSPEED_DISABLED }; enum GPS_TYPE { GPS_PLATINUM, GPS_UBX, GPS_NMEA, GPS_DISABLED }; enum RADIO_SETTING { RADIO_TELEMETRY, RADIO_DISABLED }; diff --git a/ground/openpilotgcs/src/plugins/setupwizard/wizardResources.qrc b/ground/openpilotgcs/src/plugins/setupwizard/wizardResources.qrc index c10a71c70..e6160c2f1 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/wizardResources.qrc +++ b/ground/openpilotgcs/src/plugins/setupwizard/wizardResources.qrc @@ -54,5 +54,7 @@ resources/connected.png resources/bttn-oneshot-dwn.png resources/bttn-oneshot-up.png + resources/bttn-srxl-down.png + resources/bttn-srxl-up.png From 52e56df397da89a4b4de44a361439010a247055b Mon Sep 17 00:00:00 2001 From: m_thread Date: Tue, 26 May 2015 23:36:32 +0200 Subject: [PATCH 14/25] OP-1901 Adding support for SRXL in connection diagram. --- .../openpilotgcs/src/plugins/setupwizard/connectiondiagram.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/connectiondiagram.cpp b/ground/openpilotgcs/src/plugins/setupwizard/connectiondiagram.cpp index 7acb7721c..619c22b63 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/connectiondiagram.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/connectiondiagram.cpp @@ -180,6 +180,9 @@ void ConnectionDiagram::setupGraphicsScene() case VehicleConfigurationSource::INPUT_SBUS: elementsToShow << QString("%1sbus").arg(prefix); break; + case VehicleConfigurationSource::INPUT_SRXL: + elementsToShow << QString("%1srxl").arg(prefix); + break; case VehicleConfigurationSource::INPUT_DSM: elementsToShow << QString("%1satellite").arg(prefix); break; From 0cb0948e169861878c764d194956cb95844ebc9e Mon Sep 17 00:00:00 2001 From: abeck70 Date: Wed, 27 May 2015 08:25:33 +1000 Subject: [PATCH 15/25] Release 15.05 RC5 WhatsNew Update --- WHATSNEW.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 54dba5515..46284c6c7 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -4,6 +4,7 @@ RC5 changes relative to RC4: 1. Landing flight mode now truely disarms to complete its sequence, triggered by a critical guidance alarm. Reset via change of flight mode. 2. VelocityRoam now has its own VelocityRoamHorizontalVelPID to allow independent tuning. 3. Sanity check for PWMSync & OneShot while using PWM receiver. Remove CC in hwsettings.xml +4. Wizard freeze issue on erase settings fixed. RC4 changes relative to RC3: 1. GCS Input flight mode limit fixes hiding unsupported modes. From f4eb368a8f49b677919e885d25598700b4b713bb Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Wed, 27 May 2015 07:29:51 +0200 Subject: [PATCH 16/25] OP-1901 Revo-srxl placement --- .../resources/connection-diagrams.svg | 60 ++++++++++--------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg b/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg index 465fd52c4..85dd8b724 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg +++ b/ground/openpilotgcs/src/plugins/setupwizard/resources/connection-diagrams.svg @@ -30,13 +30,13 @@ inkscape:window-height="928" id="namedview4616" showgrid="false" - inkscape:zoom="1.5135025" - inkscape:cx="486.649" - inkscape:cy="636.99287" + inkscape:zoom="1.0702079" + inkscape:cx="547.53816" + inkscape:cy="386.12041" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" - inkscape:current-layer="layer19" + inkscape:current-layer="layer16" fit-margin-top="15" fit-margin-left="15" fit-margin-right="15" @@ -17811,12 +17811,11 @@ inkscape:groupmode="layer" id="layer16" inkscape:label="revo-srxl" - sodipodi:insensitive="true" - style="display:none"> + style="display:inline"> + transform="matrix(0,0.4,-0.4,0,929.4684,-117.45414)"> + id="text4849-5-9-2-5" + transform="matrix(0,-1,1,0,-97.5,2824.5)"> + id="text20525-8" + transform="matrix(0,-1,1,0,-68.75,2824.5001)"> + style="display:none" + sodipodi:insensitive="true"> @@ -20663,9 +20665,9 @@ + points="186.194,11.031 181.129,13.319 186.083,4.74 191.036,13.319 " /> @@ -22251,13 +22253,13 @@ inkscape:connector-curvature="0" sodipodi:nodetypes="cscsscssscssccscccccscsssscscssscsssscssssssssscsscsscccccscscscssscccsccssssssccsccsccssssccccccccccsccccsccscssssssssccssssscsccscsscsscccsccsscccsscscsssccccccscccsccssscscsscssscssscssscsscssccsscccsscssscsssssscsssssssssssssscscsccsssscsssssscccsscccsssssssscssscssssscsssscccssccsccscssscccsssssssssccssssccsscsscssssssssscccsccssscccssscscccscsssscssscccssssssscccssssscsssscccccsssscsscscsssccccccsccs" /> + points="186.083,4.74 191.036,13.319 186.194,11.031 181.129,13.319 " /> + style="display:inline"> + points="186.194,11.031 181.129,13.319 186.083,4.74 191.036,13.319 " /> + points="36.194,11.031 31.129,13.319 36.083,4.74 41.036,13.319 " /> + style="display:none"> @@ -33157,7 +33159,7 @@ inkscape:transform-center-y="95.699765" inkscape:transform-center-x="-66.090998" transform="matrix(0,-1.0887723,1.065281,0,1247.1905,860.25683)" - points="186.194,11.031 181.129,13.319 186.083,4.74 191.036,13.319 " + points="186.083,4.74 191.036,13.319 186.194,11.031 181.129,13.319 " id="polygon8706-0" /> Date: Wed, 27 May 2015 07:30:58 +0200 Subject: [PATCH 17/25] OP-1901 Fixed faulty tooltip. --- ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui b/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui index 738dc7622..20e165462 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/inputpage.ui @@ -226,7 +226,7 @@ p, li { white-space: pre-wrap; } - Spektrum Satellite + Multiplex SRXL QToolButton { border: none } From 3d6a01f0e23eacdcc83e9ac1727c208ba5add02c Mon Sep 17 00:00:00 2001 From: m_thread Date: Mon, 13 Apr 2015 22:33:20 +0200 Subject: [PATCH 18/25] OP-1732 - Fixed timer bank assignments and labels for Revolution Conflicts: ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp --- .../openpilotgcs/src/plugins/config/configoutputwidget.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp index 2ba04e8b3..32e09e924 100644 --- a/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configoutputwidget.cpp @@ -356,14 +356,14 @@ void ConfigOutputWidget::refreshWidgetsValues(UAVObject *obj) // Setup labels and combos for banks according to board type if (board == 0x0903) { // Revolution family of boards 6 timer banks - bankLabels << "1 (1-2)" << "2 (3)" << "3 (4)" << "4 (5-6)" << "5 (7-8)" << "6 (9-10)"; - channelBanks << 1 << 1 << 2 << 3 << 4 << 4 << 5 << 5 << 6 << 6; + bankLabels << "1 (1-2)" << "2 (3)" << "3 (4)" << "4 (5-6)" << "5 (7,12)" << "6 (8-11)"; + channelBanks << 1 << 1 << 2 << 3 << 4 << 4 << 5 << 6 << 6 << 6 << 6 << 5; } else if (board == 0x0905) { // Revolution Nano bankLabels << "1 (1)" << "2 (2,7,11)" << "3 (3)" << "4 (4)" << "5 (5-6)" << "6 (8-10,12)"; channelBanks << 1 << 2 << 3 << 4 << 5 << 5 << 2 << 6 << 6 << 6 << 2 << 6; } - } + } int i = 0; foreach(QString banklabel, bankLabels) { From 78b56b29e0f4feb5d7bf76761c0989e9bcdf980e Mon Sep 17 00:00:00 2001 From: abeck70 Date: Thu, 28 May 2015 08:47:26 +1000 Subject: [PATCH 19/25] REVONANO Tuning of altvario and braking --- flight/libraries/plans.c | 2 +- flight/modules/PathFollower/vtolbrakefsm.cpp | 2 +- shared/uavobjectdefinition/altitudeholdsettings.xml | 4 ++-- shared/uavobjectdefinition/vtolpathfollowersettings.xml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/flight/libraries/plans.c b/flight/libraries/plans.c index 7055744b8..1ed4d6e11 100644 --- a/flight/libraries/plans.c +++ b/flight/libraries/plans.c @@ -823,7 +823,7 @@ void plan_run_AutoCruise() #define ASSISTEDCONTROL_TIMETOSTOP_MINIMUM 0.2f // seconds #define ASSISTEDCONTROL_TIMETOSTOP_MAXIMUM 9.0f // seconds #define ASSISTEDCONTROL_DELAY_TO_BRAKE 1.0f // seconds -#define ASSISTEDCONTROL_TIMEOUT_MULTIPLIER 2.0f // actual deceleration rate can be 50% of desired...timeouts need to cater for this +#define ASSISTEDCONTROL_TIMEOUT_MULTIPLIER 4.0f // actual deceleration rate can be 50% of desired...timeouts need to cater for this void plan_setup_assistedcontrol() { PositionStateData positionState; diff --git a/flight/modules/PathFollower/vtolbrakefsm.cpp b/flight/modules/PathFollower/vtolbrakefsm.cpp index addf95806..bcaf783b4 100644 --- a/flight/modules/PathFollower/vtolbrakefsm.cpp +++ b/flight/modules/PathFollower/vtolbrakefsm.cpp @@ -62,7 +62,7 @@ extern "C" { // Private constants #define TIMER_COUNT_PER_SECOND (1000 / vtolPathFollowerSettings->UpdatePeriod) #define BRAKE_FRACTIONALPROGRESS_STARTVELOCITYCHECK 0.95f -#define BRAKE_EXIT_VELOCITY_LIMIT 0.2f +#define BRAKE_EXIT_VELOCITY_LIMIT 0.15 VtolBrakeFSM::PathFollowerFSM_BrakeStateHandler_T VtolBrakeFSM::sBrakeStateTable[BRAKE_STATE_SIZE] = { [BRAKE_STATE_INACTIVE] = { .setup = 0, .run = 0 }, diff --git a/shared/uavobjectdefinition/altitudeholdsettings.xml b/shared/uavobjectdefinition/altitudeholdsettings.xml index d621b1ca6..fc38bf025 100644 --- a/shared/uavobjectdefinition/altitudeholdsettings.xml +++ b/shared/uavobjectdefinition/altitudeholdsettings.xml @@ -5,8 +5,8 @@ - - + + diff --git a/shared/uavobjectdefinition/vtolpathfollowersettings.xml b/shared/uavobjectdefinition/vtolpathfollowersettings.xml index ebd9b9655..06ccb3e1d 100644 --- a/shared/uavobjectdefinition/vtolpathfollowersettings.xml +++ b/shared/uavobjectdefinition/vtolpathfollowersettings.xml @@ -18,7 +18,7 @@ - + @@ -26,7 +26,7 @@ - + From edddc0e34fb2c774db651cba6e50190482fb5247 Mon Sep 17 00:00:00 2001 From: samguns Date: Thu, 28 May 2015 22:24:41 +0800 Subject: [PATCH 20/25] REVONANO Remove unnecessary limits for OneShot/PWMSync in setup wizard --- .../src/plugins/setupwizard/pages/escpage.cpp | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/escpage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/escpage.cpp index f6010f72d..245ed42f0 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/escpage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/escpage.cpp @@ -77,25 +77,7 @@ bool EscPage::isSynchOrOneShotAvailable() switch (getWizard()->getControllerType()) { case SetupWizard::CONTROLLER_NANO: - switch (getWizard()->getVehicleType()) { - case SetupWizard::VEHICLE_MULTI: - switch (getWizard()->getVehicleSubType()) { - case SetupWizard::MULTI_ROTOR_TRI_Y: - case SetupWizard::MULTI_ROTOR_QUAD_X: - case SetupWizard::MULTI_ROTOR_QUAD_H: - case SetupWizard::MULTI_ROTOR_QUAD_PLUS: - available = getWizard()->getInputType() != SetupWizard::INPUT_PWM; - break; - - default: - available = false; - break; - } - break; - - default: - break; - } + available = getWizard()->getInputType() != SetupWizard::INPUT_PWM; break; default: From 3e60dff30b1b2f832d855df444d70d29bc6500af Mon Sep 17 00:00:00 2001 From: samguns Date: Thu, 28 May 2015 23:18:24 +0800 Subject: [PATCH 21/25] REVONANO Only reboot nano when needed in setup wizard --- .../src/plugins/setupwizard/pages/autoupdatepage.cpp | 1 + ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/pages/autoupdatepage.cpp b/ground/openpilotgcs/src/plugins/setupwizard/pages/autoupdatepage.cpp index 4b886f7ca..19db80137 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/pages/autoupdatepage.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/pages/autoupdatepage.cpp @@ -49,6 +49,7 @@ void AutoUpdatePage::autoUpdate() Q_ASSERT(uploader); m_isUpdating = true; uploader->autoUpdate(ui->eraseSettings->isChecked()); + getWizard()->setRestartNeeded(true); } void AutoUpdatePage::updateStatus(uploader::ProgressStep status, QVariant value) diff --git a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp index 517c65f3e..4707cc47f 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/setupwizard.cpp @@ -100,7 +100,9 @@ int SetupWizard::nextId() const return PAGE_INPUT; case CONTROLLER_NANO: - reboot(); + if (isRestartNeeded()) { + reboot(); + } return PAGE_INPUT; case CONTROLLER_OPLINK: From 0ffd9e764d2924d33ff8097f9feb8fb4998c4943 Mon Sep 17 00:00:00 2001 From: abeck70 Date: Fri, 29 May 2015 09:04:59 +1000 Subject: [PATCH 22/25] REVONANO fix compile error in vtolbrakefsm --- flight/modules/PathFollower/vtolbrakefsm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/modules/PathFollower/vtolbrakefsm.cpp b/flight/modules/PathFollower/vtolbrakefsm.cpp index bcaf783b4..543f526fb 100644 --- a/flight/modules/PathFollower/vtolbrakefsm.cpp +++ b/flight/modules/PathFollower/vtolbrakefsm.cpp @@ -62,7 +62,7 @@ extern "C" { // Private constants #define TIMER_COUNT_PER_SECOND (1000 / vtolPathFollowerSettings->UpdatePeriod) #define BRAKE_FRACTIONALPROGRESS_STARTVELOCITYCHECK 0.95f -#define BRAKE_EXIT_VELOCITY_LIMIT 0.15 +#define BRAKE_EXIT_VELOCITY_LIMIT 0.15f VtolBrakeFSM::PathFollowerFSM_BrakeStateHandler_T VtolBrakeFSM::sBrakeStateTable[BRAKE_STATE_SIZE] = { [BRAKE_STATE_INACTIVE] = { .setup = 0, .run = 0 }, From 2ad52f770ce09fb6c37d0e92c749b483d083dac2 Mon Sep 17 00:00:00 2001 From: abeck70 Date: Fri, 29 May 2015 21:45:41 +1000 Subject: [PATCH 23/25] REVONANO store thrustdemand before uavo set --- flight/modules/Stabilization/altitudeloop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/modules/Stabilization/altitudeloop.cpp b/flight/modules/Stabilization/altitudeloop.cpp index 54fdfc8c4..1b4396206 100644 --- a/flight/modules/Stabilization/altitudeloop.cpp +++ b/flight/modules/Stabilization/altitudeloop.cpp @@ -177,8 +177,8 @@ static void altitudeHoldTask(void) break; } - AltitudeHoldStatusSet(&altitudeHoldStatus); thrustDemand = local_thrustDemand; + AltitudeHoldStatusSet(&altitudeHoldStatus); } static void VelocityStateUpdatedCb(__attribute__((unused)) UAVObjEvent *ev) From 6ddcb26e5e2818dcbcb00b85af5348f2f4a3407c Mon Sep 17 00:00:00 2001 From: Laurent Lalanne Date: Fri, 29 May 2015 19:56:25 +0200 Subject: [PATCH 24/25] OP-1648 Update PFD with new flightmodes --- .../openpilotgcs/pfd/default/Warnings.qml | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml index 8197fa42d..9026f7be5 100644 --- a/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml +++ b/ground/openpilotgcs/share/openpilotgcs/pfd/default/Warnings.qml @@ -12,24 +12,24 @@ Item { // All 'manual modes' are green, 'assisted' modes in cyan // "MANUAL","STAB 1","STAB 2", "STAB 3", "STAB 4", "STAB 5", "STAB 6", - // "POS HOLD", "COURSE LOCK", "POS ROAM", "HOME LEASH", "ABS POS", "RTB", "LAND", "PATHPLANNER", "POI", "AUTOCRUISE" + // "POS HOLD", "COURSELOCK","VEL ROAM", "HOME LEASH", "ABS POS", "RTB", "LAND", "PATHPLAN", "POI", "AUTOCRUISE", "AUTOTAKEOFF" property variant flightmodeColors : ["gray", "green", "green", "green", "green", "green", "green", - "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan"] + "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan", "cyan"] - // Manual,Rate,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude, - // AltitudeHold,AltitudeVario,CruiseControl + Auto mode (VTOL/Wing pathfollower) + // Manual,Rate,RateTrainer,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude, + // AltitudeHold,AltitudeVario,CruiseControl" + Auto mode (VTOL/Wing pathfollower) // grey : 'disabled' modes - property variant thrustmodeColors : ["green", "grey", "grey", "grey", "grey", "grey", "grey", "grey", + property variant thrustmodeColors : ["green", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "grey", "green", "green", "green", "cyan"] // SystemSettings.AirframeType 3 - 17 : VtolPathFollower, check ThrustControl property var thrust_mode: FlightStatus.FlightMode < 7 ? StabilizationDesired.StabilizationMode_Thrust : FlightStatus.FlightMode > 6 && SystemSettings.AirframeType > 2 && SystemSettings.AirframeType < 18 - && VtolPathFollowerSettings.ThrustControl == 1 ? 11 : - FlightStatus.FlightMode > 6 && SystemSettings.AirframeType < 3 ? 11: 0 + && VtolPathFollowerSettings.ThrustControl == 1 ? 12 : + FlightStatus.FlightMode > 6 && SystemSettings.AirframeType < 3 ? 12: 0 property real flight_time: Math.round(SystemStats.FlightTime / 1000) @@ -198,11 +198,13 @@ Item { Rectangle { anchors.fill: parent color: warnings.flightmodeColors[FlightStatus.FlightMode] + // Manual,Stabilized1,Stabilized2,Stabilized3,Stabilized4,Stabilized5,Stabilized6,PositionHold,CourseLock, + // VelocityRoam,HomeLeash,AbsolutePosition,ReturnToBase,Land,PathPlanner,POI,AutoCruise,AutoTakeoff Text { anchors.centerIn: parent text: ["MANUAL","STAB 1","STAB 2", "STAB 3", "STAB 4", "STAB 5", "STAB 6", "POS HOLD", "COURSELOCK", - "POS ROAM", "HOME LEASH", "ABS POS", "RTB", "LAND", "PATHPLAN", "POI", "AUTOCRUISE"][FlightStatus.FlightMode] + "VEL ROAM", "HOME LEASH", "ABS POS", "RTB", "LAND", "PATHPLAN", "POI", "AUTOCRUISE", "AUTOTAKEOFF"][FlightStatus.FlightMode] font { family: pt_bold.name pixelSize: Math.floor(parent.height * 0.74) @@ -225,12 +227,12 @@ Item { anchors.fill: parent color: FlightStatus.FlightMode < 1 ? "grey" : warnings.thrustmodeColors[thrust_mode.toString()] - // Manual,Rate,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude, + // Manual,Rate,RateTrainer,Attitude,AxisLock,WeakLeveling,VirtualBar,Acro+,Rattitude, // AltitudeHold,AltitudeVario,CruiseControl // grey : 'disabled' modes Text { anchors.centerIn: parent - text: ["MANUAL"," "," ", " ", " ", " ", " ", " ", + text: ["MANUAL"," "," ", " ", " ", " ", " ", " ", " ", "ALT HOLD", "ALT VARIO", "CRUISECTRL", "AUTO"][thrust_mode.toString()] font { family: pt_bold.name From 89a140a7e62d97e2ac5b433c031e0f01a23ee040 Mon Sep 17 00:00:00 2001 From: abeck70 Date: Sat, 30 May 2015 19:48:41 +1000 Subject: [PATCH 25/25] REVONANO Updates to WhatsNew --- WHATSNEW.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 46284c6c7..6c4a42d5a 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -1,4 +1,14 @@ -Release Notes - OpenPilot - Version RELEASE-15.05 RC5 +Release Notes - OpenPilot - Version RELEASE-15.05 RC6 + +RC6 changes relative to RC5: +1. Altvario AltHold PID updates +2. Fix timer bank assignments +3. Reboot nano in wizard only when needed +4. Fix wizard limits for oneshot/pwmsync +5. Update PFD with latest flight modes +6. Add AccelTau, AccelKp and AccelKi to TxPID +7. Adding support for SRXL in vehicle wizard. + RC5 changes relative to RC4: 1. Landing flight mode now truely disarms to complete its sequence, triggered by a critical guidance alarm. Reset via change of flight mode.