if a user has set CAN_D1_UC_ESC_RV which is the mask of ESCs that are
reversible we were sending -8191 when disarmed, which is full reverse
throttle. This is the correct output when armed as it is treated as
full reverse at "PWM" 1000 and stopped at 1500, but when disarmed we
should always send zero or the user may find all ESCs spin up at full
reverse when disarmed if the ESC supports reverse throttle (which is
rare in DroneCAN ESCs)
the rate of CAN servo messages is controlled by the servo. Having this
streaming means we can miss logging when there is more than one CAN
servo.
In the future we will move to holding the CAN servo data in a data
structure like we do for ESCs, and then log at a regular rate, but for
now this fixes the issue
projecting onto an infinite plane can cause exceptionally long rangefinder distances - for now jsut cap the distance that the simulated rangefinder can return to avoid floating point exceptions.
the FPE is caused in the Plane FlyEachFrame autotest when flying quadplane-copter_tailsitter - which ends up with a rangefinder at yaw-minus-180.
The timeout specified for auxiliary driver frames was passed to the
driver where a deadline was expected. The transmission was then started
after its "deadline", thereby causing it to be canceled and the data
lost if the frame could not be sent immediately.
Fix by converting the timeout to a deadline before passing to the
driver. The conversion is done in the Canard interface code as it
already does other conversions from timeouts to deadlines.
- Refactor and split set_pitch_max_limit method.
- New _update_pitch_limits to encapsulate all relevant functionality.
- Automatically reset if pitch and throttle are overriden.
- nullified TAKEOFF alt_dem offset on external throttle.
- Simplify use of TKOFF_THR_MIN.
- Prevent takeoff altitude overshoot by capping the altitude setpoint offset.
- Move pitch limits after vertical acceleration limitation.
this replaces the two booleans used to mediate TX and RX buffer
protection with mutexes.
The booleans were a hangover from the very early HAL_ChibiOS code, and
can lead to a deadlock. The sequence is as follows:
- a very high CAN bus bandwidth usage, triggered by MissionPlanner
requesting CAN_FORWARD on a CAN serial port. That causes a
"infinite" number of CAN_FRAME messages which saturates the bus,
and leads to the DroneCAN thread looping with no pause
- a serial port configured as GPS type AUTO, auto-probing for a GPS
that isn't there. This calls begin() periodically
- the UART TX thread assocated with that UART not making progress as
the TX thread priority is below the DroneCAN thread priority
- this causes the begin() in main thread waiting for _in_tx_timer to
loop forever, which triggers a watchdog
This is also from the older version of the generator.
Note that as documented, some of the equations have been removed and
rearranged slightly as it is assumed their terms are zero. Additionally,
the result is taken as the sum of the diagonal entries of the matrix.
It's from the older version of the generator as well.
Update variable names in the real code to be the same as the generated
code. Skip generation of the unused alternate form of the equations.
Delete `acc_bf_generated.cpp` as we know exactly how to generate it now.
Requires digging up old versions of the generator script.
The equations have been rearranged somewhat after generation to choose
the appropriate method but they do match overall. The auto-substitution
of the power functions caused slight changes to the generated syntax so
we make those to the real code as well.
Delete `yaw_generated.cpp` as we know exactly how to generate it now.
Validated that the generated code matches exactly the code in AP_NavEKF3
(except for the early exits).
Delete `covariance_generated.cpp` as we know exactly how to generate it
now (and it was out of date anyway).
Document exactly which versions were used when generating the code.
Sympy is the most important so it is explicitly checked.
Also add an alternate generate script which uses `nix-shell` to make it
convenient to automatically use these versions.
Add a shell script to run the generate_1.py file. Foresight tells us
that we will need multiple such files.
Also ignore the generated code files as they are already out of date and
we are aiming to document provenance and make them unnecessary anyway.
- modification of CMakeLists to use new component names of idf 5.3;
- removing big sdkconfig, which changes a lot, when upgrading idf and to use sdkconfig.defaults, which contain only non default defines;
- Updated idf installation packages list, according to espressif documentation;
- Updated README.md to reflect changes in sdkconfig handling;
- Fixed WDT in Scheduler, it was broken with idf 5.3;
- fixed compilation issues with GCC 13 (which is used by idf 5.3);
- fixed bug in case when HAL_ESP32_WIFI defined as 0 (disable wifi)
- Added ESP32 targets sdkconfig (auto generated) to .gitignore