Dataman: Add write function to dataman cache.
RTL and mission have a new common base class mission_base. Both inherit from them and mission, RTL mission, and rtl reverse mission inherit from them and implement their desired functionalities. This simplifies the logic in mission as well as make the logic in rtl mission reverse and mission more readable.
Rtl mission reverse now functional again for VTOL flying back the mission and transitioning to MC at the home position.
Dataman cache has new write functionality to write to dataman while updating write item in its cache if necessary.
Dataman cache is now only updated when the respective module is active. Leads to a higher computation time once on activation, but decreases unnecessary cache updates when inactive.
Events have a global, system-wide sequence number, which must be handled
atomically, (fetching and incrementing the sequence AND sending the event
to uORB must be atomic). Currently in FLAT mode, only one instance of this
sequence number exists, so it is OK to have it in px4_platform.
However, in PROTECTED mode px4_platform is instantiated both in kernel-
and user spaces, which makes two instances of this sequence number, which
causes problems in the mavlink event handling logic.
When mavlink receives and handles events, it expects that:
- The sequence numbers arrive in order (seq n is followed by n+1 etc)
- It increments by 1
- There is only one instance of the sequence number
In PROTECTED mode this is violated, as the kernel and user sequence
numbers run freely on their own. This patch fixes the issue by moving
the event backend to the kernel and by providing user access to it via
ioctl.
but this time compared to
2fbb70d9ca94f442de1345221be18ba738cda952
the minimum thrust is ramping to not produce a thrust jump.
The better long term solution will be to always have airmode but
with the effect limited to a magnitude of MPC_MANTHR_MIN.
- Enable arbitrary euler angle for Mag rotation
- new CUSTOM rotation enum out of the normal enum range
- mag_rot: automatically change to custom if euler rot is set
- sensor_calibration: Magnetometer save custom rotation parameters
- mag_cal: cross mention rotation parameters
- This allows the user to see the RPY options when searching for the rotation parameter
---------
Co-authored-by: Junwoo Hwang <junwoo@auterion.com>
Co-authored-by: bresch <[brescianimathieu@gmail.com](mailto:brescianimathieu@gmail.com)>
Co-authored-by: Daniel Agar <daniel@agar.ca>
Fix a memory overflow in case SENS_BOARD_ROT is set to Rotation::ROTATION_MAX (41) which is not a valid value
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
- since last_us is set to 0 every time the bias is not observable, the
total time was also reset -> needed 30 consecutive seconds in mag 3D
to be declared "stable"
- after landing, the mag_aligned_in_flight flag is reset. Using this for
bias validity makes it invalid before we have a chance to save it to
the calibration.
This allows to consistently define:
Motor stopped - disarmed PWM
Motor idling - minimum PWM
Motor at full thrust - maximum PWM
Any allocation can then distinctly decide if
a motor should be running or not depending
on the context and also explicitly command that.
That state only delayed the first arming by 50 miliseconds.
Was presumably a workaround for some issue very very early on.
See cc452834c0dabd2689f5f102ce1cbbe714f056dd
Before:
When the mixed throttle for the motor was exactly zero the ramp went
from the disarmed PWM value to the minimum PWM value.
When the throttle was even just slightly different from zero the ramp
made a jump up to the commanded throttle scaled between
disarmed PWM and maximum PWM, then ramped between
disarmed PWM and minimum PWM and at the end jumped up again to
the commanded throttle scaled between minimum PWM and maximum PWM.
After:
The ramp goes from disarmed PWM value to the the
commanded throttle scaled between minimum PWM and maximum PWM.
If the commanded throttle changes during the ramp then the scale and
hence also end value of the ramp changes.