Commit Graph

27062 Commits

Author SHA1 Message Date
TunaLobster 7dd40f0cab AP_NavEKF2: Remove @RebootRequired: False 2021-08-19 10:00:16 +10:00
TunaLobster 642bd85306 AP_ICEngine: spelling and grammer fixes inc in param description 2021-08-19 10:00:16 +10:00
TunaLobster c0d484570c AP_EFI: Remove @RebootRequired: False 2021-08-19 10:00:16 +10:00
Peter Barker f465a9336e AP_Button: add debounce on PWM input
Co-authored-by: jmachuca77 <jaime@element.aero>
2021-08-18 18:47:28 +10:00
Peter Barker 5d49d29c27 AP_AHRS: move wind-estimation-enabled state to frontend 2021-08-18 18:37:39 +10:00
Peter Barker d2822635ca AP_VisualOdom: adjust for rename yaw_initialised -> dcm_yaw_initialised 2021-08-18 18:37:39 +10:00
Peter Barker 8daa0a099c AP_AHRS: rename yaw_initialised access method to dcm_yaw_initialised
This is what it really means.

Also put the relevant state within the DCM object
2021-08-18 18:37:39 +10:00
Iampete1 60e0f47918 AP_Arming: always check configured on copter and blimp 2021-08-18 18:30:51 +10:00
Peter Hall 2ec36d7f7f AP_Scripting: add quadplane in_assisted_flight binding 2021-08-18 18:07:20 +10:00
Peter Barker a91d30369e GCS_MAVLink: stop sending SENSOR_OFFSETS
Only works for first compass instance.

We have all of these in parameters anyway.
2021-08-18 18:06:24 +10:00
Andy Piper b78d848a5d AP_HAL_ChibiOS: add FlywooF745Nano board definition 2021-08-18 17:06:09 +10:00
Andy Piper 3790957d02 RC_Channel: add turtle mode docs 2021-08-18 10:49:13 +10:00
Andrew Tridgell 477f936560 SITL: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell 11afdb1ef2 AP_WindVane: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell 61d5910d0a AP_TECS: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell ab89a94d22 AP_Soaring: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell 0bdbdcec21 AP_RCProtocol: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell c0c32a63cc AP_IOMCU: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell d07bf97da6 AP_GyroFFT: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell 17b91903ed AP_Generator: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell de1e44c77e AP_Follow: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell 4faa16b0a7 AP_ExternalAHRS: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell 87ae238ea0 AP_EFI: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell ffe8add56d AP_Compass: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell 730f5cc7e8 AP_BoardConfig: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell a2790f57c0 AP_BattMonitor: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell c80a2c2ef6 AP_Baro: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell d9ee2b3c6c AC_AutoTune: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell 8acc093d1a AC_Autorotation: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell c99f9312db AC_AttitudeControl: mark logger Write() calls as streaming where appropriate 2021-08-18 10:20:03 +10:00
Andrew Tridgell 872cae6063 AP_Logger: fixed rate limiting of WriteV messages 2021-08-18 10:20:03 +10:00
Peter Hall 8e62385d8d RC_Channel: add lua helper 2021-08-17 11:01:00 +01:00
Peter Hall 5eee3c4eb0 AP_Scripting: add binding to get RC_Channel by number 2021-08-17 11:01:00 +01:00
Josh Henderson aaa8600d7b SITL: SIM_MS5611 fix D1&D2 when temperature compensated & forward_conversion check 2021-08-17 19:08:23 +10:00
Rishabh d9534d9526 AC_Precland: Add new parameter to descend only when close to target 2021-08-17 15:09:55 +09:00
Peter Barker 608608f32f AP_AHRS: internalise application of correct_centrifugal
This is a DCM-only option but that's not clear with the interface.
Internalise the variable and base it off build type.
2021-08-17 10:36:46 +10:00
Peter Barker fc6d8222e7 AP_DAL: move VehicleClass handling to AHRS frontend
.... and renaming the enumeration while we're at it
2021-08-17 10:34:07 +10:00
Peter Barker 1cfd9f57ce AP_AHRS: move VehicleClass handling to AHRS frontend
.... and renaming the enumeration while we're at it
2021-08-17 10:34:07 +10:00
Randy Mackay a1eb84ebfd AP_HAL_ChibiOS: swap Pixhawk4 blue and red LEDs 2021-08-17 10:13:39 +10:00
Andrew Tridgell 5c86cc6828 AP_NavEKF3: added EK3_PRIMARY parameter
allows for selection of which IMU to use on startup
2021-08-17 06:42:42 +10:00
Andrew Tridgell 25ee57080f AC_AttitudeControl: this fixes an issue with Z accel initialisation
tailsitter quadplanes were climbing a lot on transition from fixed
wing to Q modes. Leonard tracked it down to a bug in the Z accel init
2021-08-16 08:33:34 +10:00
Andrew Tridgell 9507f7883f SITL: prevent flip over of RF9 quadplanes on reboot
send a zero channel mask until we are initialised
2021-08-16 08:33:34 +10:00
Pierre Kancir aebe2beba5 AP_HAL_SITL: check that _sitl is not nullptr before using it 2021-08-14 10:20:33 +10:00
Pierre Kancir c91c570814 AP_HAL_SITL: don't use timer_event() that is static from the _scheduler instance 2021-08-14 10:20:33 +10:00
Hwurzburg 0d3b1d90b0 AP_OSD: fixes bug introduced by #16477 2021-08-14 10:17:42 +10:00
Dr.-Ing. Amilcar do Carmo Lucas a3d9a1d463 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-08-13 16:22:37 +10:00
Peter Barker ea7c7f9d19 AP_FETtecOneWire: complete rewrite of the ESC-configuration state machine
Co-authored-by: Dr.-Ing. Amilcar do Carmo Lucas <amilcar.lucas@iav.de>

tidy message sending using templates
Calculate and enforce the minimum update period.
Disable unused features to save flash
forced time gaps between all transmits
correct ESC reset functionality
Avoid re-initialization repeatition
Make sure we stop FETtec if safety is on (ignore reverse) this reduces duplicated code
Error count calculation changed
   as the telemetry error count is absolute only the overflow status can be safed and used for the percentage calculation
Update the README to add autotests information
FETtec needs a time gap between frames
  This allows running at high fast_loop_rates
do not send fast_throttle data if a configuration command just got sent
Example parameter configuration file is for a Quadcopter with ESCs connected to Telem2
remove two FIXME
fix compilation in master
Fix the ESC not re-initializing issue.
  Now we re-init whenever we loose connection
RVMASK parameter changes only take effect when not armed
Improve documentation
Always use the same wording when referring to fast-throttle commands
fix pre-arm check message
assure the length of the memmove is positive
Set HAL_AP_FETTEC_CONFIGURE_ESCS to 0 when no ESC hardware is available and you want to test the UART send function
2021-08-13 16:22:37 +10:00
Dr.-Ing. Amilcar do Carmo Lucas 1b7b705856 AP_FETtecOneWire: Convert into an ArduPilot device driver
Co-authored-by: Torsten Z <t.zunker@fettec.net>
    Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>

- use ArduPilot's coding guidelines and naming conventions
- control motor speed
- 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
- report telemetry communication error rate in the dataflash logs
- warn the user if there is a gap in the bitmask parameter.
- re-enumerate all ESCs if not armed (motors not spinning) when
  - there is a gap in their address space IDs
  - communication with one of the ESCs is lost
  - some of the configured ESCs are not found
  - some of the configured ESCs are not correctly configured
- allows the user to configure motor rotation direction per ESC (only gets updated if not armed)
- adds a serial simulator of FETtec OneWire ESCs
- adds autotest (using the simulator) to fly a copter over a simulated serial link connection
2021-08-13 16:22:37 +10:00
Dr.-Ing. Amilcar do Carmo Lucas 38a825c987 AP_HAL_ChibiOS: disable FETtec OneWire device driver 2021-08-13 16:22:37 +10:00
Peter Barker 2cf22112a2 AP_Arming: call fettec prearm checks 2021-08-13 16:22:37 +10:00
Peter Barker 97057a1350 SITL: add simulated FETtec ESC 2021-08-13 16:22:37 +10:00
Peter Barker 26f2393014 AP_HAL_SITL: add simulated FETtec ESC 2021-08-13 16:22:37 +10:00
Dr.-Ing. Amilcar do Carmo Lucas 72a69ec274 AP_ESC_Telem: implement get_active_esc_mask()
Co-authored-by: Peter Barker <pb-gh@barker.dropbear.id.au>
2021-08-13 16:22:37 +10:00
Peter Barker 2251e442cc AP_Math: move crc8_dvb_update into crc library 2021-08-13 16:22:37 +10:00
Pierre Kancir 2020fbaa26 SRV_Channel: add FETtec support 2021-08-13 16:22:37 +10:00
Pierre Kancir c1ad7253b6 AP_SerialManager: add FETtecOneWire protocol 2021-08-13 16:22:37 +10:00
Pierre Kancir 6346739466 AP_FETtecOneWire: Conversion to C++ and initial ArduPilot support 2021-08-13 16:22:37 +10:00
Torsten Z 35861ab616 AP_FETtecOneWire: Initial protocol implementation in C provided by FETtec 2021-08-13 16:22:37 +10:00
Scott Parlane 4d95a9d1c3 AP_InertialSensor: BMI160: Allow configuring the rotation 2021-08-13 12:32:28 +10:00
Scott Parlane 700edd241f AP_InertialSensor: BMI160: Make it possible to use I2C
The BMI160 chip talks the same protocol over SPI and I2C,
so simply allowing I2C in hwdef is sufficient to allow it to be used.
2021-08-13 12:32:28 +10:00
Scott Parlane 6554c535a1 AP_InertialSensor: BMI160: Remove linux-only restriction 2021-08-13 12:32:28 +10:00
Hwurzburg 400cf31df1 AP_Scripting: Add mission selection applet 2021-08-13 08:18:55 +10:00
Andy Piper b6ec06ac0f AP_Vehicle: output rcout banner when initialization is done
move down ready message
2021-08-12 19:07:51 +09:00
Andy Piper 68fd87091c AP_HAL_ChibiOS: output initializing from PWM banner when not available 2021-08-12 19:07:51 +09:00
Andy Piper b9598dac00 RC_Channel: add turtle mode to RC option 150 2021-08-12 19:00:51 +09:00
Andy Piper a51e58022f AP_HAL_ChibiOS: add accessor for reversed mask
allow mask updates to be disabled
send dshot commands even if armed - they will be accepted as long as throttle is at zero
only accept low-priority dshot commands while disarmed
apply reversed and reversible mask as servo channels
2021-08-12 19:00:51 +09:00
Andy Piper 09e0135ecb AP_HAL: add accessor for reversed mask
allow mask updates to be disabled
document mask types
define DSHOT_ZERO_THROTTLE
2021-08-12 19:00:51 +09:00
Andy Piper 5ece42bce0 RC_Channel: add turtle mode 2021-08-12 19:00:51 +09:00
Andy Piper 513aa592e4 AP_Motors: add accessors for turtle mode 2021-08-12 19:00:51 +09:00
Tom Pittenger 00cc8a4042 AP_BattMonitor: fix mppt sequence bug
closes https://github.com/ArduPilot/ardupilot/issues/18283
2021-08-12 14:37:04 +10:00
Pierre Kancir bff899e8f2 AP_OSD: check for nullptr before using it 2021-08-12 13:56:53 +10:00
Pierre Kancir 99456ba1f8 AP_Logger: fix MAVLink logger random failure on SITL
rand() return an int
2021-08-12 13:55:22 +10:00
Pierre Kancir 8216905f47 AP_NavEKF3: remove unecessary assignements 2021-08-12 10:39:49 +09:00
Pierre Kancir d95f503a32 AP_NavEKF2: remove unecessary assignements 2021-08-12 10:39:49 +09:00
Pierre Kancir adf86357aa AP_ESC_Telem: prevent possible overrun 2021-08-12 11:20:24 +10:00
Pierre Kancir 7739ddefd0 AP_ESC_TELEM: prevent overrun, esc_index should be < to ESC_TELEM_MAX_ESCS 2021-08-12 11:20:24 +10:00
Pierre Kancir a0175441a0 AP_ESC_Telem: fix out of bound access 2021-08-12 11:20:24 +10:00
Randy Mackay b399649c36 AP_Torqeedo: increase speed cmd at 50hz
under human control the tiller/battery only sends at 3hz but in testing it is capable of at least 50hz (but not as much as 100hz)
2021-08-12 10:54:36 +10:00
Peter Barker 29aed55a74 AP_AHRS: remove pointless zeroing of gyro_estimate vector
This value is assigned to in the following "if" block in both the for
and against cases, and isn't used to determine the new value.
2021-08-12 08:52:24 +10:00
Peter Barker 73bad9fd2d AP_AHRS: move fly_forward flag to front end
This same flag is requested by the DAL so AN_NavEKF2 and AP_NavEKF3 can
use it in their estimates - so AP_AHRS_DCM accessing it via the same
mechanism is not out-of-shape
2021-08-11 15:36:22 -07:00
bugobliterator 6bbfe35c73 AP_Logger: do not use AP_Scheduler for AP_Periph builds 2021-08-12 07:57:12 +10:00
Peter Barker 1db7e9e2e2 AP_NavEKF: log EKF data source set changes 2021-08-11 19:28:28 +09:00
Peter Barker 110d48e6fa AP_Logger: add events for changing EKF data source set changes 2021-08-11 19:28:28 +09:00
Peter Barker e9c56a2b0a AP_AHRS: move takeoff/touchdown flags to frontend 2021-08-11 18:45:34 +10:00
Pierre Kancir c19391d540 AP_Filesystem: correct file open flags for append 2021-08-11 18:43:53 +10:00
giacomo892 8da8b34b49 AP_OSD: Add option to disable Crosshair on horizon element 2021-08-11 18:42:11 +10:00
Hwurzburg 42128a70b8 RC_Channel: add CRUISE mode RC AUX Function switch 2021-08-11 18:35:05 +10:00
Leonard Hall ad2a152751 AP_Math: Spelling fix 2021-08-11 17:07:29 +09:00
Leonard Hall 71ccffd7c9 AC_AttitudeControl: AC_PosControl: support Control: Refactor to use Jerk 2021-08-11 17:07:29 +09:00
Leonard Hall a1b47f36ef AC_WPNav: support Control: Refactor to use Jerk 2021-08-11 17:07:29 +09:00
Leonard Hall 8961695369 AP_Math: Control: Refactor to use Jerk 2021-08-11 17:07:29 +09:00
Leonard Hall 3a8924c185 AP_Math: Control: protect against divide by zero 2021-08-11 17:07:29 +09:00
Leonard Hall 32b2510893 AC_WPNav: Fix Angle Vel units on function 2021-08-11 17:07:29 +09:00
Leonard Hall f57175a84f AC_AttitudeControl: Fix Angle Vel units on function 2021-08-11 17:07:29 +09:00
Pierre Kancir 0a922426a2 AP_Beacon: fix comparison order to prevent using wrong beacon_instance first 2021-08-11 15:17:08 +10:00
Pierre Kancir 4bccdada16 AC_Avoidance: do fence pointer check before using it 2021-08-11 13:43:23 +10:00
ES-Alexander 600df16604 Add pressure offset based on device P-mode 2021-08-10 18:30:04 -04:00
ES-Alexander 5fd32d3f36 Enable offset based on P-mode 2021-08-10 18:30:04 -04:00
Andrew Tridgell 4f4a0a02f6 AP_GPS: added doc message for bit 2 of DRV_OPTIONS 2021-08-10 10:54:14 +10:00
Andrew Tridgell 1479566921 AP_GPS: added GPS_DRV_OPTIONS bit for forcing ublox GPS to 115200
this may help with some GPS modules
2021-08-10 10:54:14 +10:00