Should remove the race condition where we disable an ESC but the vehicle
doesn't realise and lets the vehicle arm.
Also, waiting this long causes the ESCs to just go missing, not give a
telemetry failure
make sure the SERVO_FWT_MASK is valid:
- it can have bit gaps between active channels, but channels higher than 12 are not allowed (AP_EST_TELEM limitation)
- Explain that the FETtec ESC IDs inside the FETtec Firmware need to be contiguous and start at 1.
add tests for ESC power outages
add test that safety switch zeroes PWM for FETtec ESC
a gap in the beginning of the SERVO_FTW_MASK is now allowed, test it
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
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
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)
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