Commit Graph

26669 Commits

Author SHA1 Message Date
Andrew Tridgell
689e2ad003 AP_RCTelemetry: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-20 15:54:44 +11:00
Andrew Tridgell
b1a2063142 AP_RangeFinder: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-20 15:54:42 +11:00
Andrew Tridgell
5ec59d8a3e AP_Proximity: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-20 15:54:39 +11:00
Andrew Tridgell
46fcc0fdf3 AP_ADSB: use have_serial when detecting
avoid find_serial() as it changes port options
2021-12-20 15:54:37 +11:00
Andrew Tridgell
4ebece3dfd AP_RCProtocol: fixed multi-protocol search with added uart 2021-12-20 15:54:34 +11:00
Andrew Tridgell
c682b7deab AP_SerialManager: added have_serial() method
this checks if we have the protocol without setting the options on the
uart
2021-12-20 15:54:31 +11:00
Andrew Tridgell
664b55a49a AP_NavEKF3: Add missing covariance row reset 2021-12-20 09:30:14 +11:00
Andrew Tridgell
6ef5a9a909 AP_InertialSensor: added support for IIM-42652 and ICM-40605 sensors
handle new Invensense v3 sensor types
2021-12-17 13:59:42 +11:00
Andrew Tridgell
35f8c361b7 AP_InertialSensor: added support for ICM-20608-D sensor 2021-12-17 08:00:38 +11:00
Andrew Tridgell
6fc1049439 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-13 10:49:32 +11:00
Andy Piper
93ed8212ae AP_Vehicle: correct update_dynamic_notch_at_specified_rate() 2021-12-13 10:49:32 +11:00
Andy Piper
65017887d1 AP_Vehicle: make sure notch update rate is configurable 2021-12-13 10:49:32 +11:00
Andy Piper
9dd4314341 Filter: set output slew rate to zero when max is zero. 2021-12-13 10:49:32 +11:00
Andy Piper
20a509d771 AC_AutoTune: set slew rate to 0 while twitching 2021-12-13 10:49:32 +11:00
Andy Piper
8be3c4ab83 AC_PID: add slew_rate modifier 2021-12-13 10:49:32 +11:00
Hwurzburg
ef59ab143e AP_Motors: change H_COLL_HOVER to H_COL_HOVER for consistency 2021-12-13 10:49:32 +11:00
torsten
4c050f4f7e AP_FETtecOneWire: reset buf_used
if byte is missing due to electrical noise it can now resync
2021-12-13 10:49:32 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
800414a1d0 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-12-13 10:49:32 +11:00
Andy Piper
5591ea2530 AP_HAL_ChibiOS: return correct value for tx_pending(). 2021-12-13 10:49:32 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
765bf35703 AP_HAL_ChibiOS: disable FETtec OneWire device driver 2021-12-13 10:49:32 +11:00
Dr.-Ing. Amilcar do Carmo Lucas
0fe4a2573d AP_Arming: call fettec prearm checks 2021-12-13 10:49:32 +11:00
Peter Barker
ee4069921b SITL: add simulated FETtec ESC 2021-12-13 10:49:32 +11:00
Peter Barker
22809d1578 AP_HAL_SITL: add simulated FETtec ESC
do not overwrite FETTecESC telemetry data w/SITL ESC data
2021-12-13 10:49:32 +11:00
Peter Barker
bcea6fc806 AP_Math: move crc8_dvb_update into crc library 2021-12-13 10:49:32 +11:00
Pierre Kancir
ec4c4d0058 SRV_Channel: add FETtec support 2021-12-13 10:49:32 +11:00
Pierre Kancir
57ee2cb8d4 AP_SerialManager: add FETtecOneWire protocol 2021-12-13 10:49:32 +11:00
Torsten Z
2ca545a988 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-12-13 10:49:32 +11:00
Andrew Tridgell
5e4de872ac HAL_ChibiOS: use a 16 bit sysinterval_t on 16 bit timers
prevent mixed size subtraction errors
2021-12-13 10:49:32 +11:00
Peter Barker
559387c864 AC_Fence: void index when overwriting fence count on fencepoint-close 2021-12-13 10:49:32 +11:00
Andrew Tridgell
3a52bc29a3 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-13 10:49:32 +11:00
Andrew Tridgell
ce2d77dc39 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-11-25 15:00:12 +11:00
李孟晓
e99e0f941d CUAV-X7: Add servo voltage detection pin 2021-11-25 14:57:18 +11:00
Andrew Tridgell
6cf92b4726 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-11-25 14:52:17 +11:00
Andrew Tridgell
9defb72733 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-11-23 15:51:01 +11:00
Andrew Tridgell
157f4593da RC_Channel: added QRTL mode on a switch 2021-11-22 07:46:13 +11:00
Andrew Tridgell
28e5f255b7 hwdef: added alternative Durandal 20602 IMU 2021-11-11 08:29:39 +11:00
Andrew Tridgell
4e4a9083d4 RC_Channel: added fixed wing autotune rc option 2021-11-09 20:35:38 +11:00
Andrew Tridgell
bb60c7280c AP_ADSB: bugfix vertical velocity sign was backwards 2021-11-09 07:49:05 +11:00
Andrew Tridgell
cfbbeea1ec AP_NavEKF3: fixed switch to non-zero primary on disarm
if EK3_PRIMARY is not zero then we were not switching to it when
disarmed
2021-11-09 07:44:41 +11:00
Andrew Tridgell
9f5b91036c AP_UAVCAN: added CAN_Dn_UC_OPTION parameter
this allows for 2 ways of controlling conflicts in the UAVCAN DNA
database. The first is to set CAN_Dn_UC_OPTION to 1, which resets the
DNA database, thus clearing any node conflicts.

The second is to set CAN_Dn_UC_OPTION to 2, which ignores node
conflicts in the DNA database

These options are useful for vehicles with UAVCAN smart batteries
where the node ID is fixed but the hwid changes and you want to do
battery swapping (possibly without rebooting)
2021-11-03 05:51:27 +11:00
Mohammad Hefny
4d3dde9d30 AP_Notify: link to notify module 2021-11-01 10:51:58 +11:00
Mohammad Hefny
316a0e3d11 AP_Batt: link to battery monitor 2021-11-01 10:51:58 +11:00
Mohammad Hefny
ffa8412df5 AP_HAL_Linux: define board features on Linux module 2021-11-01 10:51:58 +11:00
Mohammad Hefny
565b6f5ef9 AP_HAL: define board features 2021-11-01 10:51:58 +11:00
Andrew Tridgell
0404b7cb4f APM_Control: suppress roll/pitch D term in ground_mode
prevent oscillations which are quite common
2021-10-30 18:49:34 +11:00
Samuel Tabor
ab74913c83 AP_Landing_Slope: Log height used for flare timing. 2021-10-26 10:49:00 +11:00
Ben Wolsieffer
1d634cc2be AP_Control: apply pitch rate limit to turn coordination
At high bank angles, for example when rolling to/from inverted, a large turn
coordination pitch rate offset is requested. Before this patch, this offset was
not subject to the configured pitch rate limit, which could result in pitch
controller integrator windup.
2021-10-16 19:52:45 +11:00
Andrew Tridgell
5cc1345ca5 AP_RCProtocol: check for RC protocol switching enable
by default don't allow protocol switching after initial protocol is
found
2021-10-16 19:52:45 +11:00
Andrew Tridgell
3812469b33 RC_Channel: added RC_OPTION bit for allowing RC protocol switching
this is meant to prevent accidential switching to a disconnected pin
2021-10-16 19:52:45 +11:00
bugobliterator
874a610255 AP_HAL_ChibiOS: account for TXFIFO when doing flow control detection 2021-10-15 20:01:25 +11:00