Commit Graph

24147 Commits

Author SHA1 Message Date
Daniel Agar 98a9748bb8 drivers/dshot: use uORB::PublicationMulti for ORB_ID(esc_status)
- there can be multiple different outupt modules publishing esc_status (eg dshot & uavcan)
2022-01-14 12:17:49 -05:00
Daniel Agar 81ecd130fc uavcan: ESC publish esc_status in callback instead of timer
- this ensures every ESC status gets published with minimal latency
 - also prevents publishing ORB_ID(esc_status) when there's no actual
data (bug)
2022-01-14 12:17:49 -05:00
Roman Bapst dc6067ed12 Update src/modules/fw_att_control/fw_att_control_params.c
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-14 16:34:44 +03:00
RomanBapst 34bb671a73 improve parameter descriptions for fw maximum/minimum roll/pitch angles
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-01-14 16:34:44 +03:00
RomanBapst 555ee371e8 FixedWingPositionControl: consistently use the same roll and pitch angle
limits for autonomous and semi-autonomous modes (altitude & position control)

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2022-01-14 16:34:44 +03:00
Thomas Stastny f8c2ee73db handle line segment termination in navigator
- if following line segment (fixed-wing position control) switch waypoint when in acceptance radius OR passed the second waypoint. this handles the case of being beyond the second waypoint but not within the acceptance radius without the need to fly back to the waypoint (e.g. after a loiter up to waypoint alt)
- sync navigator and fw pos ctrl waypoint acceptance altitude
2022-01-13 13:43:02 +01:00
Claudio Micheli 8a01135a93 Commander: more changes to use events with escs and battery failures
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Claudio Micheli d122513197 extend support for Battery status message
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2022-01-13 08:40:34 +01:00
Daniel Agar bb1177d504 sensor_calibration: refactor and centralize calibration slot logic
- centralize logic for selecting a preferred calibration slot
   - automatically use existing calibration slot if it exists, otherwise
find first available slot, with a preference for a requested index
 - existing commander calibration methods rewrite all calibration slots
to match current sensor ordering
2022-01-12 16:16:26 -05:00
alexklimaj d1304e1ceb Add CANNODE_GPS_RTCM 2022-01-12 15:30:38 -05:00
Silvan Fuhrer 3cd1e0ce19 MCLandDetector: clean up logic for ground effect
Before: in_ground_effect was always true with the default settings (LNDMC_ALT_GND =-1)
 and when a distance sensor was present with valid data.
Now: default of LNDMC_ALT_GND is set to 2m by default, and if set to a negative value
then in_ground_effect is never set to true

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2022-01-12 18:41:16 +01:00
Matthias Grob 443406ea2b FlightTaskAuto: use longerThan() when possible in vector calculations 2022-01-12 15:12:24 +01:00
bresch 4fc7348582 mpc: leave room for altitude error control during descent and descent
Since the same parameter is used to generate the trajectory and to
saturate the controller, there is no additional space for the output of
the position controller once it is filled with the feedforward, letting
the altitude grow uncontrolled.
2022-01-12 13:33:48 +01:00
bresch ea7d2334c9 mpc: add parameter for ascent/descent speed in auto modes 2022-01-12 13:33:48 +01:00
Daniel Agar 2eec7842ae sensors/vehicle_imu: fix SENS_IMU_AUTOCAL saving logic
- on cycles that don't check for updated calibraton (estimated bias) we
check if there's anything valid to save (when disarmed)
2022-01-11 11:47:02 -05:00
romain-chiap 4e06b40e2b sih: add tailsitter support, disable UAVCAN 2022-01-11 08:29:19 +01:00
Julian Oes b3d830dd11 Mantis: move power off tune to commander
This way we don't allocate inside the interrupt context.
2022-01-10 23:04:10 -05:00
Julian Oes 73044c51f9 vmount: only send CONFIGURE cmd if type changes
We don't always have to send MOUNT_CONFIGURE but really only when the
control data type actually changes.
2022-01-10 23:04:10 -05:00
Julian Oes 22180a2639 mavlink: make range params optional
If there is no range sensor compiled in, these two params do not seem to
be available. Hence, we need to make them optional.
2022-01-10 23:04:10 -05:00
Julian Oes b44f5b49ca Mantis: add tap_esc to Kconfig 2022-01-10 23:04:10 -05:00
Julian Oes ca1fabf80a logger: add rate factor to slow logging down
This is required for the Mantis to reduce the log streaming rate.
2022-01-10 23:04:10 -05:00
Julian Oes c2e0e09b2d commander: reduce PWM max again
This is no longer required now.
2022-01-10 23:04:10 -05:00
Julian Oes e4763f15f6 Mantis: add RC hacks
This changes the way RC is handled for the Mantis:
- The RC values are re-written when arriving over MAVLink. They are
  rescaled from 0..4095 to 1000..2000 and the channel bits added to
  separate channels. This makes the downstream handling easier.
- Gimbal pitch is moved from Aux1 to Aux2 as that should be the default.
- Aux3 and Aux4 are used for the photo and video trigger.
- The speed button is used as the FLTMODE channel and set to switch
  between POSCTL and ALTCTL.
2022-01-10 23:04:10 -05:00
Julian Oes 9fe7a40673 manual_control: enable sending camera commands 2022-01-10 23:04:10 -05:00
Julian Oes 1754e25920 vmount: add param to use RC input for angular rate
Until now RC input was translated to angles only. I added the param
MNT_RC_IN_MODE which allows the RC input to be used for angular rate.
2022-01-10 23:04:10 -05:00
Julian Oes cb15728536 Mantis: save mission in RAM
This is using a reduced number of mission items of 1000 instead of 2000
in order to fit in RAM.
2022-01-10 23:04:10 -05:00
Julian Oes 880292f5d7 commander: relax RC min/max 2022-01-10 23:04:10 -05:00
Julian Oes aa007dadee commander: fix emergency power off
From what I can see the CONFIG_BOARDCTL_POWEROFF is not really used
anywhere, however, the BOARD_HAS_POWER_CONTROL is something that is set,
e.g. for the Mantis, to allow power off.
2022-01-10 23:04:10 -05:00
Julian Oes 6301fa35c1 commander: add command to power off 2022-01-10 23:04:10 -05:00
Julian Oes 860b23dd17 tunes: add tune to power off
This is used by the ATL Mantis EDU to help the user realize when the
drone is powered off.
2022-01-10 23:04:10 -05:00
Julian Oes a21fefda48 tune_control: prevent segfault 2022-01-10 23:04:10 -05:00
Julian Oes 76920171c7 tap_esc: fix tunes
This removes the redundant _play_tone flag and instead just polls the
next_note() interface to check if there is something to play.
2022-01-10 23:04:10 -05:00
Julian Oes dd00e43ca3 mavlink: set signal_quality (and sane variance)
Otherwise this distance data is actually not used at all.
2022-01-10 23:04:10 -05:00
Julian Oes aefbd80b53 mavlink: use optical flow limits from params
This makes more sense than hard-coding arbitrary values.
2022-01-10 23:04:10 -05:00
Julian Oes f48c3a2cc6 mavlink: don't handle RC_CHANNELS
This is a status/output but should not be an input for the autopilot.
Instead RC_CHANNELS_OVERRIDE should be used.
2022-01-10 23:04:10 -05:00
Daniel Agar cc1fee525a lib/sensor_calibration: handle calibration slot change on parameter update 2022-01-10 17:16:50 -05:00
Daniel Agar ab547bb982 sensors/vehicle_angular_velocity: RPM notch don't fully disable if first harmonic frequency drops below minimum frequency
- keep higher frequency harmonics enabled per ESC
 - cleanup timestamp handling (timeouts, etc)
2022-01-10 14:51:29 -05:00
Daniel Agar b58922a5d7 sensors/vehicle_angular_velocity: notch filters automatically reset on sufficient parameter change 2022-01-10 14:51:29 -05:00
Daniel Agar 7d632254be NotchFilter push initialization/reset into filter
- this simplifies the reset by allowing a notch filter to reset as
needed
 - improves cascade initialization, on reset each filter will reset
properly from the previous
2022-01-10 14:51:29 -05:00
Daniel Agar 2e2ac36cab drivers/uavcan: make firmware server available on both CAN1/CAN2 always (if enabled)
- uavcan firmware server no longer shuts down when arming (nodes might restart in flight)
 - always handle UAVCAN parameters with or without the FW server active
 - remove legacy ESC enumeration in FW server
2022-01-10 11:13:02 -05:00
Daniel Agar d9e7315420 sensors: automatically set initial accel/gyro calibration if stable bias available 2022-01-10 10:46:37 -05:00
Daniel Agar e731fcdbc0 sensors (accel/gyro/mag) determine if external with device id 2022-01-10 10:31:07 -05:00
Daniel Agar 45040be669 ekf2: accel/gyro/mag sensor cal minor cleanup
- cleanup obsolete comments
 - remove debug helpers
 - add additional variance requirements to mag bias stable (matching accel & gyro)
2022-01-10 09:55:59 -05:00
Daniel Agar c3ca40a98f drivers/px4io: delete monitor command
- the px4io console isn't even connected on most flight controllers
2022-01-10 09:51:11 -05:00
Daniel Agar e5d49f6fff drivers/px4io: delete unused detect 2022-01-10 09:51:11 -05:00
Daniel Agar d077ca15fb delete PWM_SERVO_SET, PWM_SERVO_SET_MODE, systemcmds/motor_ramp, and pwm_out test 2022-01-10 09:51:11 -05:00
Daniel Agar df44df2df6 delete systemcmds/esc_calib
- this is redundant with commander esc_calibration
2022-01-10 09:51:11 -05:00
Daniel Agar 03bdc460d8 drivers/px4io: PWM_SERVO_GET_FAILSAFE_PWM don't get registers directly 2022-01-10 09:51:11 -05:00
Daniel Agar d3301ba826 delete PWM_SERVO_GET_TRIM_PWM 2022-01-10 09:51:11 -05:00
Daniel Agar 8de59dad32 delete PWM_SERVO_SET_TERMINATION_FAILSAFE 2022-01-10 09:51:11 -05:00