instead of the derivative of the vertical position which is
not the same value when using the ekf2 estimation.
Using the position derivative resulted in delayed landing because
the value for some reason often bumped over the theshold before
slowly converging towards zero while the velocity was within expected
accuary in all these cases.
Upstream changes defer the board reset based on the vaule of
CONFIG_BOARD_RESET_ON_ASSERT
0 (or not defined) Do not reset on assert
>= 1 reset if assertion is in an interrupt handler or the idle task
>= 2 on any asertion.
up_assert is called from up_hardfault or an asertion failure.
Part 1 of up_assert will call out to the board_crashdump
Part 2 on return from board_crashdump will then perform
the reset.
board_crashdump needs a chunk of ram to save the complete
context in. It uses &_sdata which is the lowest memory and
it will corrupt that memeory. We can therfore can not allow
return to the OS, as it could depend on that area of RAM.
So all boards need to do a reset at the end of board_crashdump
system_state.fmu_data_received_time can be set from an IRQ handler, thus
we need to ensure every read access to it in mixer_tick is atomic.
So we read it once and copy it into a local variable.
This call rarely needs to be truly atomic and the involved CPU overhead in making it atomic was unnecessary and introduces a lot of IRQ jitter with no value-add. The call has been moved to be non-atomic and the codebase will be inspected and changed in follow-up commits for the few instances where it is truly needed.
This avoids casting errors. An alternative to `std::round` would be to
add 0.5 before casting for positive values and subtract 0.5 before
casting for negative values.
- matrix in PX4/Firmware (31bd46d2ed700b2da9fc314e9b87d9b683a66606): 18fba8221c
- matrix current upstream: 6b0777d815
- Changes: 18fba8221c...6b0777d8156b0777d 2019-01-21 Daniel Agar - stdlib_imports cinttypes currently unavailable in NuttX toolchain (#79)