This allows PWM and all other output methods to configure
stopped, idling and full thrust points and use them consistently.
The fact that a fixed wing motor can be stopped when zero thrust
is demanded is explicit and could in principle even be disabled.
The mechanism is the same as for a standard VTOL stopping the
multicopter motors in the fixed wing flight phase.
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.
This is required to process data from the ADS1115 ADC and enables the
params BATx_I_CHANNEL and BATx_V_CHANNEL.
Testing is required whether this actually works on Pixhawk 6X though.
Signed-off-by: Julian Oes <julian@oes.ch>
When switching into Hold mode establish a Loiter around current position,
even if we were before already loitering (eg in Mission mode).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
5s is a more reasobale time for tailsitters, which rely differently on this param
than other VTOL types. Tailsitters will ramp the pitch up withing this time,
while for other VTOLS types its only the max transitiont time.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This is now using the advanced lift drag plugin.
The important step was to enable airmode for yaw, otherwise yaw gets
saturated at low throttle and we can barely roll.
The other trick was to raise airspeed a little bit to avoid operating
too much at the lower end of throttle where control authority is low.
Signed-off-by: Julian Oes <julian@oes.ch>
* uavcan rtcm set max num injections
* Subscribe to all instances of gps_inject_data and mirror uavcan rtcm pub mirror gps driver
* Minor logic refactor in gps and uavcan gps inject data
Before this the ESC calibration aborts if battery detection doesn't work.
The problem is if the user still connects the battery as he gets instructed
and the calibration aborts then the ESCs are in calibration mode and
after abortion calibrate to the wrong value.
Also I realized there's no additional safety by aborting the calibration
if the battery cannot be detected during the timeout because a pixhawk
board without power module will report a battery status from the
ADC driverand in it that no battery is connected which is the best
it can do. In this situation the motors will still spin if the
ESCs are powered.
Some ESCs e.g. Gaui enter the menu relatively quickly if the
signal is high for too long. To solve that it's kept high shorter.
Also all tested ESCs detect the low signal within a shorter time
so no need to wait longer.
- Change timings for a more reliable calibration.
- Make sure there's an error message when battery measurement is not
available also when it gets disabled after system boot in the power
just above the calibration button.
- Safety check if measured electrical current goes up after issuing the
high calibration value for the case the user did not unplug power
and the detection either fails or is not enforced.
This adds support for the TI LP5562 RGB LED driver.
Things to note:
- The driver is initialized in simple PWM mode using its internal clock,
for R,G,B, but not for W(hite).
- The chip doesn't have a WHO_AM_I or DEVICE_ID register to check.
Instead we read the W_CURRENT register that we're generally not using
and therefore doesn't get changed.
- The current is left at the default 17.5 mA but could be changed using
the command line argument.
Datasheet:
https://www.ti.com/lit/ds/symlink/lp5562.pdf
Signed-off-by: Julian Oes <julian@oes.ch>
The entire logic did not work for the case when the throttle channel is
reversed because then QGC sets trim = max for that channel and
the result is only half the throttle range.
set_vtol_transition_item sets the params of the mission item directly
to values that make sense for NAV_CMD_DO_VTOL_TRANSITION, but don't
for other NAV_CMDs. So make sure that whenever we use it, we then in
the next step reset the touched mission_item fields.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* refactored uncommanded descend quadchute
- use fixed altitude error threshold
- compute error relative to higest altitude the vehicle has achieved
since it has flown below the altitude reference (setpoint)
* disabled altitude loss quadchute by default
* altitude loss quadchute: added protection against invalid local z
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
- re-enable once the estimator selector respects configured mag
priority (at least initially) or is otherwise able to automatically
prefer an external mag over internal
- for SITL disabled because the full matrix of esitmator instances
(IMUs X mags) was too many topics for logger currently