Commit Graph

15822 Commits

Author SHA1 Message Date
Andrew Tridgell
472eed3847 AP_Baro: enable use of pressure correction
this allows for temperature correction of baro pressure
2018-02-08 17:36:33 +11:00
Andrew Tridgell
177284bd6b AP_TempCalibration: temperature calibration library
this adds opportunistic temperature calibration. This is initially only
for barometers, and has been only tested with the ICM-20789, but can be
extended to other sensors and other barometers
2018-02-08 17:36:33 +11:00
Andrew Tridgell
57a3bc1397 AP_Compass: new compass learning system
this learns compass offsets using magnetic tables and compass
observations
2018-02-08 17:36:33 +11:00
Andrew Tridgell
6a89fdf268 SITL: use AP_Declination for magnetic tables 2018-02-08 17:36:33 +11:00
Andrew Tridgell
252fc9c757 AP_Declination: added inclination and intensity tables
moved from SITL/SIM_Aircraft.h
2018-02-08 17:36:33 +11:00
Andrew Tridgell
ca30f6aec8 AP_Compass: added per-motor compass calibration
this allows for a motor calibration vector per motor
2018-02-08 17:36:33 +11:00
Andrew Tridgell
b1ccf575f7 AP_Radio: support DATA96 packets for fw update
this allows for update of remote radio firmware via MAVLink DATA96
packets
2018-02-08 17:36:33 +11:00
Andrew Tridgell
6ef5f61faa AP_Radio: add ChibiOS support 2018-02-08 17:36:33 +11:00
Andrew Tridgell
14dcee75f1 AP_Notify: added video recording flag 2018-02-08 17:36:33 +11:00
Andrew Tridgell
e2d91535d0 AP_AHRS: fill in have_pos_abs 2018-02-08 17:36:33 +11:00
Andrew Tridgell
b622fe143e AP_Notify: added have_pos_abs flag
used to notify of high-quality GPS lock
2018-02-08 17:36:33 +11:00
Andrew Tridgell
ac324a3760 StorageManager: added bind info storage area 2018-02-08 17:36:33 +11:00
Andrew Tridgell
3afaf81ccc AP_BoardConfig: added param object for AP_Radio 2018-02-08 17:36:33 +11:00
Andrew Tridgell
a8af1974d2 HAL_PX4: hook into AP_Radio for RC input 2018-02-08 17:36:33 +11:00
Peter Barker
ddb2f4b5ad HAL_PX4: define cypress SPI bus 2018-02-08 17:36:33 +11:00
Peter Barker
beb5a41389 AP_HAL: add radio defines for PixHawk
This facilitates testing a diret-attached-radio using a PixHawk1

The AUX5 pin is used as an interrupt line.
2018-02-08 17:36:33 +11:00
Andrew Tridgell
be002665cf AP_Radio: implement CYRF6936 direct attached radio
implement DSM2 and DSMX compatible protocols
2018-02-08 17:36:33 +11:00
Andrew Tridgell
b9e5649888 AP_InertialSensor: support PCNC1 2018-02-08 17:36:33 +11:00
Andrew Tridgell
2cc0f25ca0 AP_Compass: support PCNC1 2018-02-08 17:36:33 +11:00
Andrew Tridgell
b2172a0475 AP_Baro: support PCNC1 2018-02-08 17:36:33 +11:00
Peter Barker
12a3cc1179 AP_Baro: use Invensense defines when configuring ICM20789 IMU part 2018-02-08 17:36:33 +11:00
Peter Barker
71cf3941a7 AP_InertialSensor: move Invensense register defines into separate file 2018-02-08 17:36:33 +11:00
Peter Barker
3ee112843c AP_InertialSensor: configure bypass for 20789 like we do for AK8963 2018-02-08 17:36:33 +11:00
Peter Barker
5d94172ada AP_InertialSensor: remove clearing of BIT_USER_CTRL_I2C_MST_EN bit in user_ctrl
This bit should never be set on 20789
2018-02-08 17:36:33 +11:00
Peter Barker
3a0c5bed85 AP_Baro: ICM20789: example fixes 2018-02-08 17:36:33 +11:00
Peter Barker
bf95be96f3 AP_Baro: ICM20789: stop dev_icm being an instance variable 2018-02-08 17:36:33 +11:00
Peter Barker
c56486a39e AP_Baro: remove pointless destructor overrides 2018-02-08 17:36:33 +11:00
Peter Barker
05fb28c7f9 AP_Baro: use HAL_SEMAPHORE_BLOCK_FOREVER 2018-02-08 17:36:33 +11:00
Peter Barker
ea83a487d4 AP_Baro: create BARO_ICM20789_DEBUG and use it 2018-02-08 17:36:33 +11:00
Peter Barker
31d8b6ba64 AP_Baro: do not take semaphore if HAL_INS_MPU60x0_NAME not set 2018-02-08 17:36:33 +11:00
Andrew Tridgell
bf67153791 AP_Baro: implement ICM20789 barometer 2018-02-08 17:36:33 +11:00
Andrew Tridgell
5a4f0fed2d AP_InertialSensor: added ICM-20789 support 2018-02-08 17:36:33 +11:00
James Stewart
ec5faed133 GCS_MAVLink: send mission item requests to correct destination for partial updates
The correct destination is the GCS which last requested to update the mission (full or partial), not just the last GCS to set the mission count (full only).
2018-02-07 07:01:32 -08:00
Andrew Tridgell
75226ba187 HAL_ChibiOS: enable logging on MindPX-v2
not working yet, seems to be a problem with SDIO interface
2018-02-07 20:33:45 +11:00
Andrew Tridgell
4548fd4d2f HAL_ChibiOS: changed RCIN to PULLDOWN
this fixes a high cpu load with no receiver connected
2018-02-07 20:33:45 +11:00
Andrew Tridgell
86189393a7 HAL_ChibiOS: fixed build warnings 2018-02-07 20:33:45 +11:00
Andrew Tridgell
bc96cb8a19 AP_HAL: fixed build warnings 2018-02-07 20:33:45 +11:00
Andrew Tridgell
9ceddbdab6 AP_ADSB: fixed build warning 2018-02-07 20:33:45 +11:00
Andrew Tridgell
7d2e3c0d04 AP_Notify: fixed build warning 2018-02-07 20:33:45 +11:00
Andrew Tridgell
4886ffbf8a HAL_ChibiOS: fixed build warnings 2018-02-07 20:33:45 +11:00
Andrew Tridgell
0d8cdd2728 AP_Compass: fixed warning 2018-02-07 20:33:45 +11:00
Andrew Tridgell
30e4323c6d HAL_ChibiOS: disable USART1 till USB problem solved
using USART1 causes USB disconnects. The behaviour is like CTS/RTS is
enabled on USART1, but it is disabled.
2018-02-07 20:33:45 +11:00
Andrew Tridgell
d0eb2970c7 HAL_ChibiOS: ensure RTS and CTS are both disabled for no flow control 2018-02-07 20:33:45 +11:00
Andrew Tridgell
82f1f462ae HAL_ChibiOS: ensure we don't init a uart driver twice 2018-02-07 20:33:45 +11:00
Andrew Tridgell
ad5a04fc89 HAL_ChibiOS: added NODMA option
this allows a peripheral to be configured without DMA (for low-use
UARTs)
2018-02-07 20:33:45 +11:00
Andrew Tridgell
74f4d5a3c9 HAL_ChibiOS: push MPU6500 to 4MHz on mindpx-v2 2018-02-07 20:33:45 +11:00
Andrew Tridgell
f4521772c1 AP_InertialSensor: don't try fast sampling on a MPU6500
it can't do it
2018-02-07 20:33:45 +11:00
Andrew Tridgell
d575d676b6 AP_InertialSensor: fixed another transfer without bus semaphore 2018-02-07 20:33:45 +11:00
Andrew Tridgell
f1ce321a2f HAL_ChibiOS: added checking of bus owner
this ensures all bus transfers are only done by the thread that owns
the semaphore
2018-02-07 20:33:45 +11:00
Andrew Tridgell
2ffb8d1583 AP_InertialSensor: fixed a bug where bus semaphore not held
during init of the invensense driver we could do a transfer without
the bus semaphore held. That violates the locking rules for the bus
2018-02-07 20:33:45 +11:00
Andrew Tridgell
fa68210210 HAL_ChibiOS: fixed build with older compilers 2018-02-07 20:33:45 +11:00
Andrew Tridgell
626632989e HAL_ChibiOS: fixed build for boards with no USB 2018-02-07 20:33:45 +11:00
Andrew Tridgell
41758348e5 HAL_ChibiOS: added checking of lock state in shared_dma
and use lock around check for tx completion in UART handler
2018-02-07 20:33:45 +11:00
Andrew Tridgell
dce4c90467 HAL_ChibiOS: moved UART thread to UART driver
use an event model for triggering sends from tx complete DMA handler
for unbuffered uarts
2018-02-07 20:33:45 +11:00
Andrew Tridgell
5fc12f82fb HAL_ChibiOS: expanded interrupt stack to 256
this is very conservative, and may be trimmed later based on analysis
of stack usage
2018-02-07 20:33:45 +11:00
Andrew Tridgell
aae1cc22f4 HAL_ChibiOS: updated USB device strings
use defaults or add in serial number
2018-02-07 20:33:45 +11:00
Andrew Tridgell
4b8bde746e HAL_ChibiOS: improved default USB strings
use board name and serial number to make IDs unique
2018-02-07 20:33:45 +11:00
Andrew Tridgell
23e1b2e271 HAL_ChibiOS: added paranoid state checking on I2C
this is here just while debugging an issue with Mark
2018-02-07 20:33:45 +11:00
Andrew Tridgell
7e19f49e42 HAL_ChibiOS: fixed DMA lock in SoftSigReader 2018-02-07 20:33:45 +11:00
Andrew Tridgell
1aa6a0068a HAL_ChibiOS: fixed order of I2C DMA
this was harmless, but confusing for debugging
2018-02-07 20:33:45 +11:00
Andrew Tridgell
111e5b6268 HAL_ChibiOS: change USB ID for revo-mini 2018-02-07 20:33:45 +11:00
Andrew Tridgell
4d018cf5e2 HAL_ChibiOS: take lock on DMA allocate/deallocate
this is required for the stm32_dma_stream bitmask manipulation
2018-02-07 20:33:45 +11:00
Andrew Tridgell
bc49c0d2c5 HAL_ChibiOS: make hwdef.h the same on python2 and python3
and output to /tmp by default to prevent accidental use of old hwdef.h
in the build
2018-02-07 20:33:45 +11:00
Andrew Tridgell
e002fbdb8d HAL_ChibiOS: fixed a build warning 2018-02-07 20:33:45 +11:00
Andrew Tridgell
23803df038 AP_Compass: allows boards to define orientation of HMC5843 2018-02-07 20:33:45 +11:00
Andrew Tridgell
077aa24c6d HAL_ChibiOS: add more pins for revo-mini port 2018-02-07 20:33:45 +11:00
Andrew Tridgell
e91144cc8e HAL_ChibiOS: allow for empty UART drivers
allows for boards with no default GPS port
2018-02-07 20:33:45 +11:00
Andrew Tridgell
e0212ebe85 HAL_ChibiOS: cope with ETR timer channels
trean the ETR capability as a separate AF
2018-02-07 20:33:45 +11:00
Andrew Tridgell
c1df2a8a4b HAL_ChibiOS: cope with timers 10 and later 2018-02-07 20:33:45 +11:00
Andrew Tridgell
d191b37520 HAL_ChibiOS: cope with having no ADC inputs 2018-02-07 20:33:45 +11:00
Andrew Tridgell
87389e0fdc HAL_ChibiOS: fixed double DMA allocation on i2c 2018-02-07 20:33:45 +11:00
Andrew Tridgell
19e1349d0a HAL_ChibiOS: setup serial5 for fmuv3 ESP8266 2018-02-07 20:33:45 +11:00
Andrew Tridgell
fca0ad4f85 AP_SerialManager: allow hwdef.dat setup of serial5 config 2018-02-07 20:33:45 +11:00
Andrew Tridgell
560948dc69 HAL_ChibiOS: fixed GPIOs for ESP8266 port 2018-02-07 20:33:45 +11:00
Andrew Tridgell
fa96e23552 HAL_ChibiOS: setup correct volt and current pins
use hwdef.dat to specify battery pins
2018-02-07 20:33:45 +11:00
Andrew Tridgell
626b9289be AP_BattMonitor: allow hwdef.dat config of battery pins 2018-02-07 20:33:45 +11:00
Andrew Tridgell
85acbcb21d HAL_ChibiOS: fixed UART send from TX complete IRQ 2018-02-07 20:33:45 +11:00
Andrew Tridgell
65b762ddfe AP_Notify: support OLED display on ChibiOS 2018-02-07 20:33:45 +11:00
Andrew Tridgell
63a825dd2c HAL_ChibiOS: don't call spiStart() unless bus is stopped 2018-02-07 20:33:45 +11:00
Andrew Tridgell
2513e60e3c AP_SerialManager: use unbuffered writes for volz 2018-02-07 20:33:45 +11:00
Andrew Tridgell
e29b79f41b HAL_ChibiOS: fixed DMA allocation bug on SPI
thanks to Mark Whitehorn for finding this crash
2018-02-07 20:33:45 +11:00
Andrew Tridgell
29add8a880 HAL_ChibiOS: fixed build without FATFS enabled 2018-02-07 20:33:45 +11:00
Andrew Tridgell
6b187b393a HAL_ChibiOS: fixed fmuv4 build 2018-02-07 20:33:45 +11:00
Siddharth Purohit
e1a8bba58b HAL_ChibiOS: increase the stack size for uavcan thread 2018-02-07 20:33:45 +11:00
Siddharth Purohit
17fef4b630 HAL_PX4: add support for api change in AP_HAL::CANManager 2018-02-07 20:33:45 +11:00
Siddharth Purohit
a55f1c85af HAL_Linux: add support for api change in AP_HAL::CANManager 2018-02-07 20:33:45 +11:00
Siddharth Purohit
8d5667afa0 AP_UAVCAN: add method to read driver from parent can manager 2018-02-07 20:33:45 +11:00
Siddharth Purohit
77f8acd7a1 HAL_ChibiOS: add CAN to supported peripherals list 2018-02-07 20:33:45 +11:00
Siddharth Purohit
6f21c1583f HAL_ChibiOS: add definitions to support uavcan in fmuv3 2018-02-07 20:33:45 +11:00
Siddharth Purohit
edd0e8d2f5 HAL_ChibiOS: add CANManager to ChibiOS namespace 2018-02-07 20:33:45 +11:00
Siddharth Purohit
143686f70d HAL_ChibiOS: add placeholder cstdio header 2018-02-07 20:33:45 +11:00
Siddharth Purohit
539d5adc13 hwdef: add more posix methods 2018-02-07 20:33:45 +11:00
Siddharth Purohit
288f6b1fa0 HAL_ChibiOS: add chibios cpp wrapers, libuavcan's stm32 driver uses it 2018-02-07 20:33:45 +11:00
Siddharth Purohit
f2e77ab773 AP_HAL_ChibiOS: add uavcan thread 2018-02-07 20:33:45 +11:00
Siddharth Purohit
3c009cf02c AP_HAL_ChibiOS: add CAN driver 2018-02-07 20:33:45 +11:00
Siddharth Purohit
5bcbc4c142 AP_HAL: default to not UAVCAN support for chibios boards 2018-02-07 20:33:45 +11:00
Siddharth Purohit
d539a157b7 AP_HAL: move to having ICanDriver as member instead of inheriting it
this is to support having drivers using libuavcan supplied helper objects, a method which can lead to much less duplication of code
2018-02-07 20:33:45 +11:00
Siddharth Purohit
f0f4239d4a AP_Compass: skip using posix headers for non posix systems 2018-02-07 20:33:45 +11:00
Siddharth Purohit
a413fef77f AP_BoardConfig: add support for UAVCAN setup on ChibiOS boards 2018-02-07 20:33:45 +11:00
Siddharth Purohit
175d806b5f AP_Baro: skip using posix headers for non-posix systems 2018-02-07 20:33:45 +11:00
Andrew Tridgell
b992b5e02a HAL_ChibiOS: allow for 16kHz brushed on all timers 2018-02-07 20:33:45 +11:00
Andrew Tridgell
b0d0ee1f01 HAL_ChibiOS: reformat using yapf and support python3
allow hwdef.h compilation using python3
2018-02-07 20:33:45 +11:00
Andrew Tridgell
67e0ba22fe HAL_ChibiOS: fixed some errors in F405 tables 2018-02-07 20:33:45 +11:00
Andrew Tridgell
70ff3871e0 HAL_ChibiOS: fixed RC in on CH1 of timer 2018-02-07 20:33:45 +11:00
Andrew Tridgell
890d322b47 HAL_ChibiOS: starting on mini-pix hwdef.dat
for RadioLink mini-pix board
2018-02-07 20:33:45 +11:00
Andrew Tridgell
5da17e5b60 AP_HAL: added MINIPIX board type 2018-02-07 20:33:45 +11:00
Andrew Tridgell
23555f4c25 HAL_ChibiOS: allow for empty storage during bringup
useful when storage backend driver isn't written yet
2018-02-07 20:33:45 +11:00
Andrew Tridgell
ecce2a73d0 HAL_ChibiOS: Storage::_timer_tick is an override 2018-02-07 20:33:45 +11:00
Andrew Tridgell
713006bb1d HAL_ChibiOS: allow more OTG defines to be overridden 2018-02-07 20:33:45 +11:00
Andrew Tridgell
33a87194dc HAL_VRBrain: Storage::_timer_tick is an override 2018-02-07 20:33:45 +11:00
Andrew Tridgell
0f079deebf HAL_PX4: Storage::_timer_tick is an override 2018-02-07 20:33:45 +11:00
Andrew Tridgell
26161ee467 HAL_Linux: Storage::_timer_tick is an override 2018-02-07 20:33:45 +11:00
Andrew Tridgell
472ba5bde7 AP_HAL: make _timer_tick() in Storage available in all HALs
this makes using the Empty::Storage easier
2018-02-07 20:33:45 +11:00
Andrew Tridgell
3e65347b97 AP_HAL: added REVOMINI board type 2018-02-07 20:33:45 +11:00
Andrew Tridgell
1fb257a35a HAL_ChibiOS: initial hwdef.dat for revo mini 2018-02-07 20:33:45 +11:00
Andrew Tridgell
979a2a4796 HAL_ChibiOS: removed debug code 2018-02-07 20:33:45 +11:00
Siddharth Purohit
538af2a58a HAL_ChibiOS: fix parity and stop bit setting 2018-02-07 20:33:45 +11:00
Mark Whitehorn
1a167a7d1f AP_SerialManager: disable flow control for sbus1 port 2018-02-07 20:33:45 +11:00
Mark Whitehorn
b94b1dcd97 AP_HAL_ChibiOS: add missing declaration 2018-02-07 20:33:45 +11:00
Siddharth Purohit
df4bf7e476 HAL_ChibiOS: fix irq clash with unnecessary access to readbuf ring buffer 2018-02-07 20:33:45 +11:00
Siddharth Purohit
02696882e9 HAL_ChibiOS: if unbuffered write, do continue to invoke DMA writes
adds higher latency to device sharing DMA
2018-02-07 20:33:45 +11:00
Siddharth Purohit
0c914838b2 AP_IOMCU: fix data type for available bytes 2018-02-07 20:33:45 +11:00
proficnc
c613c0bde2 added the cube red hardware definition 2018-02-07 20:33:45 +11:00
Andrew Tridgell
442b280368 AP_IOMCU: improved error checking
and avoid pointless change of rates
2018-02-07 20:33:45 +11:00
Andrew Tridgell
3dacbd1b36 HAL_ChibiOS: hold write lock for unbuffered writes 2018-02-07 20:33:45 +11:00
Andrew Tridgell
ad26ca4a27 HAL_ChibiOS: implement parity and stop bits controls 2018-02-07 20:33:45 +11:00
Andrew Tridgell
2e15285c51 HAL_ChibiOS: refuse unbuffered writes without DMA
we would need much more complex code to handle this
2018-02-07 20:33:45 +11:00
Andrew Tridgell
5ffcff1a79 AP_IOMCU: use unbuffered UART writes
this lowers latency for servo outputs to the IOMCU
2018-02-07 20:33:45 +11:00
Andrew Tridgell
3f2cc2c9d6 HAL_ChibiOS: implement low latency UART writes
this implements the set_unbuffered_writes() API by performing writes
directly in the write() call and not from a timer
2018-02-07 20:33:45 +11:00
Andrew Tridgell
015c3a1fa3 HAL_ChibiOS: removed duplicate defines 2018-02-07 20:33:45 +11:00
Andrew Tridgell
2bb99bfe53 HAL_VRBRAIN: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
Andrew Tridgell
e276edbb03 HAL_SITL: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
Andrew Tridgell
e4fc0e9f62 HAL_QURT: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
Andrew Tridgell
25ea60da69 HAL_PX4: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
Andrew Tridgell
22de99dd58 HAL_Linux: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
Andrew Tridgell
865e4f3104 HAL_ChibiOS: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
Andrew Tridgell
5179d13dbf AP_HAL: added virtual _timer_tick method on UARTDriver
this is needed to allow HALs to update UARTs when the number of UARTs
they bhave varies (some may be instances of HAL_Empty)
2018-02-07 20:33:45 +11:00
Andrew Tridgell
a5bafb399f HAL_ChibiOS: adjust SPI pin speeds 2018-02-07 20:33:45 +11:00
Holger Steinhaus
36f0b429fb GCS_MAVLink: send BATTERY_STATUS.energy_consumed if current measurement is available 2018-02-06 20:00:16 -07:00
Holger Steinhaus
d1a37a60b7 DataFlash: log consumed energy (Wh) 2018-02-06 20:00:16 -07:00
Holger Steinhaus
7383552ebc AP_BatteryMonitor: count mWh spent since powerup 2018-02-06 20:00:16 -07:00
Igor Anokhin
e6d4b2a087 AP_InertialSensor: add LSM9DS1 entry
Enable LSM9DS1 in case it is selected
2018-02-06 09:31:26 -08:00
Igor Anokhin
5cf15db966 AP_HAL: add LSM9DS1 defines
Add defines for name and number sensor
2018-02-06 09:31:26 -08:00
Igor Anokhin
be386b2b73 AP_InertialSensor: LSM9DS1 add FIFO support
Make reading data with FIFO
2018-02-06 09:31:26 -08:00
Igor Anokhin
44d5112488 AP_InertialSensor: add LSM9DS1 support
Make LSM9DS1 driver
2018-02-06 09:31:26 -08:00
Nicholas Engle
1103e92884 SITL: Add SIM_WIND_DIR_Z parameter for SITL
This controls the vertical pitch of the 3d wind vector, allowing futher control of the wind
using systems like dronekit. This change directly effects the calcuation of the wind vector
2018-02-05 16:38:53 -08:00
Nicholas Engle
8b08e9388d AP_HAL_SITL: Add SIM_WIND_DIR_Z parameter for SITL
This controls the vertical pitch of the 3d wind vector, allowing futher control of the wind
using systems like dronekit. This change directly effects the calcuation of the wind vector
2018-02-05 16:38:53 -08:00
Michael du Breuil
725f1a2f2b DataFlash: Use battery singleton 2018-02-06 00:11:32 +00:00
Michael du Breuil
03bf247d36 AP_BattMonitor: Create a battery singleton
Also logs battery data from the read function directly
2018-02-06 00:11:32 +00:00
Andrew Tridgell
83d1e71cb2 AP_Baro: ran BMP085 driver through code formatter 2018-02-05 12:12:03 +11:00