The existing behavior is unexpected: if the work item is already on the
runnable queue, it will still be triggered after a call to ScheduleClear().
This can lead to race conditions.
- reduce CPU load
- fix earth rate gyro compensation
- make test with clang
- use switch statements in controlHeightFusion
Diff:
3fa5f501ae..230c865fa9
The implementation before this change had two timeouts, a hard-coded
timeout of 0.5 seconds as well as a by param configurable timeout with
certain failsafe actions set.
This change aims to fix two problems:
1. The hard-coded offboard timeout can be triggered easily with sped up
lockstep simulation. Since i t is hard-coded it can't be adapted to
the speed factor.
2. The offboard signal can time out but no action will be taken just
yet. This means we end up in an in-between stage where no warning or
failsafe action has happened yet, even though certain flags are set
to a timeout state.
This patch aims to fix this by unifying the two timeouts to the existing
configurable param. The convoluted double timeout logic is replaced by a
simple hysteresis.
For anyone that has previously not changed the default timeout param (0),
the param will now be changed to 0.5 seconds which reflects the
previously hardcoded time. For anyone with a specific timeout
configured, the behaviour should remain the same.
Also, going forward, timeouts lower than 0.5 seconds should be possible.
- nuttx in PX4/Firmware (b7a83e23c5e50896bb137266cf89ff928dfaae42): d509b1edd7
- nuttx current upstream: bf646dcf46
- Changes: d509b1edd7...bf646dcf46
bf646dcf46 2020-03-03 Daniel Agar - [BACKPORT] stm32h7: spi_exchange (no dma) available with CONFIG_STM32H7_SPI_DMATHRESHOLD
f2a7ef0ade 2020-03-03 Daniel Agar - [BACKPORT] stm32f7: spi_exchange (no dma) available with CONFIG_STM32F7_SPI_DMATHRESHOLD
7ffc59ba3d 2020-03-03 Daniel Agar - [BACKPORT] stm32: spi_exchange (no dma) available with CONFIG_STM32_SPI_DMATHRESHOLD
d1c8fdb5fb 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32h7 add STM32H7_SPI_DMATHRESHOLD
fa8d636118 2020-03-02 Daniel Agar - [BACKPORT] stm32f76xx77xx_dma.h fix DMAMAP_SPI2_RX_2/DMAMAP_SPI2_TX_2
762d80b217 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32f7 add STM32F7_SPI_DMATHRESHOLD
4f4bbbbf1c 2020-03-02 Daniel Agar - [BACKPORT] arm/stm32 add STM32_SPI_DMATHRESHOLD
Co-authored-by: PX4 Build Bot <bot@px4.io>
When lockstep is enabled and LPE is not running, the
attitude_estimator_q needs to publish ekf2_timestamps in order to signal
to the simulator module that it has fully run.
This essentially fixes flying in lockstep when SYS_MC_EST_GROUP is 3.