Commit Graph

26684 Commits

Author SHA1 Message Date
Willian Galvani
9c4d0f4680 GCS_MAVLink: update to use capacity_remaining_pct() as a bool 2022-01-03 11:40:48 -03:00
Willian Galvani
d422314020 AP_OSD: update to use capacity_remaining_pct() as a bool 2022-01-03 11:40:48 -03:00
Willian Galvani
20779ba47c AP_Notify: update to use capacity_remaining_pct() as a bool 2022-01-03 11:40:48 -03:00
Willian Galvani
206d047ab1 AP_BattMonitor_Backend: change capacity_remaining_pct() to a bool 2022-01-03 11:40:48 -03:00
Willian Galvani
d5130e1f0e AP_BattMonitor: change capacity_remaining_pct() to a bool 2022-01-03 11:40:48 -03:00
ES-Alexander
6bc314b67c Add pressure offset based on device P-mode 2022-01-03 11:40:48 -03:00
ES-Alexander
cb803a9aff Enable offset based on P-mode 2022-01-03 11:40:48 -03:00
ES-Alexander
520ce1a042 AP_LeakDetector: enable for Pixhawk4 2022-01-03 11:40:48 -03:00
Willian Galvani
c8fdd79d33 AP_LeakDetector: update leak pin for navigator r3 in metadata
follow-up to 397def7b9e
2022-01-03 11:40:48 -03:00
Willian Galvani
ff3e465863 AP_BattMonitor: add Navigator to pins metadata 2022-01-03 11:40:48 -03:00
Mingchen Zhang
83db4e56d0 AP_SmartAudio: fix a bug that would starve the lower priority thread, such as scripting. 2021-12-21 11:29:57 +11:00
Andrew Tridgell
8c09da0ee6 AC_AutoTune: limit autotune target rates to parameter limits
this makes it safer to autotune a large vehicle which may become
unstable at very high target rates
2021-12-21 11:29:57 +11:00
Andrew Tridgell
3233528e37 AC_AttitudeControl: added get_ang_vel_yaw_max_rads() 2021-12-21 11:29:57 +11:00
Andrew Tridgell
a1ede5d2a3 AP_NavEKF3: Add missing covariance row reset 2021-12-21 11:29:57 +11:00
Andrew Tridgell
fde9083d9c AP_InertialSensor: added support for IIM-42652 and ICM-40605 sensors
handle new Invensense v3 sensor types
2021-12-21 11:29:57 +11:00
Andrew Tridgell
65563ece66 AP_InertialSensor: added support for ICM-20608-D sensor 2021-12-21 11:29:57 +11:00
Andrew Tridgell
14ccee4991 AP_RCTelemetry: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-21 11:27:16 +11:00
Andrew Tridgell
0a018c323c AP_RangeFinder: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-21 11:27:16 +11:00
Andrew Tridgell
f516977491 AP_Proximity: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-21 11:27:16 +11:00
Andrew Tridgell
b79962f38e AP_ADSB: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-21 11:27:16 +11:00
Andrew Tridgell
a69cf0c936 AP_RCProtocol: fixed multi-protocol search with added uart 2021-12-21 11:27:16 +11:00
Andrew Tridgell
d8ffd01145 AP_SerialManager: added have_serial() method
this checks if we have the protocol without setting the options on the
uart
2021-12-21 11:27:16 +11:00
Andrew Tridgell
3dc4cdd6af AP_BoardConfig: disable STLink debug pins by default
this avoids leaving the debug pins in a state where they may be
vulnerable to ESD issues
2021-12-21 11:24:17 +11:00
Bill Geyer
bc29005308 AP_Motors: add spool down complete flag 2021-12-18 12:17:22 +09:00
Andrew Tridgell
9606527edd AP_UAVCAN: use soft armed state for DroneCAN ARMING_STATUS
this fixes motortest on quadplanes, so that ESCs see an armed state
during the test
2021-12-18 12:17:22 +09:00
Andrew Tridgell
ab4fb4a7de HAL_ChibiOS: use a 16 bit sysinterval_t on 16 bit timers
prevent mixed size subtraction errors
2021-12-18 12:17:22 +09:00
Peter Barker
c20b20ec17 AC_Fence: void index when overwriting fence count on fencepoint-close 2021-12-18 12:17:22 +09:00
Andrew Tridgell
09bc81e846 AC_Fence: fixed fence count for old upload
when uploading a fence that is smaller than an old fence we were not
correctly setting the inclusion fence size.
2021-12-18 12:17:22 +09:00
Andrew Tridgell
5fc3cae33a APM_Control: make 2nd reduction of P smaller
this prevents severe P reductions when we get a small oscillation
glitch after we've already got the primary P gain
2021-12-18 12:17:22 +09:00
李孟晓
0cdd775d24 CUAV-X7: Add servo voltage detection pin 2021-12-18 12:17:22 +09:00
Andrew Tridgell
349a035702 AP_AHRS: fixed switching airspeed sensor based on EKF3 affinity (for 4.1)
we need to use the EKF selected airspeed sensor when the EKF is setup
to run a different sensor on each lane
2021-12-18 12:17:22 +09:00
Andrew Tridgell
0ed40ffa8b AC_AttitudeControl: fixed limiting of throttle mix values
use constrain instead of reset to keep as much of user requested value
as possible

also raise limit for MIX_MIN to 0.5 after discussion with Leonard
2021-12-18 12:17:22 +09:00
Andrew Tridgell
d4d53abc49 RC_Channel: added QRTL mode on a switch 2021-12-18 12:17:22 +09:00
Andy Piper
039a556771 AP_Vehicle: correct update_dynamic_notch_at_specified_rate() 2021-11-29 19:02:38 +09:00
Andy Piper
944471bc30 AP_Vehicle: make sure notch update rate is configurable 2021-11-29 19:02:38 +09:00
Andy Piper
830130b8b6 Filter: set output slew rate to zero when max is zero. 2021-11-29 19:02:38 +09:00
Andy Piper
0c38b3f456 AC_AutoTune: set slew rate to 0 while twitching 2021-11-29 19:02:38 +09:00
Andy Piper
bac523976e AC_PID: add slew_rate modifier 2021-11-29 19:02:38 +09:00
Hwurzburg
2e24dfc731 AP_Motors: change H_COLL_HOVER to H_COL_HOVER for consistency 2021-11-29 19:02:38 +09:00
torsten
61b5d372c1 AP_FETtecOneWire: reset buf_used
if byte is missing due to electrical noise it can now resync
2021-11-29 19:02:38 +09:00
Dr.-Ing. Amilcar do Carmo Lucas
d4d2a779e8 AP_FETtecOneWire: Do not write to the UART buffer if the previous transfer did not complete yet
Required for stable operation on F4 processors
2021-11-29 19:02:38 +09:00
Andy Piper
db00de837a AP_HAL_ChibiOS: return correct value for tx_pending(). 2021-11-29 19:02:38 +09:00
Dr.-Ing. Amilcar do Carmo Lucas
cb81c23040 AP_HAL_ChibiOS: disable FETtec OneWire device driver 2021-11-29 19:02:38 +09:00
Dr.-Ing. Amilcar do Carmo Lucas
4fa548c86c AP_Arming: call fettec prearm checks 2021-11-29 19:02:38 +09:00
Peter Barker
1943938bc5 SITL: add simulated FETtec ESC 2021-11-29 19:02:38 +09:00
Peter Barker
443912ed9f AP_HAL_SITL: add simulated FETtec ESC
do not overwrite FETTecESC telemetry data w/SITL ESC data
2021-11-29 19:02:38 +09:00
Peter Barker
8cffcde7bd AP_Math: move crc8_dvb_update into crc library 2021-11-29 19:02:38 +09:00
Pierre Kancir
64091cf24c SRV_Channel: add FETtec support 2021-11-29 19:02:38 +09:00
Pierre Kancir
381945cc63 AP_SerialManager: add FETtecOneWire protocol 2021-11-29 19:02:38 +09:00
Torsten Z
b4f4ad7c01 AP_FETtecOneWire: A serial-based ESC protocol with telemetry
Co-authored-by: Torsten Z <t.zunker@fettec.net>
Co-authored-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>

- uses ArduPilot's coding guidelines and naming conventions
- control motor speed
- Use the AP_ESC_Telem base class to:
  - copy ESC telemetry data into MAVLink telemetry
  - save ESC telemetry data in dataflash logs
  - use RPM telemetry for dynamic notch filter frequencies
  - sum the current telemetry info from all ESCs and use it as virtual battery current monitor sensor
  - average the voltage telemetry info and use it as virtual battery voltage monitor sensor
  - average the temperature telemetry info and use it as virtual battery temperature monitor sensor
- Obey the safety switch. Keeps motors from turning
- Use `SERVO_FWT_MASK` to define which servo output should be routed to FETtec ESCs
- Use `SERVO_FWT_RVMASK` to define the rotation direction of the motors
  - `SERVO_FWT_RVMASK` changes only take effect when disarmed
- Can be compiled when `HAL_WITH_ESC_TELEM` is disabled. No telemetry data will be available but it saves a lot of memory
- pre-arm checks:
  - Check that UART is available
  - check that the desired motor channels parameter (`SERVO_FWT_MASK`) is valid
  - check that the desired motor poles parameter (`SERVO_FWT_POLES`) is valid
  - check that the all desired ESCs are found and configured
  - check that the ESCs are periodically sending telemetry data
- re-init and configure an ESC(s) if not armed (motors not spinning) when
  - telemetry communication with the ESC(s) is lost
- adds a serial simulator (--uartF=sim:fetteconewireesc) of FETtec OneWire ESCs
- adds autotest (using the simulator) to:
  - simulate telemetry voltage, current, temperature, RPM data using SITL internal variables
  - test the safety switch functionality
  - test ESC power outages
  - test `SERVO_FWT_MASK` parameter validation
  - fly a copter over a simulated serial link connection
2021-11-29 19:02:38 +09:00