There were accidents because when missions lead through an obstacle
and it should be avoided but the setpoints from the external obstacle
avoidance module are suddenly missing the mission is continued into the
obstacle which results in a crash.
Device port can be set via SENS_EN_CM8JL65 parameter:
SENS_EN_CM8JL65 = 0 -> Disabled
SENS_EN_CM8JL65 = 1 -> Enabled on TELEM2
SENS_EN_CM8JL65 = 2 -> Enabled on TELEM1
Signed-off-by: Claudio Micheli <claudio@auterion.com>
First "stable" version of the driver.
TODO: - Cleanup the code
- Bench test (compare data with IMU)
- Flight Test
Signed-off-by: Claudio Micheli <claudio@auterion.com>
Serial is now cycled with work_queue rescheduling if some bytes are missing.
TODO: - Fix occasional sensor spikes (can be identified with crc)
- Clean up the code
- disable debug printf
Signed-off-by: Claudio Micheli <claudio@auterion.com>
In 5bb9babc20 I made MAVLink send a
rounded up integer instead of rounded down. This makes sense in practice
because the low battery reactions happen exactly when the reported number
switches in the UI. But here we want to provoke an exact 50% in the UI so
we stop counting at 49.9%, it get's rounded up and we see the expected
result.
In 3e6e1f5c2b the simulated battery
percentage was reversed. I'm assuming because of the possibly
missleading variable name. Now I'm fixing it by switching the
maximum and minimum voltage such that the name is not misleading anymore
but it still works as expected.
* removed bus options that were essentially duplicates, causing hardfaults if attempting to start an already running driver. Changed NULL to nullptr. Removed bus options that were unused
* removed condition from if statement that was unnecessary
* fixed style
- use a linked-list instead of std::vector. Insertion and removal are now
O(1)
- avoid malloc and use a thread_local instance of TimedWait.
It gets destroyed when the thread exits, so we have to add protection
in case a thread exits too quickly. This in turn requires a fix to the
unit-tests.
* We have RAM problems and can't afford 4 mavlink instances. This only adds logic the rc.board for the fmu-v4 that only has an effect for SYS_AUTOSTART = 4250 (TealOne airframe).