Commit Graph

48613 Commits

Author SHA1 Message Date
Torsten Z
db197c0068 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:57 +09:00
Andrew Tridgell
c939c735d2 Plane: prepare for 4.1.3 release 2021-11-29 19:02:57 +09:00
Andrew Tridgell
693762c8eb Plane: update release notes for 4.1.3 2021-11-29 19:02:57 +09:00
Andrew Tridgell
521c909ccc ChibiOS: fixed mkdir DMA for 4.1 2021-11-29 19:02:57 +09:00
Andrew Tridgell
983b5276ab Plane: suppress spurious EKF yaw reset message
this makes plane match copter, emitting a yaw reset event, but not
worrying user. This message came out on each boot when EKF3 first
became active
2021-11-29 19:02:57 +09:00
Andrew Tridgell
3a65df9bca hwdef: added alternative Durandal 20602 IMU 2021-11-29 19:02:57 +09:00
Andrew Tridgell
62144737fb Plane: enable fixed wing autotune switch 2021-11-29 19:02:57 +09:00
Andrew Tridgell
58a97a844e RC_Channel: added fixed wing autotune rc option 2021-11-29 19:02:57 +09:00
Andrew Tridgell
45907eb6c0 Plane: prepare for 4.1.3beta1 release 2021-11-29 19:02:57 +09:00
Andrew Tridgell
241d1adcf9 Plane: rename release-notes.txt to ReleaseNotes.txt 2021-11-29 19:02:57 +09:00
Andrew Tridgell
e2a978a86a Plane: update release notes for 4.1.3beta1 2021-11-29 19:02:57 +09:00
Andrew Tridgell
35de0855f3 Plane: allow for new guided destination during guided takeoff
if you set a very high alt for takeoff this is useful
2021-11-29 19:02:57 +09:00
Andrew Tridgell
76f4ead7c1 Plane: fixed overshoot in guided takeoff of quadplanes 2021-11-29 19:02:57 +09:00
Andrew Tridgell
0fc47d793a AP_ADSB: bugfix vertical velocity sign was backwards 2021-11-29 19:02:57 +09:00
Andrew Tridgell
bd441ef816 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-29 19:02:57 +09:00
Andrew Tridgell
6d4615ac7a Plane: default rate max to 75 for quadplane VTOL
this reduces overshoot when VTOL tune is less than ideal
2021-11-29 19:02:57 +09:00
Andrew Tridgell
1a33ca3ebe Plane: fixed a bug in POSITION1 speed thresholds (for plane 4.1)
we were comparing two different speeds in the threshold for going to
Q_WP_SPEED limit. The reason the two speeds were different was the
wp_nav init happened before the defaults were setup for quadplanes

this fixes both bugs
2021-11-29 19:02:57 +09:00
Andrew Tridgell
a7973b3e7a 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-29 19:02:57 +09:00
Mohammad Hefny
345607ec73 AP_Notify: link to notify module 2021-11-29 19:02:57 +09:00
Mohammad Hefny
72294648bf AP_Batt: link to battery monitor 2021-11-29 19:02:57 +09:00
Mohammad Hefny
71393942e0 AP_HAL_Linux: define board features on Linux module 2021-11-29 19:02:57 +09:00
Mohammad Hefny
c05e9507d0 AP_HAL: define board features 2021-11-29 19:02:57 +09:00
Andrew Tridgell
5f7f47d2b1 Tools: define obal board 2021-11-29 19:02:57 +09:00
Andrew Tridgell
34df214cae Plane: suppress rate D terms in ground mode
this prevents a common oscillation issue on the ground
2021-11-29 19:02:57 +09:00
Andrew Tridgell
b330a6b24e APM_Control: suppress roll/pitch D term in ground_mode
prevent oscillations which are quite common
2021-11-29 19:02:57 +09:00
Andrew Tridgell
17e646add9 Plane: avoid qpos approach when very close to destination
this prevents a fwd transition when doing something like LOITER_TIME
close to a VTOL_LAND wp. We use 1.5 times the stopping distance at
cruise airspeed for the threshold
2021-11-29 19:02:57 +09:00
Andrew Tridgell
9cb67adedb Plane: fixed VTOL state error when using Q_ENABLE=2
this ensures the poscontrol state is reset if it has not been
initialised before a VTOL loiter operation

thanks to Pete Hall for finding this
2021-11-29 19:02:57 +09:00
Samuel Tabor
cadd0b0232 ArduPlane: altitude: rangefinder correction should be relative to the altitude source being used for navigation. This avoid applying it twice when there is an existing correction saved. 2021-11-29 19:02:57 +09:00
Samuel Tabor
8f5264b3e7 AP_Landing_Slope: Log height used for flare timing. 2021-11-29 19:02:57 +09:00
Samuel Tabor
e6f9b1fd68 autotest: fly_mission should respect mission_timeout when waiting for wps. 2021-11-29 19:02:57 +09:00
Samuel Tabor
6b96160279 autotest: Add plane test for landing with barometer drift. 2021-11-29 19:02:57 +09:00
Iampete1
a073d6b447 Plane: Quadplane: allow scripting matrix frame class 2021-11-29 19:02:57 +09:00
Andrew Tridgell
3d415dc5cd Plane: prepare for 4.1.2 release 2021-11-29 19:02:57 +09:00
Andrew Tridgell
f13b0d335d Plane: update release notes for 4.1.2 2021-11-29 19:02:57 +09:00
Andrew Tridgell
00dbc23cc0 Plane: prepare for 4.1.2beta2 2021-11-29 19:02:57 +09:00
Andrew Tridgell
3d61b5084f Plane: update release notes for 4.1.2beta2 2021-11-29 19:02:57 +09:00
Randy Mackay
7b9f15d887 Rover: version to 4.1.1 2021-11-09 19:05:44 +09:00
Randy Mackay
fbad8c2e95 Rover: 4.1.1 release notes 2021-11-09 19:04:47 +09:00
Randy Mackay
69f0191c12 Copter: version to 4.1.1 2021-11-09 19:02:24 +09:00
Randy Mackay
063121f0fd Copter: 4.1.1 release notes 2021-11-09 19:02:22 +09:00
Andrew Tridgell
6250b57bf8 git: changed to https git protocol 2021-11-09 19:02:19 +09:00
Randy Mackay
cb07d219e4 Rover: version to 4.1.1-rc1 2021-10-18 18:06:45 -04:00
Randy Mackay
1e954ec405 Rover: 4.1.1-rc1 release notes 2021-10-18 18:06:45 -04:00
Randy Mackay
23734c9e0b Copter: version to 4.1.1-rc1 2021-10-18 18:06:45 -04:00
Randy Mackay
ff51491568 Copter: 4.1.1-rc1 release notes 2021-10-18 18:06:45 -04:00
Bill Geyer
2197152fb5 Copter: fix tradheli landing detector bug 2021-10-18 18:06:45 -04:00
Pierre Kancir
4bc70ce998 Copter: fix takeoff end report on EXTEND_STATE
regression from https://github.com/ArduPilot/ardupilot/pull/18700.
thanks to @arduouspilot on discuss to notice this, see https://discuss.ardupilot.org/t/extended-sys-state-never-changes-once-guided-takeoff-is-started/76996/3
2021-10-18 18:06:45 -04:00
Ben Wolsieffer
cb75e2a7e6 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-18 18:06:45 -04:00
Andrew Tridgell
ca753d4814 Plane: don't apply fw pitch limit in VTOL control for tailsitters
tailsitters may have narrow fixed wing limits but need high limits for
landing in high wind

found this on a HWing which was essentially impossible to auto land
2021-10-18 18:06:45 -04:00
Andrew Tridgell
8ea702ed81 AP_RCProtocol: check for RC protocol switching enable
by default don't allow protocol switching after initial protocol is
found
2021-10-18 18:06:45 -04:00