Commit Graph

16504 Commits

Author SHA1 Message Date
Andrew Tridgell
6faace278a HAL_ChibiOS: run i2c at 400kHz on F412 2018-02-08 17:36:33 +11:00
Andrew Tridgell
907728e323 AP_Radio: prevent crash if cc2500 device not found 2018-02-08 17:36:33 +11:00
Andrew Tridgell
9f53ae1ea4 HAL_ChibiOS: added F412-rev1 hwdef.dat 2018-02-08 17:36:33 +11:00
Andrew Tridgell
ad8db6cda3 AP_InertialSensor: added sensor type ICM20789_SPI 2018-02-08 17:36:33 +11:00
Andrew Tridgell
2c8e6bb834 AP_Compass: use generic defines for BMM150 2018-02-08 17:36:33 +11:00
Andrew Tridgell
00d3c158db AP_Baro: use generic defines for 20789 2018-02-08 17:36:33 +11:00
Andrew Tridgell
6bc3d126bb AP_HAL: added sensor defines for BMM150 and ICM20789 2018-02-08 17:36:33 +11:00
Andrew Tridgell
47ce37f463 HAL_ChibiOS: report I2C clock downgrades 2018-02-08 17:36:33 +11:00
Andrew Tridgell
8dcf89b2b7 AP_Scheduler: put scheduler debug on console 2018-02-08 17:36:33 +11:00
Andrew Tridgell
73418519eb HAL_ChibiOS: enable analog debug on F412 2018-02-08 17:36:33 +11:00
Andrew Tridgell
fd824e6258 HAL_ChibiOS: enable toy mode on F412 2018-02-08 17:36:33 +11:00
Andrew Tridgell
d208dc69d3 Tools: moved make_abin.sh into ChibiOS scripts 2018-02-08 17:36:33 +11:00
Andrew Tridgell
cc8a37b2fc AP_Radio: pack telemetry structures 2018-02-08 17:36:33 +11:00
Andrew Tridgell
4aa604a193 HAL_ChibiOS: enable pixartflow on skyviper-V2450 2018-02-08 17:36:33 +11:00
Andrew Tridgell
429a2beb86 AP_OpticalFlow: enable pixart flow on PCNC1 boards 2018-02-08 17:36:33 +11:00
Andrew Tridgell
8f1e8e787a GCS_MAVLink: added DATA96 hook for AP_Radio 2018-02-08 17:36:33 +11:00
Andrew Tridgell
0b5e3936fe AP_AHRS: added earth to body 2D rotations 2018-02-08 17:36:33 +11:00
Andrew Tridgell
9cce1e0733 StorageManager: expanded bind info to 56 bytes
cc2500 needs a larger bind area
2018-02-08 17:36:33 +11:00
Andrew Tridgell
7ac6df6f3e AP_Radio: use GDO2 for IRQ on cc2500 2018-02-08 17:36:33 +11:00
Andrew Tridgell
3456d67b2f AP_Radio: some boards won't have a radio reset pin 2018-02-08 17:36:33 +11:00
Andrew Tridgell
591e0c2249 HAL_ChibiOS: allow control of interrupt port
F412 has radio IRQ on port B
2018-02-08 17:36:33 +11:00
Andrew Tridgell
3cacb1d4b5 HAL_ChibiOS: commented the motor order in hwdef 2018-02-08 17:36:33 +11:00
Andrew Tridgell
4e8f8e88d9 AP_TempCalibration: fixed degC units 2018-02-08 17:36:33 +11:00
Andrew Tridgell
42b2843032 AP_Radio: removed obsolete example code 2018-02-08 17:36:33 +11:00
Andrew Tridgell
570a05e9d3 AP_OpticalFlow: fixed pixart SPI name 2018-02-08 17:36:33 +11:00
Andrew Tridgell
3f7934d082 AP_Radio: improvements to cc2500 driver 2018-02-08 17:36:33 +11:00
Andrew Tridgell
e087fc7730 AP_Radio: initial implementation of cc2500 driver
using D16 protocol. It can bind and receive packets, but packet rate
it very low
2018-02-08 17:36:33 +11:00
Andrew Tridgell
f3f6972fc0 HAL_ChibiOS: output panics on system console 2018-02-08 17:36:33 +11:00
Andrew Tridgell
7c8cf0a39e AP_OpticalFlow: fixed SPI name for pixart flow sensor 2018-02-08 17:36:33 +11:00
Andrew Tridgell
5a6831b606 AP_Baro: allow ICM-20789 on SPI or I2C 2018-02-08 17:36:33 +11:00
Andrew Tridgell
a3dabf3c55 AP_Baro: enable 20789 baro on F412 2018-02-08 17:36:33 +11:00
Andrew Tridgell
ac4017e2ae RC_Channel: added set_and_save_radio_trim()
# Conflicts:
#	libraries/RC_Channel/RC_Channel.h
2018-02-08 17:36:33 +11:00
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
night-ghost
2c043b822b AP_Baro: fixed BMP085 driver for current API 2018-02-05 12:12:03 +11:00
mirkix
bf758098d7 AP_HAL_Linux: fix deallocation 2018-02-05 11:05:12 +11:00
LukeMike
3dcaf83eaa VRBRAIN / DataFlash: some update for new VR Brain 5.2E (EEPROM version) 2018-02-05 08:26:49 +11:00
LukeMike
250bf53912 VRBRAIN / AP_HAL_VRBRAIN: some update for new VR Brain 5.2E (EEPROM version) 2018-02-05 08:26:49 +11:00
LukeMike
bfcece7edd VRBRAIN / AP_HAL: some update for new VR Brain 5.2E (EEPROM version) 2018-02-05 08:26:49 +11:00
LukeMike
ccb316f3f3 VRBRAIN / AP_BoardConfig: some update for new VR Brain 5.2E (EEPROM version) 2018-02-05 08:26:49 +11:00
LukeMike
8b737c54b9 VRBRAIN / AP_BattMonitor: some update for new VR Brain 5.2E (EEPROM version) 2018-02-05 08:26:49 +11:00
LukeMike
bf6e57e7a4 VRBRAIN / DataFlash: added writebuf_chunk for VR Brain 5.4 2018-02-05 08:26:49 +11:00
LukeMike
721f55e93c VRBRAIN / AP_RangeFinder: removed AP_RangeFinder_PX4_PWM for VR Brain boards 2018-02-05 08:26:49 +11:00
LukeMike
a319f6632f VRBRAIN / AP_RPM: removed RPM_PX4_PWM for VR Brain 5.1 and VR Micro Brain 5.2 (they haven't this input pin) 2018-02-05 08:26:49 +11:00
LukeMike
502f19cbae VRBRAIN / AP_InertialSensor: added inertial sensors init for VR Brain boards 2018-02-05 08:26:49 +11:00
LukeMike
432f6c2a4a VRBRAIN / APCompass: added compass sensor init for VR Brain boards 2018-02-05 08:26:49 +11:00
LukeMike
d48f9397d0 VRBRAIN / AP_Baro: added barometer sensor init for VR Brain boards 2018-02-05 08:26:49 +11:00
LukeMike
dab8f93628 VRBRAIN / AP_HAL: changed vrbrain board configuration file 2018-02-05 08:26:49 +11:00
LukeMike
505497b555 VRBRAIN / AP_BoardConfig: added fmu_mode parameter for VR Brain boards 2018-02-05 08:26:49 +11:00
LukeMike
b7985f77b5 VRBRAIN / AP_BoardConfig: added VR Brain boards into board_setup_drivers and board_autodetect 2018-02-05 08:26:49 +11:00
LukeMike
6b820ac9e4 VRBRAIN / AP_BoardConfig: added VR Brain define into px4_board_type enum 2018-02-05 08:26:49 +11:00
LukeMike
97b29a333d VRBRAIN / AP_HAL_VRBRAIN: updated AP_HAL 2018-02-05 08:26:49 +11:00
Michael du Breuil
200aacea43 AP_AdvancedFailsafe: Report MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION 2018-02-03 09:36:03 +09:00
Randy Mackay
f189ce5c68 AC_WPNav: minor formatting fix
non-functional change
2018-02-02 20:55:20 +09:00
Andrew Tridgell
2067e25523 AP_Compass: make length filter in MAG3110 optional
compile time for now, later can may become parameter
2018-02-02 21:07:40 +11:00
night-ghost
2065cc879c AP_HAL: mAG3110 driver 2018-02-02 21:07:40 +11:00
night-ghost
b6bf90ab93 AP_Compass: mAG3110 driver 2018-02-02 21:07:40 +11:00
Andrew Tridgell
1513246040 AP_FlashStorage: fixed two bugs found by night-ghost
this fixes two issues found by night-ghost. The first occurs if a 16
bit flash write is not atomic and only the first byte is written. Then
we could end up declaring the data invalid on reboot and erasing.

The second is a race in switching sectors. If power off occurs at the
wrong time we would trigger en erase on reboot.
2018-02-02 14:19:12 +09:00
mirkix
8da1252959 AP_BattMonitor: add default pins and values for BeagleBone Blue 2018-02-02 10:01:34 +09:00
Peter Barker
adde7bc588 AP_Terrain: fix snprintf buffer length warning
Also includes fix from Tridge to use MIN() instead of MAX()
2018-02-02 09:59:06 +09:00
murata
8070c13963 AP_Soaring: delete \n from the log using gcs().send_text 2018-02-02 09:41:23 +09:00
murata
cdfca9d9ea AP_HAL_PX4: delete \n from the log using gcs().send_text 2018-02-02 09:40:55 +09:00
murata
5b3a402d36 AP_Camera: delete \n from the log using gcs().send_text 2018-02-02 09:40:05 +09:00
murata
3ec733d4f8 AP_BattMonitor: Aggregate the commands defined in the SMBUS specification.
AP_BattMonitor: Aggregate the commands defined in the SMBUS specification.
2018-02-02 09:17:30 +09:00
Peter Barker
8e8b0dcc06 DataFlash: add ? and - to multiplier table
This allows a consumer to expect referential integrity for the
multipliers
2018-02-02 09:15:59 +09:00
Tatsuya Yamaguchi
aef9fa4a63 AP_NavEKF3: delete \n from the log using gcs().send_text 2018-02-02 09:13:54 +09:00
Lucas De Marchi
184b017b33 AP_HAL: fix warning from having undefined HAL_WITH_IO_MCU
In file included from ../../libraries/AP_IOMCU/AP_IOMCU.cpp:8:0:
../../libraries/AP_IOMCU/AP_IOMCU.h:10:5: warning: "HAL_WITH_IO_MCU" is not defined [-Wundef]
 #if HAL_WITH_IO_MCU
     ^
../../libraries/AP_IOMCU/AP_IOMCU.cpp:10:5: warning: "HAL_WITH_IO_MCU" is not defined [-Wundef]
 #if HAL_WITH_IO_MCU
     ^
And so on.
2018-02-02 09:11:46 +09:00
Randy Mackay
3badcdcfba AC_PosControl: default gains for sub 2018-01-31 08:48:21 +09:00
Randy Mackay
61933c6f1c AC_PosControl: shorten PSC_ACCELZ param to PSC_ACCZ 2018-01-31 08:48:21 +09:00
murata
6a87840c7a AP_NavEKF3: Change the if statement to a switch statement. 2018-01-28 22:20:08 +00:00
Leonard Hall
692e6518cc AC_AttitudeControl: update param desc values for large copters 2018-01-27 11:54:04 +09:00
Leonard Hall
691abab95e AC_AttitudeControl: Update parameter ranges 2018-01-27 11:38:09 +09:00
David Ingraham
2547ca399a AP_Airspeed: Fix ARSPD2_TYPE docs 2018-01-26 13:19:53 -08:00
Randy Mackay
ebf405e53d AC_Avoid: reduce min and default DIST_MAX values 2018-01-25 11:16:01 +09:00
Andrew Tridgell
6558da2c4c HAL_SITL: fixed valgrind error in ubx driver
this was causing a valgrind error on all runs with a virtual ublox GPS
2018-01-24 18:00:42 -07:00
night-ghost
3165d72647 AP_Motors: reduce unnecessary multiple call of get_compensation_gain() 2018-01-24 19:26:15 +09:00
Andrew Tridgell
c6c5603382 AP_Param: added back key dumping code
this is essential for working out conversion tables.
2018-01-24 18:23:59 +11:00
mirkix
c5eb52bf8d AP_HAL_Linux: fix comment 2018-01-23 13:32:12 -08:00
bnsgeyer
7a9e424977 AP_Motors: added comments to indicate parameter indices previously used by RSC_PWM_MIN, RSC_PWM_MAX, and RSC_PWM_REV 2018-01-23 14:12:27 +09:00
Randy Mackay
04822152da AC_PID: fixes after peer review of AC_PID_2D 2018-01-23 12:00:43 +09:00
Randy Mackay
efbd8eb386 AC_WPNav: remove unused definition
This has been moved to AC_PosControl library
2018-01-23 12:00:43 +09:00
Randy Mackay
368245017a AC_WPNav: access pos-controller's horizontal p object 2018-01-23 12:00:43 +09:00
Randy Mackay
9c00eb3d5f AC_PosControl_Sub: move pids to be local 2018-01-23 12:00:43 +09:00
Randy Mackay
c70d3e0ab8 AC_PosControl: move pids to be local 2018-01-23 12:00:43 +09:00
Randy Mackay
00037fd50e AC_PosControl_Sub: replace velocity pi with local pid 2018-01-23 12:00:43 +09:00
Randy Mackay
3a73ff1e2e AC_PosControl: replace velocity control with local 2-axis PID 2018-01-23 12:00:43 +09:00
Randy Mackay
398a0d89bf AC_P: add const accessor 2018-01-23 12:00:43 +09:00
Randy Mackay
c1708db208 AC_PID: add const and use is_positive in AC_PI_2D 2018-01-23 12:00:43 +09:00
Leonard Hall
fd964a21d6 AC_PID: add AC_PID_2D 2018-01-23 12:00:43 +09:00
Randy Mackay
9ea16bec15 AP_InertialSensor: resolve compiler warning in example 2018-01-23 08:32:48 +09:00
Steven Josefs
e8debde4b7 AC_Fence: hide ALT_MAX parameter from Rover 2018-01-22 20:42:31 +09:00
Randy Mackay
a1bf9d66f0 AC_Avoid: default behaviour to stop for Rovers 2018-01-22 17:18:41 +09:00
Randy Mackay
ae4ded86a8 AC_Avoid: get_max_speed supports linear acceleration
Also get_stopping_distance supports linear deceleration
2018-01-22 17:18:41 +09:00
Randy Mackay
dfaabb543c AC_Avoid: add adjust_speed
this method accepts a heading and speed instead of a velocity vector
2018-01-22 17:18:41 +09:00
Randy Mackay
9d74d82ff6 AC_Avoid: add stopping behaviour 2018-01-22 17:18:41 +09:00
Randy Mackay
c28cfcdc27 AP_Math: add Vector2f::circle_segment_intersection 2018-01-22 17:18:41 +09:00
Randy Mackay
a655c36159 AP_Math: add Vector2f::segment_intersection 2018-01-22 17:18:41 +09:00
Andrew Tridgell
2c73b374f5 AP_Motors: protect against writes to NULL servo_aux
if user changes parameter while setting up it could crash
2018-01-21 21:12:13 +11:00
Andrew Tridgell
bdb9f062ae AP_Motors: removed unused pwm parameters for heli 2018-01-21 21:12:13 +11:00
bnsgeyer
ac2e933358 AP_Motors: Tradheli - Fixed Directdrive Variable Pitch Feature 2018-01-21 21:12:13 +11:00
Andrew Tridgell
7b251c9739 HAL_ChibiOS: lower FRAM CS speed to 2MHz
this matches old firmware
2018-01-20 17:40:07 +11:00
Andrew Tridgell
30fd2da108 HAL_ChibiOS: enable RTSCTS and SBUS_OUT 2018-01-20 17:40:07 +11:00
Andrew Tridgell
93a993c575 AP_HAL: setup RTSCTS and SBUS_OUT 2018-01-20 17:40:07 +11:00
Andrew Tridgell
f8a3b0e753 AP_BoardConfig: improved board config
use hwdef.dat to enable RTSCTS and SBUS_OUT
2018-01-20 17:40:07 +11:00
Andrew Tridgell
63671b06a8 HAL_ChibiOS: added HAL_I2C_MAX_CLOCK define 2018-01-20 17:40:07 +11:00
Andrew Tridgell
88f11f5a50 HAL_ChibiOS: added HAL_I2C_BUS_BASE
this allows fmuv4 to start at bus 1
2018-01-20 17:40:07 +11:00
bugobliterator
c60c0b8ab1 HAL_ChibiOS: fix undef line processing 2018-01-20 17:40:07 +11:00
Andrew Tridgell
8286486890 HAL_ChibiOS: drop default SPI priority to 179 2018-01-20 17:40:07 +11:00
Andrew Tridgell
ab748034a2 HAL_ChibiOS: removed RC inversion logic
not needed any more
2018-01-20 17:40:07 +11:00
Andrew Tridgell
d6b9ab7756 AP_RCProtocol: tidy up frontend/backend split 2018-01-20 17:40:07 +11:00
Andrew Tridgell
ff5e00da32 AP_RCProtocol: fixed DSM decoding 2018-01-20 17:40:07 +11:00
bugobliterator
7db19cfae0 HAL_ChibiOS: use separate parameter for detect timeout 2018-01-20 17:40:07 +11:00
Andrew Tridgell
613d7a47ba HAL_ChibiOS: support RCIN on mindpx-v2 2018-01-20 17:40:07 +11:00
bugobliterator
02c7513f83 HAL_ChibiOS: add invert method and fix width measurement 2018-01-20 17:40:07 +11:00
bugobliterator
f7ac5aa079 HAL_ChibiOS: put rcin on a separate thread 2018-01-20 17:40:07 +11:00
Andrew Tridgell
f50f427a59 HAL_ChibiOS: added comment on beta fmuv4 board 2018-01-20 17:40:07 +11:00
Andrew Tridgell
743806116d HAL_ChibiOS: removed unusued ppm driver
now uses AP_RCProtocol
2018-01-20 17:40:07 +11:00
Andrew Tridgell
ccb85c2707 HAL_ChibiOS: fixed fmuv3 build with no ICU 2018-01-20 17:40:07 +11:00
Andrew Tridgell
f87668c15c AP_RCProtocol: lock onto a single protocol to reduce CPU cost 2018-01-20 17:40:07 +11:00
Andrew Tridgell
33c7cba9af HAL_ChibiOS: use more efficient push mechanism in IRQ
and don't use push_force() as it is not safe to do reads from within
the producer
2018-01-20 17:40:07 +11:00
Andrew Tridgell
d030f2888b AP_HAL: added multi-object push to RingBuffer
this is much more efficient than pushing them one at a time
2018-01-20 17:40:07 +11:00
Andrew Tridgell
7a4f429b85 HAL_ChibiOS: don't adjust buffer size for protocol
its all about IRQ latency, not IRQ rate
2018-01-20 17:40:07 +11:00
Andrew Tridgell
e2c8fe27ef HAL_ChibiOS: fixed memory handling in SoftSigReader 2018-01-20 17:40:07 +11:00
Andrew Tridgell
8be59c73c7 AP_RCProtocol: fixed return value when no input 2018-01-20 17:40:07 +11:00
bugobliterator
bad9f2b4c9 AP_RCProtocol: add library to process RC signals 2018-01-20 17:40:07 +11:00
bugobliterator
eeea2c9961 HAL_ChibiOS: use software signal reader for RCInput if available 2018-01-20 17:40:07 +11:00
bugobliterator
6be4c710c3 HAL_ChibiOS: add Software Signal reader using timer and DMA 2018-01-20 17:40:07 +11:00
bugobliterator
1db1ff799e HAL_ChibiOS: modify hwdef scripts to setup for generic RCIN 2018-01-20 17:40:07 +11:00
bugobliterator
1970d8a2c8 HAL_ChibiOS: use common RCIN pin for fmuv4 2018-01-20 17:40:07 +11:00
bugobliterator
445ba6ed39 HAL_ChibiOS: update ppm to use Extended ICU driver 2018-01-20 17:40:07 +11:00
Andrew Tridgell
7c23e33775 HAL_Chibios: set min output rate for oneshot to 100Hz
this will keep ESCs happy during gyro cal
2018-01-20 17:40:07 +11:00
Andrew Tridgell
b07c599bf2 Hal_Chibios: allow for faster INS sample times
we need higher priority on SPI and faster device loops
2018-01-20 17:40:07 +11:00
Andrew Tridgell
25f13ed518 HAL_Chibios: adjust MPU9250 clock speed down
this helps with fast sampling enabled
2018-01-20 17:40:07 +11:00
Andrew Tridgell
7e44b06440 HAL_ChibiOS: adjust SPI clock rates on FMUv4
this prevents some timing errors on the IMUs
2018-01-20 17:40:07 +11:00
Andrew Tridgell
dd59a5ff57 HAL_ChibiOS: adjust external bus clock for mpu9250
this fixes an issue with fast sampling on the PH2.1 cube
2018-01-20 17:40:07 +11:00
Andrew Tridgell
93fa74518a AP_IOMCU: limit rate to IOMCU to 500Hz
when running with very high loop rates we can saturate the IO link
2018-01-20 17:40:07 +11:00
Andrew Tridgell
880a84294e HAL_ChibiOS: support oneshot mode
supports oneshot 125 and oneshot
2018-01-20 17:40:07 +11:00
Andrew Tridgell
38a36a070f DataFlash: removed some special cases for ChibiOS 2018-01-20 17:40:07 +11:00
Andrew Tridgell
30903f2acb AP_IOMCU: support oneshot mode 2018-01-20 17:40:07 +11:00
Andrew Tridgell
ba3cdf74b5 HAL_Chibios: optional ADC debugging
this debugging capability is very useful on board bringup. It outputs
the first 6 analog channels as an AP_ADC MAVLink message
2018-01-20 17:40:07 +11:00
Andrew Tridgell
c863681849 HAL_ChibiOS: fixed PWM output assignment 2018-01-20 17:40:07 +11:00
Andrew Tridgell
82c6d2751f HAL_ChibiOS: fixed F412 ram and flash setup 2018-01-20 17:40:07 +11:00
Peter Barker
87be7fea0c AP_HAL: added support for Sparky2 STM23F405 board 2018-01-20 17:40:07 +11:00
Peter Barker
67bed1d6c2 HAL_ChibiOS: added support for Sparky2 STM23F405 board 2018-01-20 17:40:07 +11:00
Siddharth Purohit
a6be19d8cf HAL_SITL: fix sitl build for mac osx 2018-01-20 17:35:08 +11:00
Andrew Tridgell
8b0e9bcff4 AP_Scheduler: use pre-computed loop constants
this prevents changing the loop rate without a reboot. Too many
subsystems rely on a consistent loop rate to allow it to be changed
2018-01-20 15:35:58 +11:00
Peter Barker
f2242e07db AP_Scheduler: remove memoisation in loop_period_s() 2018-01-20 15:35:58 +11:00
Peter Barker
a6ac37d0ba AP_Scheduler: eliminate MAIN_LOOP_SECONDS macro 2018-01-20 15:35:58 +11:00
Leonard Hall
e249e06714 AC_PosControl: minor enhancement to lean_angles_to_accel 2018-01-20 09:49:58 +09:00
Andrew Tridgell
44dd079cb9 AP_Scheduler: allow for loop rates above 400Hz
with ChibiOS we can run copter at 1KHz with no scheduling misses. This
small PR allows that to be configured.
2018-01-20 10:40:37 +11:00
Andrew Tridgell
100363ba03 AP_InertialSensor: if no sensors found allow parameter change 2018-01-20 10:36:22 +11:00
Andrew Tridgell
24c424ae5d AP_InertialSensor: support over 1kHz IMUs
this allows for invensense IMUs to run above 1kHz by adjusting the
downsampling rate
2018-01-20 10:36:22 +11:00
Andrew Tridgell
c0c5f23aa5 AP_InertialSensor: added INS_ENABLE_MASK
this allows for only a specified subset of IMUs to be probed, so you
can disable IMUs that aren't needed.

The back corresponds to bits in the order the IMUs are normally probed
on the board
2018-01-20 10:36:22 +11:00
Andrew Tridgell
9416165fe3 AP_InertialSensor: improved invensense debugging on ChibiOS 2018-01-20 10:36:22 +11:00
Leonard Hall
d5976442f8 AC_PosControl: minor comment change
non-functional change
2018-01-19 15:40:32 +09:00
Leonard Hall
3ada0f32b0 AC_AttitudeControl: minor comment update
Non-functional change
2018-01-19 15:40:24 +09:00
mirkix
700171a0fc AP_HAL_Linux: add second RCIN port for Blue 2018-01-17 15:25:51 -08:00
Michael du Breuil
8712fbd55d AP_BattMonitor: Move per battery params into a containing class 2018-01-17 22:21:55 +00:00
Michael du Breuil
bb0d43d03c AP_BattMonitor: Remove unneeded memebers
is_powering_off was only used for solo, and was just an intermediate
copy before updating notify
2018-01-17 22:21:55 +00:00
Michael du Breuil
a1a5665213 AP_Param: Support marking a param group as ignoring the enable flag 2018-01-17 22:21:55 +00:00
Nikita Tomilov
1549b1a52a AP_BoardConfig: CAN: Merge PX4 and Linux CAN setup
Here we merge PX4 and Linux CAN bus setup since the interface is almost
the same for both of them.
2018-01-17 07:24:17 -08:00
Tom Pittenger
d713d57904 AP_HAL_Linux: update software license referencing UAVCAN submodule 2018-01-17 07:24:17 -08:00
Nikita Tomilov
3ac2e4e8c5 AP_HAL_Linux: CAN: _pollRead no more than 100 iterations
This adds a counter here to only loop to a maximum number of iterations.
Now we avoid situations in which we would be stuck processing packets here.
This also adds some other meaningful defines
2018-01-17 07:24:17 -08:00
Nikita Tomilov
43bfcbc8e2 AP_HAL_Linux: CAN: Rename CANDriver -> CANManager 2018-01-17 07:24:17 -08:00
Nikita Tomilov
d0fc481202 AP_HAL_Linux: CAN: Rename Linux::LinuxCAN -> Linux::CAN 2018-01-17 07:24:17 -08:00
Alexey Bulatov
e0acbd3e53 AP_HAL_LINUX: Add CAN to timer_task 2018-01-17 07:24:17 -08:00
Alexey Bulatov
606eb05c95 AP_BoardConfig: Linux CAN initialisation 2018-01-17 07:24:17 -08:00
Nikita Tomilov
a50e6c6dd7 AP_HAL: board: linux: Add default CAN interface name 2018-01-17 07:24:17 -08:00
Nikita Tomilov
b6665f7e58 AP_HAL_Linux: CAN: get rid of RaiiCloser 2018-01-17 07:24:17 -08:00
Alexey Bulatov
976500960f AP_HAL_LINUX: Add CAN driver 2018-01-17 07:24:17 -08:00
Alexey Bulatov
09de8e852d AP_HAL: Make methods get_UAVCAN and set_UAVCAN pure 2018-01-17 07:24:17 -08:00
Dylan Herman
85e1f9f9f6 AP_SmartRTL: attempts to set home in update
update will continuously attempt to set SmartRTL home as long as
position is ok and home has not be set. Updated examples to use set_home.
2018-01-17 11:03:33 +09:00
Andrew Tridgell
8fea99e1da HAL_Linux: use calloc in preferance to malloc 2018-01-17 11:22:05 +11:00
Andrew Tridgell
3f5534eed5 AP_HAL: use calloc in preferance to malloc 2018-01-17 11:22:05 +11:00
Andrew Tridgell
f6138e3c91 HAL_ChibiOS: use calloc in preferance to malloc 2018-01-17 11:22:05 +11:00
Andrew Tridgell
20d75f52c2 AP_Compass: use calloc in preferance to malloc 2018-01-17 11:22:05 +11:00
Andrew Tridgell
c9deabc283 DataFlash: use calloc in MAVLink backend 2018-01-17 11:22:05 +11:00
Andrew Tridgell
8dae3fe59b HAL_ChibiOS: use calloc for malloc type
this is not strictly necessary on ChibiOS as we already override
malloc, but will keep static analysis happy
2018-01-17 11:22:05 +11:00
Andrew Tridgell
a99b690d49 HAL_PX4: use calloc for malloc_type()
this ensures that EKF memory is zero on start
2018-01-17 11:22:05 +11:00
Andrew Tridgell
4322ef7ca4 AP_HAL: prevent valgrind errors in EKF
ensure that EKF memory is zero on start
2018-01-17 11:22:05 +11:00
Randy Mackay
094620bc8a AC_WPNav: pass dt to avoidance 2018-01-16 12:13:48 +09:00
Leonard Hall
f48b14b810 AC_Avoidance: accept dt and pass to sqrt controller 2018-01-16 12:13:48 +09:00
Leonard Hall
b9ed8b292a AC_PosControl: pass dt to att control sqrt_controller 2018-01-16 12:13:48 +09:00
Leonard Hall
62cc25022c AC_AttitudeControl: protect against overshoot in sqrt controller 2018-01-16 12:13:48 +09:00
Leonard Hall
75de0cb4ef AC_AttitudeControl: sqrt_controller accepts dt 2018-01-16 12:13:48 +09:00
Leonard Hall
0a10deb3f7 AP_Motors: Fix gain scaling on Throttle Average Max and reduce additional gain on low throttle for Single and Coax. 2018-01-16 11:50:30 +09:00
Andrew Tridgell
7ca3b56886 HAL_ChibiOS: fixed STM32F405 typos 2018-01-16 09:46:30 +11:00
Andrew Tridgell
b6f3db44d8 DataFlash: log health and primary for airspeed 2018-01-16 07:14:20 +11:00
Andrew Tridgell
5846558b0e AP_Baro: moved constants to AP_Math/definitions.h 2018-01-16 07:14:20 +11:00
Andrew Tridgell
ee1fea55ce AP_Math: moved constants from AP_Baro 2018-01-16 07:14:20 +11:00
Andrew Tridgell
8bb0ad7f3a AP_Arming: check all airspeed sensors are healthy 2018-01-16 07:14:20 +11:00
Andrew Tridgell
bbcda11afe DataFlash: log both airspeed sensors 2018-01-16 07:14:20 +11:00
Andrew Tridgell
58b0ac07ec AP_Airspeed: support dual airspeed sensors
allow for a primary and secondary airspeed sensor
2018-01-16 07:14:20 +11:00
rde-mato
87e3777f67 AP_Airspeed: added SDP3X airspeed sensor driver 2018-01-16 07:14:20 +11:00
rde-mato
787420931e AP_Baro: make AP_Baro a singleton
for AP_Airspeed
2018-01-16 07:14:20 +11:00
Andrew Tridgell
e120e912f1 HAL_ChibiOS: moved board defines to hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell
d2c04aa649 AP_HAL: moved board defines to hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f8542c86b6 AP_Terrain: added support for AP_Terrain for ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
2773b17fad AP_HAL: added support for AP_Terrain for ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
e2a65c8c60 HAL_ChibiOS: added support for AP_Terrain for ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
cde930f5c8 HAL_ChibiOS: added skyviper-v2450 hwdef config 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c8beddf1e4 HAL_ChibiOS: allow for includes in hwdef.dat files
this allows creation of derived boards
2018-01-15 11:46:02 +11:00
Andrew Tridgell
2929b3dbb1 HAL_ChibiOS: allow builds on systems with no SDIO 2018-01-15 11:46:02 +11:00
Andrew Tridgell
7b0eccc309 HAL_ChibiOS: updated skyviper-f412 hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell
60a773d045 HAL_ChibiOS: removed duplicate defines 2018-01-15 11:46:02 +11:00
Andrew Tridgell
ff87d27143 AP_BoardConfig: fixed return of get_pwm_count()
thanks to Michael for noticing
2018-01-15 11:46:02 +11:00
Andrew Tridgell
ef1a14cc6c HAL_ChibiOS: fixed 5V analog scale on fmuv4 and mindpx-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
867e7ebf71 HAL_ChibiOS: auto-generate GPIO table from hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell
fbe8166c71 HAL_ChibiOS: auto-generate AnalogIn pin table 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f14a847b97 HAL_ChibiOS: rename classes to remove 'Chibi'
it is redundent as all classes are in ChibiOS namespace, and makes the
code harder to read
2018-01-15 11:46:02 +11:00
Andrew Tridgell
25b68dc150 HAL_ChibiOS: switch base freq when needed
timers can't do below 123 Hz with a clock of 8MHz, so we need to
change clock frequency based on the target period
2018-01-15 11:46:02 +11:00
Andrew Tridgell
ff3b0ec1bd AP_IOMCU: added set_default_rate method 2018-01-15 11:46:02 +11:00
Andrew Tridgell
738d70ef02 HAL_ChibOS: fixed handling of disabled channels 2018-01-15 11:46:02 +11:00
Andrew Tridgell
320ada2002 AP_IOMCU: fixed crash with BRD_IO_ENABLE=0 2018-01-15 11:46:02 +11:00
Andrew Tridgell
2978649cd4 waf: moved to generated loader script 2018-01-15 11:46:02 +11:00
Andrew Tridgell
6e4ef32628 HAL_ChibiOS: moved to generated loader script 2018-01-15 11:46:02 +11:00
Andrew Tridgell
9482ab1840 waf: use common makefile for ChibiOS if no custom present 2018-01-15 11:46:02 +11:00
Andrew Tridgell
bae9469af7 HAL_ChibiOS: use a common makefile and board.c
allow for custom files per board if supplied, but don't require them
for every board
2018-01-15 11:46:02 +11:00
Andrew Tridgell
d17e9f321a HAL_ChibOS: fixed mixture of brushed and normal PWM
allow non-brushed PWM servos with brushed main motors
2018-01-15 11:46:02 +11:00
Andrew Tridgell
c639708e22 HAL_ChibOS: auto-generate full PWM config
use PWM markers in hwdef.dat to mark each PWM channel
2018-01-15 11:46:02 +11:00
Andrew Tridgell
b741c6c29e AP_Compass: fixed build error on ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
daa9eec836 HAL_ChibiOS: auto-configure timer channels
allow for one marked PPMIN for input
2018-01-15 11:46:02 +11:00
Andrew Tridgell
d65ec2ada7 HAL_ChibiOS: moved more headers to common
allow customisation, but don't require every port to copy the defaults
2018-01-15 11:46:02 +11:00
Andrew Tridgell
960bc40ff3 HAL_ChibiOS: moved to a common mcuconf.h 2018-01-15 11:46:02 +11:00
Andrew Tridgell
48d2704cf4 HAL_ChibiOS: CS pins don't need to be a single SPI BUS
its possible to use a CS pin on different buses, so they should not
have a particular bus tag
2018-01-15 11:46:02 +11:00
Andrew Tridgell
a554215576 HAL_ChibiOS: start to cope with not having I2C, SPI and UARTs 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f5c8754d75 HAL_ChibiOS: use ARRAY_SIZE_SIMPLE
this allows for boards without a device type (eg. no SPI bus)
2018-01-15 11:46:02 +11:00
Andrew Tridgell
7aeab8f5a8 AP_Common: added ARRAY_SIZE_SIMPLE()
this works with zero length arrays
2018-01-15 11:46:02 +11:00
Andrew Tridgell
468cadca45 HAL_ChibiOS: auto-generate UART driver declarations 2018-01-15 11:46:02 +11:00
Andrew Tridgell
8e87c30a33 AP_Compass: fixed MindPX-v2 compass orientations 2018-01-15 11:46:02 +11:00
Andrew Tridgell
8ab35e8aca AP_InertialSensor: fixed MindPX-v2 orientation of IMU2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
58796ff435 HAL_Chibios: moved SPI device tables to hwdef.dat 2018-01-15 11:46:02 +11:00
Andrew Tridgell
d1f93cd66c HAL_Chibios: auto-generate I2C, SPI and UART device lists
this is less error prone and make a port faster as more information is
in hwdef.dat
2018-01-15 11:46:02 +11:00
Andrew Tridgell
c80149123f AP_HAL: use hwdef.h for config options in chibios 2018-01-15 11:46:02 +11:00
Andrew Tridgell
dcab40459d AP_InertialSensor: support MindPX-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
8699b6233a AP_HAL: support MindPX-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
36a141f9f1 AP_Compass: support MindPX-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
5458377e67 AP_BoardConfig: support MindPX-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
51f9f087ab AP_Baro: support MindPX-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
280140bf25 HAL_ChibiOS: added support for MindPX-v2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
febe414766 AP_InertialSensor: disable fast sampling on 2nd IMU on Pixracer
it also hosts a mag, and gets lots of FIFO resets if we try to run it
at 8kHz
2018-01-15 11:46:02 +11:00
Andrew Tridgell
9f5e01d20a HAL_Chibios: fixed FMUv4 compasses 2018-01-15 11:46:02 +11:00
Andrew Tridgell
2646b9ef33 HAL_Chibios: matched debug port speed to NuttX 2018-01-15 11:46:02 +11:00
Andrew Tridgell
41be81af34 HAL_Chibios: added hardware flow control for UARTs
implement RTS in software and CTS in hardware
2018-01-15 11:46:02 +11:00
Andrew Tridgell
9916a93919 HAL_ChibiOS: fixed I2C device list 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f135e73e04 HAL_ChibiOS: F412 doesn't have CCM ram 2018-01-15 11:46:02 +11:00
Andrew Tridgell
85f4958e4e AP_OpticalFlow: use AP_FEATURE_BOARD_DETECT 2018-01-15 11:46:02 +11:00
Andrew Tridgell
3fc095589c AP_InertialSensor: support ChibiOS FMUv4 2018-01-15 11:46:02 +11:00
Andrew Tridgell
0b6659b36a AP_Baro: support ChibiOS FMUv4 2018-01-15 11:46:02 +11:00
Andrew Tridgell
02c3bea5a5 AP_BoardConfig: support ChibiOS FMUv4 2018-01-15 11:46:02 +11:00
Andrew Tridgell
743714de4c AP_Compass: support ChibiOS FMUv4 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c7fd455f6a AP_HAL: added FMUv4 port for ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c3435e45c5 HAL_ChibiOS: initial port to FMUv4 2018-01-15 11:46:02 +11:00
bugobliterator
5feef04f5f HAL_ChibiOS: add support for CCM memory
this uses DMA bounce buffers for bus transfers, and falls back to CCM
ram in allocations if the type is unspecified
2018-01-15 11:46:02 +11:00
bugobliterator
ea2a880d8a AP_NavEKF3: allocate from MEM_FAST region 2018-01-15 11:46:02 +11:00
bugobliterator
b1213a522d AP_NavEKF2: allocate NavEKF core from MEM_FAST region 2018-01-15 11:46:02 +11:00
bugobliterator
1c6beaa7c4 AP_InertialSensor: use new API for DMA safe allocation 2018-01-15 11:46:02 +11:00
bugobliterator
e591265329 HAL_PX4: change dma_allocate api to malloc_type 2018-01-15 11:46:02 +11:00
bugobliterator
9d6ab78376 AP_HAL: add support for memory allocation by region type 2018-01-15 11:46:02 +11:00
Andrew Tridgell
08346deed5 AP_BattMonitor: run SMBus batteries at 100kHz
use longer timeouts and SMBUS mode. This fixes the SMBus battery
support for Solo on ChibiOS
2018-01-15 11:46:02 +11:00
Andrew Tridgell
f2102bba05 HAL_VRBrain: fixed I2C get_device() interface
just stubs for now
2018-01-15 11:46:02 +11:00
Andrew Tridgell
ded22a6766 HAL_PX4: fixed I2C get_device() interface
just stubs for now
2018-01-15 11:46:02 +11:00
Andrew Tridgell
43c1bd0ae9 HAL_Linux: fixed I2C get_device() interface
just stubs for now
2018-01-15 11:46:02 +11:00
Andrew Tridgell
5e19183e90 HAL_Empty: fixed I2C get_device() interface 2018-01-15 11:46:02 +11:00
Andrew Tridgell
36227aa126 HAL_ChibiOS: implement bus speed and smbus for I2C
use the slowest speed of all devices on the bus
2018-01-15 11:46:02 +11:00
Andrew Tridgell
8260b3f65f AP_HAL: allow bus speed and SMBUS enable on I2C
this allows a driver to request a bus speed for a device, and whether
the device should be in SMBUS mode. It also allows a min timeout to be
specified, to allow for slow devices
2018-01-15 11:46:02 +11:00
Andrew Tridgell
4b5e617673 HAL_ChibiOS: added missing DMA table for STM32F405 2018-01-15 11:46:02 +11:00
Peter Barker
f3d46506b0 AP_HAL_Chibios: warning fixes 2018-01-15 11:46:02 +11:00
Andrew Tridgell
791edee0ff HAL_Chibios: added more SPI devices for FMUv3 2018-01-15 11:46:02 +11:00
Andrew Tridgell
ddf8523c2b AP_OpticalFlow: prevent crash on bad device name 2018-01-15 11:46:02 +11:00
Andrew Tridgell
755eca31c2 HAL_Chibios: don't unregister shared DMA
the shared DMA handle is a property of the bus, not the device, so
should not be unregistered when the device is removed
2018-01-15 11:46:02 +11:00
Andrew Tridgell
9812fc9574 HAL_Chibios: prevent creation of i2c devices on invalid bus 2018-01-15 11:46:02 +11:00
Andrew Tridgell
82b5b94e24 AP_IOMCU: fixed race condition on thread startup
thread_ctx may not be set for first trigger_event()
2018-01-15 11:46:02 +11:00
Andrew Tridgell
b62773bbad HAL_ChibiOS: improved auto-config of ADC pins
ADC config now based on pin_scaling array
2018-01-15 11:46:02 +11:00
Andrew Tridgell
1cc4b92b76 HAL_ChibiOS: added additional FMUv3 analog pins 2018-01-15 11:46:02 +11:00
Andrew Tridgell
aa2175ec0c HAL_ChibiOS: show ADC1 channels in hwdef.h 2018-01-15 11:46:02 +11:00
Andrew Tridgell
5a7e2f75d1 HAL_ChibiOS: added ADC1_Map to STM32 tables 2018-01-15 11:46:02 +11:00
Andrew Tridgell
3a004adbd4 HAL_Chibios: use macro for NUM_GROUPS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
b57f8f01c6 HAL_Chibios: fixed return for read on invalid gpio pin 2018-01-15 11:46:02 +11:00
Andrew Tridgell
82cc36d6d0 AP_BoardConfig: called board_setup() even without autodetect
we need to init hal.rcou and hal.gpio
2018-01-15 11:46:02 +11:00
Andrew Tridgell
b1ebbd1a1c AP_BoardConfig: enable auto-detect only on FMUv3
F412 should not do board detection
2018-01-15 11:46:02 +11:00
Andrew Tridgell
7971f03bde Hal_Chibios: fixed F412 SPI config 2018-01-15 11:46:02 +11:00
Andrew Tridgell
51512ed7c0 AP_Param: don't panic on bad embedded parameters
this makes life much easier for vendors
2018-01-15 11:46:02 +11:00
Andrew Tridgell
21f40da510 HAL_Chibios: align GPIO pins with px4 build 2018-01-15 11:46:02 +11:00
Andrew Tridgell
60b1eab06d AP_BoardConfig: added get_pwm_count() 2018-01-15 11:46:02 +11:00
Andrew Tridgell
26d6947bf6 HAL_ChibiOS: fixed PWM output 2018-01-15 11:46:02 +11:00
Andrew Tridgell
e88fe93688 AP_BoardConfig: init chibios IO after boardconfig
this allows for the init to use parameters such as BRD_IO_ENABLE from
AP_BoardConfig
2018-01-15 11:46:02 +11:00
Andrew Tridgell
c742543565 HAL_Chibios: align SPI device IDs with px4 IDs
this makes for easier update to ChibiOS without redoing accelcal
2018-01-15 11:46:02 +11:00
Andrew Tridgell
7cb1c0420a AP_BoardConfig: include BRD_IO_ENABLE on ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
4ce696a520 AP_Math: fixed example build on ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
347c774665 AP_HAL: fixed example build on ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
2941afa62b AP_Beacon: fixed example build on ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f5b24a3838 AP_Math: fixed build of Sub with ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
6dbab450a5 Hal_Chibios: use AP_BoardConfig::io_enabled() 2018-01-15 11:46:02 +11:00
Andrew Tridgell
13f4780815 AP_BoardConfig: make a singleton
allows for io_enabled() static function
2018-01-15 11:46:02 +11:00
Andrew Tridgell
340d85642e AP_Gripper: build fix for ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c0c4021605 SRV_Channels: fix for replay 2018-01-15 11:46:02 +11:00
Andrew Tridgell
d0d6040b3e AP_Param: use wider range of sentinal values
this copes better with power off while writing parameters
2018-01-15 11:46:02 +11:00
bugobliterator
be4e9f27f7 AP_Module: restrict module related headers to systems that can use it 2018-01-15 11:46:02 +11:00
Andrew Tridgell
3d2c4ffa79 AP_Math: allow write to indexed vector2 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f088c3de23 AP_Math: added long templates 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c62dbcdb62 HAL_PX4: allow for printf from multiple threads
this is useful for hal.console
2018-01-15 11:46:02 +11:00
Andrew Tridgell
979ee67c19 HAL_PX4: cope with failed flash writes
we need to recover from possible bad flash
2018-01-15 11:46:02 +11:00
Andrew Tridgell
86fbdcd060 HAL_ChibiOS: ensure malloc returns zeroed memory 2018-01-15 11:46:02 +11:00
Andrew Tridgell
e255f07022 GCS_MAVLink: rename ch variable
avoid conflict with ch variable from ChibiOS
2018-01-15 11:46:02 +11:00
Andrew Tridgell
43a6ed4099 DataFlash: support ChibiOS FATFS implementation 2018-01-15 11:46:02 +11:00
Andrew Tridgell
3cd5386a7e AP_OpticalFlow: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
3b5f66fd9f AP_FlashStorage: fixed size of flash storage 2018-01-15 11:46:02 +11:00
Andrew Tridgell
0bfbc4bf72 AP_FlashStorage: added re_initialise() API 2018-01-15 11:46:02 +11:00
Andrew Tridgell
d1fd843539 AP_IOMCU: support IMU heater 2018-01-15 11:46:02 +11:00
Andrew Tridgell
1568f578d7 AP_IOMCU: added retries on event failure 2018-01-15 11:46:02 +11:00
Andrew Tridgell
9b9b4a169e AP_IOMCU: fixed build on systems without IO MCU 2018-01-15 11:46:02 +11:00
Andrew Tridgell
71a47303b4 AP_IOMCU: support servo voltage and rssi 2018-01-15 11:46:02 +11:00
Andrew Tridgell
bb3ed9d6a3 AP_IOMCU: added APIs for RC input 2018-01-15 11:46:02 +11:00
Andrew Tridgell
ceeade5822 AP_IOMCU: added periodic reading of RC input 2018-01-15 11:46:02 +11:00
Andrew Tridgell
06322da4e2 AP_IOMCU: added setting of output rates 2018-01-15 11:46:02 +11:00
Andrew Tridgell
39f60adcd7 AP_IOMCU: initial implementation of PWM and safety 2018-01-15 11:46:02 +11:00
Andrew Tridgell
0c01ae1223 AP_IOMCU: started on MCU IO library 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f37d1e3363 AP_RAMTRON: added RAMTRON fram device driver
for parameter storage on most stm32 boards
2018-01-15 11:46:02 +11:00
Andrew Tridgell
39362a81ae AP_InertialSensor: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
391affc02d AP_HAL: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
5d9fa7f85b AP_Compass: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
c8c563f90d AP_Baro: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
f8bea3af14 AP_BattMonitor: support ChibiOS 2018-01-15 11:46:02 +11:00
Andrew Tridgell
accac344f2 AP_BoardConfig: support ChibiOS as well as NuttX
allow for board detection with ChibiOS
2018-01-15 11:46:02 +11:00
Andrew Tridgell
8b6bab7b17 HAL_Chibios: added ChibiOS HAL
this is based on initial work by Sid, reset here for easier merging
2018-01-15 11:46:02 +11:00
Michael du Breuil
8ef7e61066 AP_HAL_SITL: Spam u-blox NAV-SVINFO at 0.1Hz
This resolves EKF3 being hung on launch
2018-01-13 10:13:00 +09:00
Leonard Hall
eb6ab53f6c AP_Motors: fix optimum thrust calcs 2018-01-13 10:06:11 +09:00
Randy Mackay
4d0c24f4eb AC_WPNav: RFND_USE param desription update 2018-01-12 16:50:00 +09:00
Leonard Hall
cddd815a75 AC_AttitudeControl: comment thrust_heading_rotation_angles
non-functional change
2018-01-12 15:20:47 +09:00
Randy Mackay
86cbc445bd AP_Compass: ICM20948 default rotation to Pitch180Yaw90 2018-01-12 08:16:41 +09:00
Randy Mackay
5e90cdbf59 AR_AttitudeControl: parameter desc range increase
new steering controller can use higher FF and zero P
2018-01-12 08:15:34 +09:00
Leonard Hall
3e0c24adf9 AC_PosControl: remove out-of-date comments 2018-01-11 21:18:34 +09:00
Peter Barker
18d7d3f038 DataFlash: add missing FALLTHROUGH declarations 2018-01-11 13:23:06 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
596119bca3 GCS_MAVLink: do not use hardcoded array sizes 2018-01-11 09:52:13 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
24ad9e9dff GCS_MAVLink: Adapt to upstream mavlink changes in autopilot_version message 2018-01-11 09:52:13 +11:00
Tom Pittenger
36f06d3576 AP_InertialSensor: remove AP_InertialSensor_UserInteract
leftover dead code from when CLI was removed
2018-01-11 08:11:07 +11:00
Peter Barker
8d7c710e9b GCS_MAVLink: panic in SITL if unknown message sent 2018-01-10 19:11:15 +00:00
Michael du Breuil
5fedc65efb AP_Airspeed: Allow specifying the MS5525 address 2018-01-10 17:49:35 +00:00
Andrew Tridgell
e5813effff RC_Channel: improved efficiency of min_max_configured
this is quite a costly function due to scan in AP_Param. It takes
about 4 to 5 milliseconds when done as part of AP_Arming
2018-01-10 16:42:51 +09:00
Peter Barker
404e395880 DataFlash: avoid declarations of SITL-only functions 2018-01-09 23:21:58 +00:00
Peter Barker
fd0aa3c659 DataFlash: add validation for Log_Write parameters 2018-01-09 23:21:58 +00:00
Peter Barker
5070628230 DataFlash: factor out validate_structure 2018-01-09 23:21:58 +00:00
mirkix
8d7000db2c AP_HAL_Linux: fix typo 2018-01-09 12:54:03 -08:00
Michael du Breuil
9e37e9ee82 AP_GPS: Remove unused blending function.
Thanks to ender-chen for noticing, closes #7510
2018-01-09 12:52:32 -08:00
Peter Barker
c8e0ae6890 AC_Fence: adjust fence sys_status failed based on position and parameters 2018-01-09 17:15:19 +00:00
Peter Barker
e30a6bbce3 AC_Fence: rename sys_status methods from geofence_ to sys_status_ 2018-01-09 17:15:19 +00:00
Peter Barker
a5aafab7ff AC_Fence: use pre-arm checks for sanity checks
Magically resetting people's parameters not a great look.
2018-01-09 17:15:19 +00:00
Peter Barker
155407956c AC_Fence: add a pre-arm check for polygon fence validity
Also change SYS_STATUS bit to be unhealthy if boundary invalid
2018-01-09 17:15:19 +00:00
Peter Barker
aba525e4c5 GCS_Console: remove GCS_Console 2018-01-09 13:46:22 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
f6ab044161 GCS_MAVLink: add microseconds since boot to the home and origin Mavlink messages 2018-01-09 13:01:05 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
479d4be3fd AP_GPS: Add horizontal, vertical and speed accuracy to the GPS_RAW_INT message 2018-01-09 13:01:05 +11:00
Hiroshi Takey (hiro2233)
aa6f66f29b AP_Motors: Updated Motor example. 2018-01-09 08:12:01 +09:00
Randy Mackay
1bb18bc941 AR_AttitudeControl: get_throttle_out_speed uses timeout definition 2018-01-05 13:33:21 +09:00
Randy Mackay
4ac5ef3a13 AR_AttitudeControl: allow filter to be zero
Also increase default filter to 50hz
2018-01-05 13:33:21 +09:00
Randy Mackay
16d3e5c00d AR_AttitudeControl: add feed foward for speed and steering rate control 2018-01-05 13:33:21 +09:00
Randy Mackay
40bb2b0ad9 AR_AttitudeControl: set throttle speed pid dt 2018-01-05 13:33:21 +09:00
Randy Mackay
9930550cfc AR_AttitudeControl: lengthen timeout to 200ms
This is required because occasionally the turn rate controller can be disabled for just over 100ms as new navigation commands are loaded
2018-01-05 13:33:21 +09:00
Randy Mackay
a2b1807ca0 AR_AttitudeControl: fix turn-rate controller timeout 2018-01-05 13:33:21 +09:00
Randy Mackay
4e8155f4e5 AC_PID: allow non-zero ff gain default 2018-01-05 13:33:21 +09:00
Randy Mackay
1531801c83 AP_WheelEncoder: minor comment fix 2018-01-04 14:08:17 +09:00
Matt
b5bdaa18ac AP_AVOIDANCE: Minimum altitude for avoidance action 2017-12-30 13:50:42 -08:00
dheideman
521bece9e7 AP_JSButton: Add servo toggle button function 2017-12-28 14:14:47 -05:00
dheideman
307638e8af AP_JSButton: Add momentary servo button function 2017-12-28 14:14:47 -05:00
dheideman
dd239183c1 AP_JSButton: Add momentary relay button function 2017-12-28 14:14:47 -05:00
Peter Barker
588b0c17c8 AC_Fence: remove AC_FENCE_TYPE_NONE define
0 is the appropriate value for a bitmask which is empty
2017-12-28 15:38:37 +00:00
Peter Barker
aa482bae40 AC_Fence: remove argument to check()
Also, rename check_fence() to check()
2017-12-28 15:38:37 +00:00
Andrew Tridgell
55f73f4163 AP_Airspeed: fixed timing errors in MS5525 driver
this fixes issue #7188, where we could read from the MS5525 sensor too
soon after requesting data and the result coming back would be garbage
2017-12-27 11:05:54 -08:00
mirkix
4b1ec08eaf AP_BattMonitor: add new board PocketPilot 2017-12-27 16:01:55 +00:00
mirkix
0926802013 AP_Notify: add new board PocketPilot 2017-12-27 16:01:55 +00:00
mirkix
9b6a826b49 AP_HAL_linux: add new board PocketPilot 2017-12-27 16:01:55 +00:00
mirkix
0e7ade6f0c AP_HAL: add new board PocketPilot 2017-12-27 16:01:55 +00:00
Pierre Kancir
8c8767e964 AP_InertialSensor: reduce QURT include scope 2017-12-27 15:13:30 +00:00
Pierre Kancir
14b5c8a6c4 AP_Baro: don't include vehicle specific baro by default 2017-12-27 15:13:30 +00:00
Peter Barker
a35e86c2fd AP_SmartRTL: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Peter Barker
7646e09349 AP_OpticalFlow: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Peter Barker
e584a90c81 AP_Module: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Peter Barker
89d3289400 AP_Mission: AP_AHRS no longer requires GPS in constructor 2017-12-27 00:58:02 +00:00
Peter Barker
5dc714bf5f AP_NavEKF3: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
9c8466dc03 AP_NavEKF2: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
aea460df2c AP_FrSky: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
e15442355a AP_AHRS: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
ca4f25a78e AP_Terrain: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
fb3cba3867 AP_Mount: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
a4584431a2 AP_Landing: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
d1d5a484ce AP_ADSB: use GPS singleton 2017-12-27 00:58:02 +00:00
Peter Barker
e0c586876b APM_Control: use GPS singleton 2017-12-27 00:58:02 +00:00
Hiroshi Takey (hiro2233)
fb5b6f2169 AP_Airspeed: Updated Airspeed example. 2017-12-26 14:57:58 +00:00
Peter Barker
dea15892dc AP_Volz_Protocol: use AP::serialmanager() 2017-12-21 04:35:11 +00:00
Peter Barker
b3f5e807a6 AP_SerialManager: add AP::serialmanager() 2017-12-21 04:35:11 +00:00
Pierre Kancir
6728598099 AP_Rangefinder: don't include Bebop rangefinder by default 2017-12-21 04:13:09 +00:00
Pierre Kancir
be96a27fa8 AP_NavEKF3: only report terrain estimator innovations with valid rng value 2017-12-18 22:51:46 +00:00
Pierre Kancir
171e80d8dc AP_NavEKF2: only report terrain estimator innovations with valid rng value 2017-12-18 22:51:46 +00:00
khancyr
2732226664 AP_AHRS: use direct assignation and correct some style 2017-12-18 22:43:59 +00:00
khancyr
dae636b39e AP_AHRS: correct some constcorrectness 2017-12-18 22:43:59 +00:00
khancyr
d89d496c8f AP_AHRS: make getter const 2017-12-18 22:43:59 +00:00
mirkix
eecd8fcfa6 AP_HAL_Linux: Add VOLTAGE_SCALING for BeagleBone Blue 2017-12-19 09:17:06 +11:00
Andrew Tridgell
4ac49483c8 AP_Param: added support for embedded parameters
use a block of flash to hold embedded parameters that can be changed
using apj_tool.py
2017-12-18 11:14:59 +11:00
Peter Barker
738377c089 AP_Arming: remove airspeed arming check bits from non-plane vehicles 2017-12-16 11:08:35 +11:00
Peter Barker
0f94fde434 AC_Fence: get home distance directly from ahrs 2017-12-15 01:42:49 +00:00
Peter Barker
20e295c23a AC_Fence: check supplied location within fence rather than current loc 2017-12-15 01:24:13 +00:00
Peter Barker
dff27ec506 AC_WPNav: correct call for getting location vector
Function has been renamed and only takes a Vector2f
2017-12-15 01:24:13 +00:00
Peter Barker
302e5c6871 AP_Common: have get_vector_xy_from_origin_NE take a Vector2f rather than 3f
Also, rename it from get_vector_xy_from_origin_NED
2017-12-15 01:24:13 +00:00
mirkix
26f3a62db7 AP_HAL_Linux: remove BBBmini from RCInput_PRU.cpp 2017-12-14 12:40:37 -08:00
Mark Whitehorn
f57eab3482 AP_SerialManager: add Volz and Sbus protocols to param metadata 2017-12-14 19:27:02 +00:00
ChristopherOlson
569f55f5c6 AC_AttitudeControl:TradHeli - fix for alt_hold angle limiter active at hover collective in Traditional Helicopters
add definition for max collective/throttle for helicopters that compensates for negative collective pitch range
and sets proper collective overhead before alt_hold angle limiter becomes effective
2017-12-14 20:46:13 +09:00
Andrew Tridgell
1c503ee459 SRV_Channel: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
fd14dedcff DataFlash: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
15026c6898 AP_Volz_Protocol: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
d175fb2f18 AP_Terrain: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
b6ecce8329 AP_TECS: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
003851a5c1 AP_SmartRTL: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
1cdbb09466 AP_ServoRelayEvents: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
dd489a0797 AP_SerialManager: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
580af4a69a AP_Scheduler: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
dec3a27d91 AP_SBusOut: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
076f7bc0cf AP_RSSI: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
9b4fef4d50 AP_RPM: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
16cd31b63a AP_Relay: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
e9b847b5ee AP_RCMapper: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
ffced7d591 AP_RangeFinder: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
7122cae589 AP_Rally: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
e798b38271 AP_Parachute: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
0d4dca0394 AP_OpticalFlow: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
cd51c71857 AP_Notify: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
c13eaf0c7f AP_NavEKF3: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
4d4e66d825 AP_NavEKF2: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
3d2c81ff05 AP_Mount: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
c72c1de99e AP_Module: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
a3e07f66a1 AP_Mission: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
1dac512567 APM_Control: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
5f4680bf2c AP_LeakDetector: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
645508224f AP_Landing: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
ad99b04de7 AP_LandingGear: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
31092da426 AP_L1_Control: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
99499dece2 AP_InertialSensor: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
d2c9e2719e AP_GPS: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
c618a27ee0 AP_Frsky_Telem: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
f326377a5c AP_Compass: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
573a5bf3d0 AP_Camera: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
a4d2d79ce7 AP_BoardConfig: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
ca91edbbeb AP_Beacon: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
a4c56fcb82 AP_BattMonitor: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
68f8817e97 AP_Baro: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
8c1cf9affe AP_Airspeed: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
0ccaa5bcba AP_AHRS: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
6487a22acd AP_ADSB: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
85f9fecd24 AC_Sprayer: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
9ba8097502 AC_PrecLand: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
25c409d4a2 AC_InputManager: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
25b9a7e711 AC_Fence: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
d5c55e0dfe AC_Avoidance: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Andrew Tridgell
7a6ab4ac44 AP_AHRS: fixed a bug with startup ordering of SITL
this fixes a crash that can happen with SITL
2017-12-13 14:09:39 +11:00
Peter Barker
86fe1671c1 AC_Fence: fix comment 2017-12-13 10:04:50 +09:00
Peter Barker
e8151a7ec1 AC_Fence: require home as well as origin for prearm checks 2017-12-13 10:04:50 +09:00
Peter Barker
1ecfdffa76 AC_Fence: methods to help populate SYS_STATUS 2017-12-13 10:04:50 +09:00
Peter Barker
ac3f030a34 AC_Fence: factor out check_fence_alt_max
NFC
2017-12-13 10:04:50 +09:00
Peter Barker
d04a4dd0f8 AC_Fence: factor out check_fence_circle
NFC
2017-12-13 10:04:50 +09:00
Peter Barker
d379c7bbd9 AC_Fence: factor out check_fence_polygon
NFC
2017-12-13 10:04:50 +09:00
Peter Barker
5eeed442c8 AP_AHRS: correct comment 2017-12-13 10:04:50 +09:00
Peter Barker
518399c13a AC_Fence: stop looking at EKF filter status
Fence has no business looking at what the filter status is.

Fence should only care whether it can currently get a position.
2017-12-13 10:04:50 +09:00
khancyr
65373b85f0 AC_Fence: replace AP_InertialNav by AHRS 2017-12-13 10:04:50 +09:00
priseborough
3b32d583a9 AP_NavEKF2: Fix delta time use error 2017-12-12 11:39:38 +11:00
priseborough
440d361aff AP_NavEKF2: Limit range of delta times 2017-12-12 11:39:38 +11:00
Andrew Tridgell
6b30c9213a AP_NavEKF3: delay startup until IMU buffer is filled
this prevents a vulnerability where the initial IMU data is processed
26 times (where 26 is the IMU buffer length)
2017-12-12 11:39:38 +11:00
Andrew Tridgell
1f9a3dd1bd AP_AHRS: improved init attitdue in DCM
this tries harder to get a good IMU sample for the initial attitude
estimate. I have seen cases of bad IMU data on startup and this makes it
much less likely
2017-12-12 11:39:38 +11:00
Andrew Tridgell
97729a12f0 AP_NavEKF2: don't run IMU updates until buffer fills
this prevents us using bad initial data multiple times. It fixes a bug
where the IMU may pause during EK2 initialisation
2017-12-12 11:39:38 +11:00
Andrew Tridgell
39c206ca03 AP_InertialSensor: limit delta-time from INS
limit delta-time to 2x average time

DEBUG CODE - DO NOT MERGE
2017-12-12 11:39:38 +11:00
Andrew Tridgell
a0af4af5b5 AP_InertialSensor: debugging code for EK2 bug 2017-12-12 11:39:38 +11:00
Randy Mackay
38145f9541 AP_InertialSensor: fix param docs for notch and log settings 2017-12-12 07:59:41 +09:00
Randy Mackay
cabced82f1 AR_AttitudeControl: fix parameter descriptions 2017-12-11 17:01:18 +09:00
Michael Oborne
78f732c380 AR_AttitudeControl: fix parameter docs 2017-12-11 08:35:33 +09:00
Randy Mackay
744f4baf22 AR_AttitudeControl: add parameter description increment 2017-12-09 16:23:25 +09:00
Randy Mackay
f00f4ce79b AR_AttitudeControl: fix get_desired_speed timeout 2017-12-09 16:23:22 +09:00
Randy Mackay
9b81c133f6 AP_HAL_PX4: fix compiler warning in UARTDriver 2017-12-09 12:18:49 +09:00
Randy Mackay
36c5f057ae AR_AttitudeControl: add get_desired_turn_rate lat_accel and speed
for reporting use only
2017-12-09 12:18:49 +09:00
Andrew Tridgell
30944f60e6 AP_SBusOut: fixed param doc name 2017-12-09 08:31:24 +11:00
Andrew Tridgell
051f30990c SRV_channel: fixed doc names of VOLZ and SBUS
thanks to Mark for noticing
2017-12-09 08:08:00 +11:00
Peter Barker
c4734484e7 AC_Avoid: take an AP_AHRS in place of an AP_AHRS_NavEKF 2017-12-08 11:27:37 +09:00
Peter Barker
8a4ab685c7 AP_AHRS: implement get_hgt_ctrl_limit on base class
If no limits are required false can be returned, so an trivial
implementation is possible
2017-12-08 11:27:37 +09:00
Peter Barker
89e12163cd AP_AHRS: correct comment 2017-12-08 11:27:37 +09:00
Peter Barker
c3eff57f60 AP_InertialNav: remove unused get_hgt_ctrl_limit 2017-12-08 11:27:37 +09:00
Peter Barker
a1c982be4a AC_Avoid: work in metres to avoid extra work 2017-12-08 11:27:37 +09:00
Peter Barker
0fe45ef6b6 AC_Avoid: eliminate get_position and get_alt_above_home 2017-12-08 11:27:37 +09:00
Peter Barker
54010451bf AC_Avoid: check result of AHRS calls
Work in metres to avoid computation
2017-12-08 11:27:37 +09:00
khancyr
b44ba29a05 AC_Avoidance: replace AP_InertialNav by AHRS 2017-12-08 11:27:37 +09:00
Andrew Tridgell
4289190654 HAL_PX4: added LIS3MDL on FMUv4 2017-12-08 09:49:25 +11:00
Mark Whitehorn
b0e2f06a7a AP_Compass: add LIS3MDL probe for Pixracer 2017-12-08 09:49:25 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
9b2e48ce10 AP_GPS: Improve comments (NFC) 2017-12-05 10:44:58 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
fa4427fbce AC_AttitudeControl: Add AC_PosControl::get_bearing_to_target() method 2017-12-05 09:17:15 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
1a512609ac AC_WPNav: Use the get_bearing_cd() overloaded function provided by AP_Math instead 2017-12-05 08:54:49 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
e13281ab2d AP_Math: add overloaded functions get_horizontal_distance_cm() and get_bearing_cd() (NFC) 2017-12-05 08:54:49 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
07c8d208bc AC_WPNav: Use DEGX100 define instead of hardcoded value (NFC) 2017-12-05 08:54:49 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
ec1790dad9 AP_Math: Use DEGX100 define instead of hardcoded value (NFC) 2017-12-05 08:54:49 +09:00
Guglie
4eaa1f17df SITL: fix pthread_setname_np to build on mac 2017-12-04 21:14:29 +11:00
Tom Pittenger
da11241aa8 AP_HAL_SITL: add const 2017-12-02 09:17:27 +09:00
Patrick José Pereira
bd1110f444 AP_JSButton: simplifies logic
Less code make people happy

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-12-01 14:50:15 -08:00
Peter Barker
e39e8359b6 GCS_MAVLink: tighten result of handle_preflight_reboot 2017-12-01 17:01:10 +00:00
Peter Barker
161e2145cb AP_InertialSensor: tighten type of simple_accel_cal result 2017-12-01 17:01:10 +00:00
Randy Mackay
82cd320bd0 AP_AHRS: add get_origin method to parent 2017-12-01 09:28:56 +09:00
Andrew Tridgell
da4d3ebe2b HAL_SITL: fixed UART utils for cygwin and Linux 2017-12-01 08:02:48 +11:00
Tom Pittenger
6bdbe53024 AP_HAL_SITL: fix compile error for Windows/Cygwin builds
termios2 not available on cygwin. This needs a re-think for cygwin. For now let's just hide it by letting it be declared empty by the virtual and totally bypass it in the cygwin build.
2017-11-30 12:17:49 -08:00
Tom Pittenger
013035a4da AP_HAL_SITL: fix compile error for Windows/Cygwin builds
Can not find "asm/termios.h"
2017-11-30 12:05:56 -08:00
Tom Pittenger
760c6185e5 AP_HAL_SITL: remove SBUS debug code 2017-11-30 12:03:17 -08:00
Pierre Kancir
c30642a348 AP_HAL_SITL: correct _unbuffered_writes usage 2017-11-30 10:36:54 -08:00
Mark Whitehorn
b1b1c0218f AP_HAL_PX4: clean whitespace 2017-11-30 10:20:04 +11:00
Mark Whitehorn
d9ce90ceb0 AP_SBusOut: fix typo in comment 2017-11-30 10:20:04 +11:00
Mark Whitehorn
8d70255b8b AP_SBusOut: turn off SBUS_DEBUG 2017-11-30 10:20:04 +11:00
Mark Whitehorn
5a417e3152 AP_HAL_SITL: support SBusOut
add uart config methods
2017-11-30 10:20:04 +11:00
Mark Whitehorn
644f5b75e6 AP_HAL_VRBRAIN: rename enable_sbus_out to enable_px4io_sbus_out 2017-11-30 10:20:04 +11:00
Mark Whitehorn
12ea8efa84 AP_HAL_PX4: support SBusOut
add unbuffered writes and uart config
2017-11-30 10:20:04 +11:00
Mark Whitehorn
66c4b7d986 AP_HAL: support SBusOut
rename enable_sbus_out to enable_px4io_sbus_out
2017-11-30 10:20:04 +11:00
Mark Whitehorn
3587d7f253 AP_SerialManager: add SBUS1 serial output support 2017-11-30 10:20:04 +11:00
Mark Whitehorn
cca251c135 SRV_Channel: support SBusOut 2017-11-30 10:20:04 +11:00
Mark Whitehorn
94d4f068a8 AP_SBusOut: create library 2017-11-30 10:20:04 +11:00
Mark Whitehorn
560402bad4 AP_BoardConfig: clarify PX4IO SBUS enable message 2017-11-30 10:20:04 +11:00
Peter Barker
47f8ed7fab AP_GPS: set GPS_SAVE_CFG default to save GPS config as required 2017-11-29 00:58:43 -07:00
Andrew Tridgell
9677d570e9 AP_GPS: faster GPS lock
use 9600 and 115200 first
2017-11-29 00:58:43 -07:00
Andrew Tridgell
2c6593e35e AP_NavEKF3: fixed inverted function setInhibitGpsVertVelUse() 2017-11-29 09:47:14 +09:00
Andrew Tridgell
4019a167a9 AP_NavEKF2: fixed inverted function setInhibitGpsVertVelUse() 2017-11-29 09:47:14 +09:00
Grant Morphett
f7db538220 APM_Control: Fixed the subparam indexs to start at 1
AFAIK there is still a bug in ArduPilot where subparams should not start at index 0.  This is due to the way the index math and bit shifing works as it incorrectly offsets all 0 index params to 0. We allow 2 levels of sub params - 3 levels in total.  So params, sub params and sub sub params.  The 0 parameter in all those is unfortunately always references param[0].  So param[0] and subparam[0] and subsubparam[0] will reference the same parameter value.  Its why we always say start the index from 1 as the math and bitshifting then works correctly.

Yeah this is worded badly - hard to explain.
2017-11-29 09:43:10 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
5a0ffe94d2 AP_Common: NFC spell in comments 2017-11-27 23:13:34 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
0ecb14361d AP_AHRS: NFC spell in comments 2017-11-27 23:13:34 +09:00
Randy Mackay
b9a1621d38 AR_AttitudeControl: minor comment fix
non-functional change
2017-11-27 10:35:26 +09:00
Peter Barker
30355fa6d8 AP_Mission: provide short description for mission item types 2017-11-27 10:28:24 +09:00
Andrew Tridgell
9660973975 AP_Math: make crc_crc8 const 2017-11-27 10:15:07 +09:00
Leonard Hall
bd284d9fd7 AC_PosControl: correct lean-angle-to-accel formula
Thanks to @luweikxy for finding this issue!
2017-11-24 09:12:00 +09:00
Leonard Hall
e49d29f8cd AC_WPNav: protect against divide by zero
This could occur if the spline origin and destination were the same location
In these cases we mark the vehicle as having reached the destination avoid all calculations
2017-11-23 21:24:28 +09:00
Andrew Tridgell
917d9842c4 SITL: support AHRS_ORIENTATION in SITL
this allows for tailsitters in RealFlight
2017-11-23 14:26:11 +11:00
Andrew Tridgell
ebcffcb0ac HAL_SITL: fixed console printf in SITL examples 2017-11-23 14:26:11 +11:00
Andrew Tridgell
3f226cd2b9 AP_Math: added from_rotation() method to Matrix3
this is used to get a rotation matrix from a rotation enum
2017-11-23 14:26:11 +11:00
Peter Barker
22f1b5ed6f TECS: support for units on fields 2017-11-23 10:40:30 +11:00
Peter Barker
d68ba874d0 DataFlash: correct examples with units 2017-11-23 10:40:30 +11:00
Peter Barker
b19f981c07 DataFlash: validate units and multipliers 2017-11-23 10:40:30 +11:00
Peter Barker
9896e23c36 DataFlash: Log_Write() fills unknown units with '?' 2017-11-23 10:40:30 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas
2e94673e4f DataFlash: keep the unit names consistent with Tools/autotest/param_metadata/param.py:33 2017-11-23 10:40:30 +11:00
Peter Barker
a5442fb293 DataFlash: support for units on fields 2017-11-23 10:40:30 +11:00
Peter Barker
1e512338f9 AP_AirSpeed: clarify comment 2017-11-23 10:40:30 +11:00
Jacob Walser
46ac0e45aa AP_HAL_SITL: initialize rc inputs appropriately for ArduSub 2017-11-22 15:43:46 -05:00
Patrick José Pereira
28ff272017 SIM_Submarine: Solve problem when frame is above water level
Fix bluerobotics/ardusub/issues/128

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Co-Authored-By: jaxxzer <jwalser90@gmail.com>
2017-11-22 12:38:14 -08:00
HeBin
c056076e85 AP_InertialSensor: fix code style problem, delete useless codes 2017-11-22 10:20:00 -08:00
HeBin
1918b07705 AP_Notify: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
HeBin
efbb030494 AP_InertialSensor: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
HeBin
0e1ce2a7fd AP_HAL_Linux: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
HeBin
895b5f34b8 AP_HAL: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
HeBin
26de6de848 AP_Compass: add Robsense PhenixPro Devkit Board support 2017-11-22 10:10:21 -08:00
Chinese66
700aaf2e8f AP_HAL: add delay to UART_test example
For AC3.5 and higher version, serial uartA-USBconsole cannot work. Maybe the code before "setup" has been changed. Ensure that the uartA can be initialized
2017-11-22 09:05:17 +09:00
Michael du Breuil
983a330cd5 AC_Fence: Remove unused duplicate methods
The Vector2l methods completely duplicate the code of the Vector2f
methods, but aren't used anywhere. They are therefore subject to bitrot
and aren't adding any value. (Also shrinks the build by 8 bytes for some
reason, given that it's unused code I expected to see no difference in
binary size).
2017-11-21 17:04:11 +09:00
Andrew Tridgell
e0d383c986 AP_Volz_Protocol: add a 30% safety margin over baudrate
we don't want to fill the buffer if we don't get full uart utilisation
2017-11-21 14:10:54 +11:00
Guy Tzoler
7f68be9bdf SRV_Channel: adding Volz Support 2017-11-21 14:10:54 +11:00
Guy Tzoler
2442f3fb06 AP_SerialManager: adding Volz Support
and make AP_SerialManager a singleton
2017-11-21 14:10:54 +11:00
Guy Tzoler
65032919e2 AP_Volz_Protocol: added Volz protocol library 2017-11-21 14:10:54 +11:00
Samuel Tabor
05492be269 AP_AHRS: clarify scope of AHRS_GPS_USE parameter 2017-11-20 13:53:36 +09:00
Samuel Tabor
1b4705242c AP_NavEKF2: print reason for EKF2 arming failure when no GPS is available 2017-11-20 13:53:31 +09:00
Michael du Breuil
012ddbefac AP_Landing: Support absolute altitude deepstalls 2017-11-19 16:48:17 +01:00
Andrew Tridgell
964d64a623 SITL: adjust FlightAxis defaults
and map 0,0 to CMAC location, to improve how SITL works in
MissionPlanner
2017-11-19 18:24:08 +11:00
Andrew Tridgell
cdd350f93e SITL: fixed build under cygwin 2017-11-18 21:23:15 +11:00
Georgii Staroselskii
a18cf45798 AP_Notify: enable AP_BoardLED for Navio 2017-11-17 09:20:55 -08:00
Georgii Staroselskii
6326e23682 AP_HAL: Navio: add defs for BoardLED 2017-11-17 09:20:55 -08:00
Georgii Staroselskii
56534b34c5 AP_HAL_Linux: use GPIO_Sysfs for Navio
/boot/config.txt: dtoverlay=navio-rgb should be disabled for this thing
to work, though.
2017-11-17 09:20:55 -08:00
Georgii Staroselskii
4e02637f23 AP_Notify: add Led_Sysfs and use in Navio2
Navio2 exports its leds via /sys/class/leds interface. We reuse it in
order not to conflict with GPIO_Sysfs. Otherwise we'd get a Device Busy
error in GPIO_Sysfs::_export_pin().
2017-11-17 09:20:53 -08:00
Georgii Staroselskii
5254ee03c2 AP_HAL_Linux: use GPIO_Sysfs for Edge 2017-11-17 09:18:36 -08:00
Georgii Staroselskii
8fcd30c611 AP_HAL_Linux: use GPIO_Sysfs for Navio 2 2017-11-17 09:18:35 -08:00
Peter Barker
fd543fce6d AP_Scheduler: create AP::PerfInfo class 2017-11-16 15:31:53 +00:00
Peter Barker
5c2f68e8f5 Copter+AP_Scheduler: move perf_info.cpp into Scheduler 2017-11-16 15:31:53 +00:00
Peter Barker
b97ee33438 DataFlash: AP_Camera functions use GPS singleton 2017-11-16 15:28:37 +00:00
Peter Barker
7258fa81d9 AP_Camera: use GPS singleton 2017-11-16 15:28:37 +00:00
Leonard Hall
ebd864d2d2 AC_PosControl: minor update to comments 2017-11-16 09:46:28 +09:00
Peter Barker
269294754f GCS_MAVLink: use gps singleton 2017-11-15 13:43:03 +00:00
Peter Barker
a8aa6a7822 AP_Arming: use gps singleton 2017-11-15 13:43:03 +00:00
Peter Barker
693823ae0d AP_GPS: add gps() to AP:: namespace 2017-11-15 13:43:03 +00:00
Randy Mackay
6315e6eb45 AC_AttitudeControl: remove unused get_tilt_limit_rad 2017-11-15 20:22:02 +09:00
DOMINATOR\Eugene
4c6f954cdf AP_BoardConfig: separation of parameter groups 2017-11-15 09:52:43 +11:00
André Kjellstrup
1a63fd85d8 AP_Camera: Option to trig by distance only when in AUTO mode 2017-11-14 00:10:22 +00:00
khancyr
4413ebab7b AP_HAL_SITL: suppress output until initialization is finished 2017-11-13 10:52:38 +11:00
Jacob Walser
07fa65a88c AP_HAL_SITL: Add current and voltage monitoring implementation for Sub 2017-11-13 10:50:27 +11:00
khancyr
2a25011b14 AR_AttitudeControl: const local variables 2017-11-09 09:53:12 +09:00
Peter Barker
23882aaab0 AP_Notify: only play not-ready-or-not-finished tone if we've been ready 2017-11-08 19:08:23 +09:00
Peter Barker
25a0e6378e AP_Arming: manual transmitter checks call rc calibration checks 2017-11-08 19:07:57 +09:00
Peter Barker
49dd5f4f80 Copter: prearm board voltage checks are called in parent class 2017-11-08 19:07:53 +09:00
Peter Barker
30c1a040d7 Copter: prearm baro checks are called in parent class 2017-11-08 19:07:44 +09:00
Peter Barker
901fe55d04 AP_Notify: play sad tone if prearm checks start to fail 2017-11-08 19:02:44 +09:00
khancyr
76a6649a2d AP_Autotune: remove unimplemented function 2017-11-08 17:21:56 +09:00
khancyr
e9e1dac188 AR_AttitudeControl: remove unused skid_steering arg from get_throttle_out 2017-11-08 15:45:35 +09:00
khancyr
aa09541847 AR_AttitudeControl: const ahrs reference 2017-11-08 15:34:41 +09:00
khancyr
d226ffeeb2 AP_AttitudeControl: remove tabs
non-functional change
2017-11-08 15:06:25 +09:00
Daniel Widmann
49887235df AR_AttitudeControl: get_steering_out methods accept reverse argument 2017-11-08 14:36:23 +09:00
bnsgeyer
63bafa2c7f AP_Motors: Tradheli- fixes servo_test function for Dual Heli frame 2017-11-08 11:07:08 +09:00
proficnc
6a94d285de AP_BoardConfig: fixed description to warn against
setting the wrong heater value in params
2017-11-07 12:00:32 +11:00
Michael du Breuil
ef0b52e017 AP_Arming: Run extra GPS checks when arming 2017-11-06 01:33:57 +00:00
Michael du Breuil
236e74c529 AP_GPS: Singleton 2017-11-06 01:33:57 +00:00
Michael du Breuil
c856cc6f33 AP_GPS: Allow GPS's to run functions on arming (used by SBF)
Supports starting/stopping GPS logging
2017-11-06 01:33:57 +00:00
Andrew Tridgell
c9652fec3c AP_BattMonitor: fixed SITL segfault 2017-11-04 19:41:41 +11:00
Andrew Tridgell
274e441292 DataFlash: fixed build for aerofc-v1 2017-11-04 16:53:29 +11:00
Andrew Tridgell
6358081b18 AP_Motors: apply tailsitter min spin to both motors 2017-11-04 11:41:40 +11:00
Michael du Breuil
338d745de1 AP_Landing: Implement is_on_approach for deepstall
(Fixes a disarm in flight)
2017-11-04 10:07:16 +11:00
Andrew Tridgell
878d2e2563 AP_Motors: fixed tailsitter use of SPIN_MIN 2017-11-04 09:29:08 +11:00
alexshirley
8058fdf093 AP_HAL_Linux: combine ppm and sbus on ocpoc_zynq
Removes compile-time selection of RCInput driver for ocpoc_zynq.
PPM and SBUS input are now colocated on the ocpoc board, and it
only needs to run RCInput_ZYNQ. Pulse input is also inverted
to accommodate SBUS input, which has no effect on PPM input.
2017-11-01 10:28:40 -07:00
alexshirley
065b00eb81 AP_HAL: Remove SBUS macro from ocpoc target 2017-11-01 10:28:40 -07:00
Randy Mackay
002d3f08f6 AP_L1_Control: update_waypoint zeros xtrack i term on init 2017-11-01 16:46:40 +09:00
Andrew Tridgell
eab1d3af4f AP_InertialSensor: don't apply offsets in SITL backend
the offsets are applied in the rotate and correct methods
2017-11-01 17:09:21 +11:00
bnsgeyer
37ea64513d AP_Motors: TradHeli - fixed servo test function 2017-11-01 14:01:48 +09:00
Paulo Neves
4108f22304 AP_Beacon: Corrected possible use of nullptr memory.
The check for UART port pointer is not sufficient
to know if the update() was possible or not. When
MarvelmindHedge construction failed, the hedge pointer
might be a nullptr and there are no checks to avoid
nullptr dereference.

The MarvelmindHedge structure had complex initialization
but was done in a C style, with intermixed initialization functions.
malloc() was changed to cleaner new operator. Given that the
file already contained new operator calls it didn't make
sense to have a mix. The files are cpp so C++ operators
are used.
2017-11-01 10:49:10 +09:00
Patrick José Pereira
73a76455d2 AP_BattMonitor: Solve typo in BATT2 description
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-10-31 09:32:03 +09:00
Lucas De Marchi
cbb9dcc2a1 AP_HAL_Linux: Storage: use define from HAL for directory 2017-10-30 16:57:37 -07:00
Lucas De Marchi
7fd10921c3 AP_HAL: Linux: add define for storage dir
This mantains compatibility with what the boards were already using,
except for Aero and Minlure in which I'm changing it already as this is
desired.
2017-10-30 16:57:37 -07:00
Lucas De Marchi
3272ae2c04 DataFlash: make log directory macro mandatory
Everybody defines the macro (or should be defining). Let smaller users
that don't have a filesystem to rather protect it with HAL_OS_POSIX_IO,
which also allow them to save more flash space.
2017-10-30 16:57:37 -07:00
Lucas De Marchi
591b846e2d AP_HAL: switch aero and minlure to new log/terrain directory
Additionally make Edge use the default.
2017-10-30 16:57:37 -07:00
Lucas De Marchi
d2ba8409d0 AP_HAL: provide default directory for Linux boards
/var/lib/<project> is more in line to where projects save their data.
Also, remove APM from dir name as it should had been done some time
ago.

This is only the default (and recommended for any new board). Existing
boards that want to adopt the default can remove their defines.
2017-10-30 16:57:37 -07:00
priseborough
c96bc54254 AP_NavEKF3: correctly use wheel odometry speed for pitched rovers 2017-10-31 08:11:05 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
68828511cd AP_GPS: Only send GPS*_RTK mavlink messages if the backend supports them 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
e0c2a45eec AP_GPS: support GPS_RTK and GPS2_RTK messages in Emlid reach modules. Requires Reach FW >= 2.7.4 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
c0dd7984ad AP_GPS: Publish information on the GPS*_RTK mavlink messages 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
bf6778277e AP_GPS: implement GPS*_RTK mavlink messages 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
91b6404b13 GCS_MAVLink: Replace hardcoded duplicated end_mavlink_gps*_rtk() function with a flexible one 2017-10-30 18:28:20 +00:00
Dr.-Ing. Amilcar Do Carmo Lucas
430b863f42 AP_GPS: Replace hardcoded duplicated end_mavlink_gps*_rtk() function with a flexible one 2017-10-30 18:28:20 +00:00
John deVere
951c947bec AP_Arming: update param description for VOLT_MIN 2017-10-30 09:46:51 +09:00
Andrew Tridgell
fd86b2bbb9 DataFlash: log critical messages while disarmed
this logs critical messages while disarmed if we have logged any
messages while armed. This fixes issue #7010 where log files show the
incorrect mode if the log includes any portions where the user
disarmed. It makes analysing users logs very difficult. It also
affects parameters, so we don't always know the true parameter values
in logs from users.
2017-10-29 19:20:57 +11:00
Michael du Breuil
9b7c3ce9a7 GCS_Mavlink: Fix out of bounds access, CID 144337 2017-10-28 03:30:46 +01:00
priseborough
ee6b43aabf AP_NavEKF3: Fix bugs in use of wheel encoder data
Found by pavloblindnology
2017-10-28 10:58:01 +09:00
bnsgeyer
e8173f27df AC_AttitudeControl: reset target attitude
added method to reset current vehicle attitude to support swash
behaviors in Trad Heli
2017-10-28 12:31:06 +11:00
dheideman
2fab8e9fe1 AP_JSButton: Add joystick button functions for relays 3 & 4 2017-10-27 12:14:41 -04:00
Florent Martel
fee79afb8e AP_Frsky_Telem: add second battery info 2017-10-27 02:00:29 -07:00
Florent Martel
5d9299d72f AP_Frsky_Telem: add second battery capacity parameter 2017-10-27 02:00:29 -07:00
Peter Barker
191e457230 DataFlash: include sample count in ISBH 2017-10-27 16:33:45 +11:00
Peter Barker
b997f445ff AP_InertialSensor: include sample count in ISBH 2017-10-27 16:33:45 +11:00
Peter Barker
9566abb3a8 AP_InertialSensor: add IMU batch sampling 2017-10-27 16:33:45 +11:00
Peter Barker
5096e2fca9 AP_InertialSensor: use df singleton, factor out log_{gyro,accel}_raw 2017-10-27 16:33:45 +11:00
Peter Barker
1ca76173a5 AP_Math: set radians(...) and degrees(...) as constexpr 2017-10-27 16:33:45 +11:00
Peter Barker
d950e78079 DataFlash: Log_ISBH and Log_ISBD, to log batches of IMU data 2017-10-27 16:33:45 +11:00
Peter Barker
2f9a8ded55 DataFlash: add new int16_t[32] type, designator 'a' 2017-10-27 16:33:45 +11:00
Randy Mackay
2614d2112a AP_Winch: remove redundant member
Also use get_rate_max method instead of config.rate_max member
2017-10-27 09:20:38 +09:00
Randy Mackay
2dfb6a94f2 AP_Winch: library to control winch
fixes after peer review:
renamed disable to relaxed
make parameters private
default type to 1
enabled method checks backend created
servo range initialised in init method
contrain rate-desired during position control
use set-output-limit instead of set-safety-limit
release_length accepts rate
2017-10-27 09:20:38 +09:00
Randy Mackay
8b4345f29d AP_Mission: add winch support 2017-10-27 09:20:38 +09:00
Randy Mackay
07e2853b8e SRV_Channel: function definition for winch 2017-10-27 09:20:38 +09:00
Randy Mackay
ce73d724c8 AR_AttitudeControl: rate-control for skid-steering uses I term even at low speeds 2017-10-26 19:45:04 +09:00
Randy Mackay
ee3daaa7c9 AR_AttitudeControl: reset input filter for steering and throttle controllers
Also only set dt to non-zero value
2017-10-26 19:44:54 +09:00
Randy Mackay
91d489d91e AC_PID: implement reset_filter 2017-10-26 19:44:47 +09:00
Randy Mackay
2986d3eb7d AR_AttitudeControl: fix braking
this fix ensures the output throttle is never in the opposite direction from the desired-speed
there is a possibility that this could lead to rougher throttle response when the vehicle is transitioning from forward to backwards motion because the throttle response will immediately go to zero when the desired speed cross over zero
2017-10-26 19:44:38 +09:00
Randy Mackay
49cbbf4d76 AR_AttitudeControl: minor comment fix 2017-10-26 19:44:32 +09:00
Randy Mackay
8daa8cba1f AR_AttitudeControl: record desired turn rate and speed for logging 2017-10-26 19:44:26 +09:00
Michael du Breuil
0cee2f2896 AP_BattMonitor: Require all backends to provide init 2017-10-26 20:10:08 +11:00
Andrew Tridgell
3402d07651 HAL_PX4: fixed a race condition on i2c init
we could call init on two devices with the same name, which caused
init_ok to be false. This could cause the SMBus battery to fail to
initialise

Thanks to Michael duBreuil for finding this!
2017-10-26 18:21:56 +11:00
Peter Barker
62f7acff52 SITL: reduce max accel of simulated rover 2017-10-26 14:45:19 +11:00
Andrew Tridgell
e340fac2e0 AP_Motors: avoid float exception for small expo
very small values of the thrust expo cause a floating point
exception. As zero is a documented value meaning linear we need to
handle this.
2017-10-25 21:15:58 +11:00
Jacob Walser
d5896287b7 AP_Param: Add set_by_name and set_and_save_by_name helpers 2017-10-25 21:07:09 +11:00
hiro2233
7d304073ed SITL: fixed include case sensitive
On case sensitive cygwin feature enabled, this build ok.
2017-10-25 20:59:55 +11:00
Andrew Tridgell
381e2fd69a SRV_Channel: added get_motor_function()
for correct handling of motors 8 and above
2017-10-25 11:39:11 +11:00
Andrew Tridgell
45d6f3bf75 AP_Motors: fixed motor channel handling 2017-10-25 11:39:11 +11:00
Patrick José Pereira
9693da751e AP_common: Add stdio.h when using SITL_printf
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-10-24 22:55:56 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
c7c2c4ff2c AC_AttitudeControl: use floating-point multiplication instead of a more expensive floating-point division 2017-10-23 09:20:17 -07:00
Andrew Tridgell
fc237ee9a0 AP_Motors: merge fixed from rebase 2017-10-22 15:52:50 +11:00