This fixes the terrifying case where the drone disarms in-air just
because it receives a MAVLink disarm command. We now check param2 for a
magic number which enforces arming/disarming.
This is added to the mavlink protocol in:
https://github.com/mavlink/mavlink/pull/1162
- MPC_MANTHR_MIN is used as minimum throttle in attitude control mode when
the vehicle is in air. This is useful to retain some control around roll and
pitch axis if airmode is not enabled and the user demands zero throttle.
However, when the vehicle is landed there is not need to keep the throttle
at a higher value than zero.
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This fails the build if a wrong version tag is used.
A wrong tag leads to wrong reporting in QGC, and incorrect error messages
about minimum required PX4 version.
It also leads to wrong statistics on Flight Review.
It doesn't affect fixed wing flying anymore. I disabled it for the
deltaquad since I presume @sanderux prefers to have the feature disabled
even when flying in multicopter mode.
AAs discussed in the devcall this functionality is only useful for
rotary-wing (multicopter) flying since it's a big safety hazard to
accidentally bring a fixed wing out of an auto mode e.g. a mission
and fly away in a straight line or into an obstacle.
NuttX 7.28 seemed to handle this gracefully, but officially passing NULL
results in undefined behavior, and with 7.29 leads to a hardfault.
This happens on configs with flash-based params, on the first unsuccessful
import attempt.
* Set/unset rcS vars at beginning and end of rcS script and reduce a few LOC checking SYS_AUTOCONFIG with improved logic.
* Restore current placement of set/unset vars in rcS script to leave only the SYS_AUTOCONFIG logic modification.
* Replace set AUTOCNF no after inadvertent deletion.
This is done to allow proper initialization of the new FlightTask and
give it a chance to continue the setpoints without discontinuity. The
function checkSetpoints replaces the setpoints containing NANs with an
estimate of the state. The estimate is usually the current estimate of
the EKF or zero.
The transition FlightTask also provides an estimate of the current
acceleration to properly initialize the next FlightTask after
back-transition. This avoid having to initialize the accelerations to
zero knowing that the actual acceleration is usually far from zero.