When user override using the RC sticks is allowed, I would expect this
feature to also work in the case where GPS is lost and the vehicle goes
into a blind land/descent.
Without this commit, the vehicle would switch to Land mode and a pilot
could not take over control unless they switch to Altitude control in
a ground station.
With this commit, user override works as I would expect it and it will
switch to Altitude control allowing a pilot to recover in this
situation.
This fixes a tricky bug that we discovered in MAVSDK:
https://github.com/mavlink/MAVSDK/pull/1464
It turns out the target_system and target_component fields can
potentially be:
1. at the end of a message payload,
2. and zero,
and therefore they get trimmed. When you then try to read it you
potentially read some garbage from the CRC fields.
The hrt_abstime value used to control the 1s pub rate was the value of
the timestamp_usec of the CanardTransfer, which has a timeout of 100ms
added to it.
Since hrt_abstime is an unsigned datatype, if the hrt_elapsed_time()
check was called <100ms apart, the negative value would result in a
large hrt_elapsed_time, and the bus would be spammed with Heartbeat
messages (or error messages from canardTxPush).
This logic was introduced to avoid large altitude drifts in velocity
mode (altitude not controlled) due to potential velocity estimate bias
in case of IMU problems (see PR #8445). After some refactorings,
the logic started to be used in altitude-controlled modes as well, which is not needed.
* Update to use libcanard callback
Reworked param system with lambda
* Use callback instead of lambda saves 500 bytes of flash
* [UAVCANv1] Added ServiceRequest class, subscribers decoupled
* PX4 UAVCANv1 portID param default CANARD_PORT_ID_UNSET (65535U)
* [UAVCANv1] uORB sensor_gps modify timestamp for now untill we've got timesync working
* UAVCANv1 update parameter definition to use -1 as unset
- avoids tecs always climbing and sinking and max rates and allows to fine tune these rates
- avoid numerical calculation of feedforward velocity using derivative, this
was prone to jitter in dt
Signed-off-by: RomanBapst <bapstroman@gmail.com>