Commit Graph

16448 Commits

Author SHA1 Message Date
Andrew Tridgell
7286ffab77 HAL_ChibiOS: define FLASH_LOAD_ADDRESS in hwdef.h
used for bootloader support
2018-04-12 11:50:44 +10:00
Andrew Tridgell
e4ce2f532b HAL_ChibiOS: make smaller builds possible
this allows for much smaller builds when you disable a lot of
options. This is part of an effort to create a bootloader of less than
16k using ChibiOS
2018-04-12 11:50:44 +10:00
Andrew Tridgell
ea2dc9b831 AP_InertialSensor: added OMNIBUSF7V2 INS sensors
a dual-IMU board
2018-04-12 11:50:44 +10:00
Andrew Tridgell
943e433be6 AP_HAL: added device name for bmp280 for ChibiOS 2018-04-12 11:50:44 +10:00
Andrew Tridgell
ef9d9d9c26 HAL_ChibiOS: first boot of OMNIBUSF7V2
only the 20608 works, and it has lots of errors.
The bmp280 is detected, but does not give good data
no UARTs yet
2018-04-12 11:50:44 +10:00
Andrew Tridgell
02f20b4114 HAL_ChibiOS: first version of OMNIBUSF7V2 board support
first F7 based board
2018-04-12 11:50:44 +10:00
Andrew Tridgell
a9edbb6b2d HAL_ChibiOS: allow for a defaults.parm file in hwdef directory
this keeps defaults with the board, where that is appropriate
2018-04-12 11:50:44 +10:00
Andrew Tridgell
6e5cbc7c3d HAL_ChibiOS: initial support for F745 boards 2018-04-12 11:50:44 +10:00
Andrew Tridgell
551dca63e1 HAL_ChibiOS: added build information for each MCU
this abstracts the build information for each MCU, so that hwdef.dat
can control the build process of ChibiOS
2018-04-12 11:50:44 +10:00
Andrew Tridgell
d1e4185817 HAL_ChibiOS: don't build flash.c if not needed 2018-04-12 11:50:44 +10:00
Andrew Tridgell
cdbbceb6b6 HAL_ChibiOS: cope with SDMMC peripheral for microSD 2018-04-12 11:50:44 +10:00
Michael du Breuil
ca28a01bbf PID: Remove examples/keywords
This was needed to accomplish the RC_Channels changeover, and the PID
library is on it's way out of the system so removal of examples rather
then maintainance made more sense.
2018-04-11 21:47:07 +01:00
Michael du Breuil
6e9e9dcdfa GCS_MAVlink: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Michael du Breuil
ae193f28ae DataFlash: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Michael du Breuil
523882bffc AP_Tuning: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Michael du Breuil
b757354c88 AP_Soaring: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Michael du Breuil
70b1eb9836 AP_RSSI: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Michael du Breuil
ddd32d3339 AP_ICEngine: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Michael du Breuil
5d84850f32 AC_PID: Use RC_Channels instead of hal.rcin 2018-04-11 21:47:07 +01:00
Michael du Breuil
a6afc69c13 RC_Channel: Support most hal.rcin functions in RC_Channels 2018-04-11 21:47:07 +01:00
Andrew Tridgell
751024f483 HAL_ChibiOS: mark two skyviper builds as needing abin files 2018-04-11 15:09:49 +10:00
night-ghost
677f2bebc3 AP_Compass: added autodetect of all known compasses on external bus 2018-04-11 15:00:36 +10:00
night-ghost
33bdc9196c AP_Baro: added autodetection of popular baro types on external bus 2018-04-11 15:00:36 +10:00
night-ghost
f26bb0cfbe AP_Compass: added range filter to backend, added its use in some sensors (thanks khancyr for style correction) 2018-04-11 14:46:42 +10:00
night-ghost
cb8a34f784 AP_Baro: added range filter to backend, use it in most sensors (thanks khancyr for style correction) 2018-04-11 14:46:42 +10:00
Michael du Breuil
ac9d5f8a5c AP_NavEKF: Make the status unions use bool, add static asserts 2018-04-11 09:47:43 +09:00
Michael du Breuil
37df0c20eb AP_Rally: Remove stale comment, and unneded define check 2018-04-11 09:45:45 +09:00
Randy Mackay
d9fe7b7105 AC_Sprayer: formatting fixes
non-functional change
2018-04-11 09:41:33 +09:00
Pierre Kancir
c2e546285c AC_Sprayer: replace AP_InertialNav with AHRS 2018-04-11 09:41:33 +09:00
Andrew Tridgell
2b49a3ab7b DataFlash: fix up logging on ChibiOS after change for F4Light 2018-04-11 10:13:08 +10:00
night-ghost
1ad6de1e80 HAL_F4Light: updated OSD submodule 2018-04-11 10:13:08 +10:00
night-ghost
677fc1875b HAL_F4Light: some modes disabled by default 2018-04-11 10:13:08 +10:00
night-ghost
aaea0e121b HAL_F4light: fixed parameters for AirbotF4 board 2018-04-11 10:13:08 +10:00
night-ghost
2a0f624d5a DataFlash: fixed F4Light DataFlash logging 2018-04-11 10:13:08 +10:00
Pierre Kancir
79cd137625 AP_Common: remove AP_AHRS_NavEKF include from location class 2018-04-11 08:59:50 +09:00
Michael du Breuil
a1845783b5 AP_RSSI: Make the RSSI library an enable param tree 2018-04-10 17:29:32 +01:00
Michael du Breuil
362fb470c4 AP_GPS: Allow HIL_GPS to flag vertical velocity
Closes #7997
2018-04-10 17:01:21 +01:00
Mark Whitehorn
7ad0318d4f AP_HAL_Linux: fix latent bug in ToneAlarm 2018-04-10 21:48:16 +10:00
Mark Whitehorn
960e217e79 AP_HAL_Chibios: fix latent bug in ToneAlarm 2018-04-10 21:48:16 +10:00
Peter Barker
0c14a309f7 AP_Proximity: correct debugginf for RPLidarA2 2018-04-10 16:25:54 +09:00
Andrew Tridgell
f2df171fdd HAL_ChibiOS: fixed DSM input on fmuv4 2018-04-10 17:22:21 +10:00
Andrew Tridgell
bccea9c8b9 AP_RCProtocol: support DSM bind 2018-04-10 17:22:21 +10:00
Andrew Tridgell
f788cde5c7 AP_InertialSensor: use multiply for fifo scale factors
this fixes issue from #8118 too
2018-04-10 14:17:16 +10:00
Peter Barker
8027883734 DataFlash: remove vestiges of CLI functions 2018-04-10 10:27:08 +09:00
Andrew Tridgell
d777da970b AP_Baro: fixed multi-baro logging 2018-04-09 11:39:20 -07:00
Andrew Tridgell
a2351bf99f AP_BLHeli: log bad telem CRCs 2018-04-09 15:32:04 +10:00
Andrew Tridgell
96cc657bd0 HAL_ChibiOS: fixed GPIO interrupt port mapping 2018-04-09 15:32:04 +10:00
Andrew Tridgell
0f2a7108d3 AP_BLHeli: added SERVO_BLH_OTYPE
this allows use of BLHeli telemetry on rover, sub and on quadplane fwd
motors
2018-04-09 15:32:04 +10:00
Andrew Tridgell
3b4d1d5d46 DataFlash: enabled POWR log msg on ChibiOS 2018-04-09 15:32:04 +10:00
Andrew Tridgell
b4aeffbaed HAL_ChibiOS: added power status flags reporting 2018-04-09 15:32:04 +10:00
Andrew Tridgell
7c85d06600 HAL_ChibiOS: setup pwm counts, and cleanup mindpx-v2 PWM lines 2018-04-09 15:32:04 +10:00
Andrew Tridgell
1b9cebc3f2 HAL_ChibiOS: check pwm count in rcout init 2018-04-09 15:32:04 +10:00
Andrew Tridgell
13cf72ac32 AP_BoardConfig: allow override of PWM count in hwdef.dat 2018-04-09 15:32:04 +10:00
Andrew Tridgell
a7711ab9f7 AP_HAL: don't require GPIO defines for RCOU serial on ChibiOS 2018-04-09 15:32:04 +10:00
Andrew Tridgell
68293c9c11 HAL_ChibiOS: don't require GPIO() markers on PWM outputs
this fixes blheli pass-thru on MindPX-v2
2018-04-09 15:32:04 +10:00
Peter Barker
face8151b7 AP_Compass: include required header 2018-04-09 11:34:35 +10:00
Peter Barker
a0d874baa2 AP_NavEKF3: const accessors 2018-04-07 09:56:18 +09:00
Peter Barker
6791808ac6 AP_NavEKF3: remove unneeded initialisations
AP_NavEKF3 should never be allocated in uninitialised memory
2018-04-07 09:54:21 +09:00
Peter Barker
d38ff1dd2c AP_NavEKF3: initialise EKF3 constants in declaration not constructor 2018-04-07 09:54:21 +09:00
Andrew Tridgell
eb6c852ee3 HAL_ChibiOS: use simpler pullup on serial input
this maps to the right bits for each MCU type
2018-04-07 09:10:29 +10:00
Andrew Tridgell
71cd58cc7e HAL_ChibiOS: run rc serial thread at top priority
this maximises reliability for serial IO to ESCs, increasing flashing
reliability
2018-04-07 09:10:29 +10:00
Andrew Tridgell
4a7a66cc16 AP_IOMCU: use a higher thread priority
this ensures PWM output gets out as fast as possible
2018-04-07 09:10:29 +10:00
Andrew Tridgell
84d76cf915 AP_BLHeli: removed special handling of oneshot125 2018-04-07 09:10:29 +10:00
Andrew Tridgell
3cd4f2a002 AP_ChibiOS: handle oneshot125 separately
this sets up oneshot125 with the full 1000 steps of throttle
resolution, using a 8MHz clock. This matches the behaviour of modern
ESCs that measure PWM values with high accuracy
2018-04-07 09:10:29 +10:00
Andrew Tridgell
819de4acd5 AP_Motors: don't scale oneshot125 in AP_Motors
handle it in the HAL backends, to allow for correct resolution
2018-04-07 09:10:29 +10:00
Andrew Tridgell
a1ba582a5d HAL_VRBrain: handle oneshot125 separately 2018-04-07 09:10:29 +10:00
Andrew Tridgell
c3f0418333 HAL_PX4: handle oneshot125 separately 2018-04-07 09:10:29 +10:00
Andrew Tridgell
0bb2c4564d AP_HAL: make hal aware of oneshot125
this separates oneshot and oneshot125 at the HAL layer, allowing the
HAL to properly handle the high timing resolution of oneshot125
(needed to use 125ns time steps, to get the full 1000 throttle steps)
2018-04-07 09:10:29 +10:00
Andrew Tridgell
67993d6e5c HAL_ChibiOS: re-instate priority boost system
this adds back in the priority boost system for the main thread when
waiting for a IMU sample. This significantly improves scheduling
performance on very busy boards like a PH2.1
2018-04-07 09:10:29 +10:00
Andrew Tridgell
fff143d83e AP_BLHeli: default protocol timeout to 0
this gives best compatibility with BLHeliSuite
2018-04-07 09:10:29 +10:00
Andrew Tridgell
2c6e6e3b13 HAL_ChibiOS: removed obsolete DShot example code 2018-04-07 09:10:29 +10:00
Andrew Tridgell
b77ba8fbd1 AP_BLHeli: improved debug output
allow debug on any MAVLink port
also fixed handling of passthru for oneshot125
2018-04-07 09:10:29 +10:00
Andrew Tridgell
9b22e0b7cc HAL_ChibiOS: fixed SPI rates on fmuv3
this fixes a SPI bandwidth issue on PH2.1 with 3 IMUs active
2018-04-07 09:10:29 +10:00
Andrew Tridgell
61d513e91b AP_BLHeli: use get_esc_scaling() for motor range
this fixes an issue with blhelisuite init when min is not 1000
2018-04-07 09:10:29 +10:00
Andrew Tridgell
503bd9ce65 HAL_PX4: implement get_esc_scaling() 2018-04-07 09:10:29 +10:00
Andrew Tridgell
8e59f6aad6 HAL_ChibiOS: implement get_esc_scaling() 2018-04-07 09:10:29 +10:00
Andrew Tridgell
dacbef2120 AP_HAL: added get_esc_scaling() API for rcout 2018-04-07 09:10:29 +10:00
Andrew Tridgell
a2eec97325 HAL_ChibiOS: raised default SPI priority
this was causing transfer errors on the primary IMU of a PH2.1 when
fast sampling was enabled
2018-04-07 09:10:29 +10:00
Andrew Tridgell
c17338473d AP_BLHeli: unlock uart on InterfaceExit 2018-04-07 09:10:29 +10:00
Andrew Tridgell
6f704b3818 AP_BLHeli: fixed use of SERVO_BLH_AUTO 2018-04-07 09:10:29 +10:00
Andrew Tridgell
5bfc97f9c0 HAL_ChibiOS: fixed dshot trigger while serial active 2018-04-07 09:10:29 +10:00
Andrew Tridgell
7c678bd707 AP_BLHeli: use UART locking
this gains exclusive access to the UART while MSP protocol is active to
prevent protocol corruption due to other drivers writing to hal.console
2018-04-07 09:10:29 +10:00
Andrew Tridgell
e448b5d069 HAL_ChibiOS: implement UART port locking 2018-04-07 09:10:29 +10:00
Andrew Tridgell
85ae6f60a8 AP_HAL: added UART locking interface
used to gain exclusive access to a UART. This is needed for the BLHeli
MSP protocol to prevent protocol corruption due to console writes
2018-04-07 09:10:29 +10:00
Andrew Tridgell
b7bcee69a3 AP_BLHeli: added telemetry logging support
allow telemetry feedback from BLHeli_32 ESCs
2018-04-07 09:10:29 +10:00
Andrew Tridgell
061277040b DataFlash: updated ESC logging format
support higher voltages and higher RPMs
added total current logging
2018-04-07 09:10:29 +10:00
Andrew Tridgell
71eb9bac03 AP_SerialManager: added ESC telemetry protocol support 2018-04-07 09:10:29 +10:00
Andrew Tridgell
6fd0af11ef HAL_ChibiOS: implement telem request API 2018-04-07 09:10:29 +10:00
Andrew Tridgell
69c623270c AP_HAL: added telem request to RCOutput 2018-04-07 09:10:29 +10:00
Andrew Tridgell
d54d3351de SRV_Channel: check for rcout serial for blheli support 2018-04-07 09:10:29 +10:00
Andrew Tridgell
fde092a246 AP_BLHeli: check for rcout serial support
don't build AP_BLHeli on HALs that can't support serial output to ESCs
2018-04-07 09:10:29 +10:00
Andrew Tridgell
74bf83c39f AP_HAL: added check for RCOUT serial support 2018-04-07 09:10:29 +10:00
Andrew Tridgell
751c3a554a HAL_ChibiOS: added fmuv4-beta hardware definition
for an old pixracer quad I have (and I believe Peter has one too)
2018-04-07 09:10:29 +10:00
Andrew Tridgell
1fc0047fd9 AP_BLHeli: raise timout to 60s 2018-04-07 09:10:29 +10:00
Andrew Tridgell
6bdb523630 HAL_ChibiOS: guarantee 1kHz output for DShot 2018-04-07 09:10:29 +10:00
Andrew Tridgell
3daf27db64 AP_BLHeli: expanded test code 2018-04-07 09:10:29 +10:00
Andrew Tridgell
ee94d73e77 AP_BLHeli: added SERVO_BLH_TMOUT parameter 2018-04-07 09:10:29 +10:00
Andrew Tridgell
692f22c17f HAL_ChibiOS: added GPIO assignments for revo-mini 2018-04-07 09:10:29 +10:00
Andrew Tridgell
0018e1f944 SRV_Channel: added set_disabled_channel_mask()
used by AP_BLHeli
2018-04-07 09:10:29 +10:00
Andrew Tridgell
ef539d4145 HAL_ChibiOS: added debug timing option for RCOut 2018-04-07 09:10:29 +10:00
Andrew Tridgell
9aa5a97f26 AP_BLHeli: added test interface
and added delay on serial init
2018-04-07 09:10:29 +10:00
Andrew Tridgell
7d3cce98d0 AP_HAL: allow override of MS5611 name
for fmuv4-beta
2018-04-07 09:10:29 +10:00
Andrew Tridgell
af1e3aa64d HAL_ChibiOS: increase timeout on bytes for blheli 2018-04-07 09:10:29 +10:00
Andrew Tridgell
756c0d4b0b HAL_ChibiOS: fixed reset for oneshot
after a BLHeli connection we need to go back to 1Hz on timer
2018-04-07 09:10:29 +10:00
Andrew Tridgell
b0442d1c5c AP_BLHeli: fixed build for rover
only plane and copter have AP_Motors for motors mask
2018-04-07 09:10:29 +10:00
Andrew Tridgell
9a29c6d3b5 HAL_ChibiOS: implement DigitalSource() 2018-04-07 09:10:29 +10:00
Andrew Tridgell
c2adc26051 AP_RPM: support RPM pin input on ChibiOS 2018-04-07 09:10:29 +10:00
Andrew Tridgell
9942934f0d AP_HAL_PX4: added IRQ save/restore to hal.scheduler
these are used by RPM driver
2018-04-07 09:10:29 +10:00
Andrew Tridgell
51c40a013b HAL_ChibiOS: added IRQ save/restore to hal.scheduler
these are used by RPM driver
2018-04-07 09:10:29 +10:00
Andrew Tridgell
d2075b4b67 AP_HAL: added irq save/restore API to hal.scheduler
these are used by RPM driver
2018-04-07 09:10:29 +10:00
Andrew Tridgell
54185af8ef AP_BLHeli: removed test code
not needed any more, and no longer compiles
2018-04-07 09:10:29 +10:00
Andrew Tridgell
019049e76b HAL_ChibiOS: fixed RC period setting 2018-04-07 09:10:29 +10:00
Andrew Tridgell
9ba3992d9e AP_BLHeli: added SERVO_BLHI_AUTO option
makes choosing motor mask much easier for multicopters
2018-04-07 09:10:29 +10:00
Andrew Tridgell
fd3037bbb7 GCS_MAVLink: add support for alternative protocol
this allows an alternative to MAVLink to be installed on a GCS
port. This is used for BLHeli passthru support
2018-04-07 09:10:29 +10:00
Andrew Tridgell
d258eac88d HAL_ChibiOS: fixed reconfig of group after serial_end() 2018-04-07 09:10:29 +10:00
Andrew Tridgell
46c76c3d5d HAL_ChibiOS: increase serial byte timeout
needs 2ms for final ack in verify
2018-04-07 09:10:29 +10:00
Andrew Tridgell
202a7dd091 HAL_ChibiOS: don't allow dshot while serial active 2018-04-07 09:10:29 +10:00
Andrew Tridgell
b350b07593 HAL_ChibiOS: allow internal GPIO fuctions to use disabled pins 2018-04-07 09:10:29 +10:00
Andrew Tridgell
1be41b83fc SRV_Channel: added SERVO_BLHI_ parameters 2018-04-07 09:10:29 +10:00
Andrew Tridgell
a1a83ab768 AP_BLHeli: added ESC serial protocol implementation
this implements the MSP and BLHeli protocols for passthru control of
BLHeli ESCs
2018-04-07 09:10:29 +10:00
Andrew Tridgell
67bae2669b HAL_ChibiOS: enable serial5 on fmuv3 2018-04-07 09:10:29 +10:00
Andrew Tridgell
382772d999 HAL_ChibiOS: initial support for ESC serial output 2018-04-07 09:10:29 +10:00
Andrew Tridgell
dcfec21b46 AP_HAL: added support for serial output to ESCs 2018-04-07 09:10:29 +10:00
Andrew Tridgell
80a1688361 AP_Motors: make a singleton
this is used by AP_ESCSerial
2018-04-07 09:10:29 +10:00
Andrew Tridgell
17f2f40b11 AP_Math: added xmodem CRC
used by blheli 4-way ESC protocol
2018-04-07 09:10:29 +10:00
Andrew Tridgell
2933d4dd35 HAL_PX4: handle MODE_PWM_NONE enum 2018-04-07 09:10:29 +10:00
Andrew Tridgell
3c5c77889c HAL_VRBRAIN: fixed build with DShot 2018-04-07 09:10:29 +10:00
Andrew Tridgell
a9b4d37bd2 HAL_PX4: fixed build with DShot 2018-04-07 09:10:29 +10:00
Andrew Tridgell
26d279e165 HAL_ChibiOS: improve DShot timing accuracy 2018-04-07 09:10:29 +10:00
Andrew Tridgell
93111dc0b1 HAL_ChibiOS: ensure that IO UART gets DMA 2018-04-07 09:10:29 +10:00
Andrew Tridgell
bd9df6d0ec AP_Motors: added DShot to parameter docs 2018-04-07 09:10:29 +10:00
Andrew Tridgell
95a261e061 HAL_ChibiOS: don't generate DMA channels for ALARM pin 2018-04-07 09:10:29 +10:00
Andrew Tridgell
01e9c55721 HAL_ChibiOS: fixed SPI bus speed on SPI3
and add optional bootup test of SPI bus speeds to help with porting to
new MCUs
2018-04-07 09:10:29 +10:00
Andrew Tridgell
5f29524a41 AP_Radio: fixed optimisation of AP_Radio drivers 2018-04-07 09:10:29 +10:00
Andrew Tridgell
e55d3a0834 AP_Motors: fix mask passed to rc_set_freq
the full motor mask must be supplied to work correctly for oneshot and
dshot
2018-04-07 09:10:29 +10:00
Andrew Tridgell
610a6a6c88 HAL_ChibiOS: optimise USB config driver 2018-04-07 09:10:29 +10:00
Andrew Tridgell
bc32276966 HAL_ChibiOS: support DShot output
use DMAR burst DMA to minimise number of DMA channels needed

thanks to betaflight for the great reference implementation!
2018-04-07 09:10:29 +10:00
Andrew Tridgell
294aac6955 HAL_ChibiOS: fixed CTS pulldown
we need to pulldown to prevent delays in uart sends
2018-04-07 09:10:29 +10:00
Andrew Tridgell
a64819cbf2 HAL_ChibiOS: minimise DMA TX latency on contended UARTs
try to prevent long delays on other users of a DMA channel
2018-04-07 09:10:29 +10:00
Andrew Tridgell
a86e85c6b2 HAL_ChibiOS: enable checking for DMA contention 2018-04-07 09:10:29 +10:00
Andrew Tridgell
0fb4e4720d AP_HAL_VRBRAIN: added mask to set_output_mode()
this allows for some groups using dshot and some not
2018-04-07 09:10:29 +10:00
Andrew Tridgell
25cc73c1e7 AP_HAL_PX4: added mask to set_output_mode()
this allows for some groups using dshot and some not
2018-04-07 09:10:29 +10:00
Andrew Tridgell
4fb53d44f3 AP_HAL_F4Light: added mask to set_output_mode()
this allows for some groups using dshot and some not
2018-04-07 09:10:29 +10:00
Andrew Tridgell
2c84d77306 AP_Motors: setup for DShot output modes 2018-04-07 09:10:29 +10:00
Andrew Tridgell
e7dc304f4e AP_HAL: support DShot output modes 2018-04-07 09:10:29 +10:00
Andrew Tridgell
64278f07d3 HAL_ChibiOS: removed the DMA channels from RCIN in hwdef.dat
no longer needed as this is automatic now
2018-04-07 09:10:29 +10:00
Andrew Tridgell
9a5df6d1f7 HAL_ChibiOS: auto-generate DMA channels for RCIN
and add DMA channels for TIMx_UP ready for DMAR based DShot support
2018-04-07 09:10:29 +10:00
Andrew Tridgell
6aff7ecbf5 HAL_ChibiOS: added channel numbers for STM32F4xx MCUs 2018-04-07 09:10:29 +10:00
Andrew Tridgell
da2e79130b HAL_ChibiOS: generate channel numbers in DMA tables 2018-04-07 09:10:29 +10:00
Andrew Tridgell
3501763f4e HAL_ChibiOS: added DShot example app 2018-04-07 09:10:29 +10:00