Commit Graph

17529 Commits

Author SHA1 Message Date
Andrew Tridgell 846418e5e9 HAL_ChibiOS: raise timer thread priority
needs to be above main for guaranteed DShot and oneshot output periods
2018-08-06 11:41:42 +10:00
Randy Mackay c88926f227 Compass: remove accumulate from example sketch 2018-08-06 11:05:34 +10:00
Randy Mackay 99b54935db Compass: remove accumulate
this method is a noop on all backends
2018-08-06 11:05:34 +10:00
Peter Barker f2b1387c1c RC_Channel: add AUTOTUNE to init_aux_function routine
Also, cark it in SITL if we fail to initialise an aux function
2018-08-05 07:52:28 +10:00
Andrew Tridgell 53fbdc3750 AP_BLHeli: pass motor mask to serial_setup_output() 2018-08-04 19:29:13 +10:00
Andrew Tridgell 3df2a1c228 HAL_ChibiOS: fixed dshot bad frames
adding a pre-bit on the DMAR, and ensuring that all groups are setup
for DMA together fixes the remaining bad frames reports in BLHeli32
2018-08-04 19:29:13 +10:00
Andrew Tridgell 1fe6c7b497 AP_HAL: added chanmask to serial_setup_output() 2018-08-04 19:29:13 +10:00
Andrew Tridgell 946b4db0e6 HAL_ChibiOS: set min dshot separation to 100usec
this fixes a problem with BLHeli32 not recognising dshot
2018-08-04 19:29:13 +10:00
Andrew Tridgell 476a40c906 AP_BLHeli: improved reliability of pass-thru support
this uses a connection cache to prevent re-connecting to an ESC when
not needed, and allows for pass-thru comms on any port, using
SERVO_BLH_PORT parameter
2018-08-04 19:29:13 +10:00
Andrew Tridgell 22ba9a0aea HAL_ChibiOS: fixed timeout of serial read bytes
this allows for fast timeout of serial read bytes in BLHeli pass-thru
2018-08-04 19:29:13 +10:00
Andrew Tridgell df643d8499 GCS_MAVLink: allow uninstall of alt protocol handler 2018-08-04 19:29:13 +10:00
Andrew Tridgell 769c99d4d7 AP_Baro: added register checking on BMP280
this follows a log which seems to show an in-flight register
corruption on a MatekF405
2018-08-04 16:44:08 +10:00
Lucas De Marchi 88df4d127e AP_Common: remove ARRAY_SIZE_SIMPLE
Now this is basically ARRAY_SIZE, so remove it.
2018-08-04 15:31:55 +10:00
Lucas De Marchi 668c941717 Global: use new version of ARRAY_SIZE 2018-08-04 15:31:55 +10:00
Lucas De Marchi 57ee0e29f6 AP_Common: simplify ARRAY_SIZE
This rolls back to the simpler version of ARRAY_SIZE. The more complex
one helps catching bugs when we use pointers when we are expecting an
array, but can't stand arrays with 0 elements.  I'm not aware of bugs it
actually caught on ArduPilot, although it did for me in other projects.

I think this is better than having a separate "_SIMPLE" version of the
macro and spread its usage... the trend is just to use the simpler
version anyway.
2018-08-04 15:31:55 +10:00
Peter Barker 049f61c943 AP_Camera: populate camera singleton 2018-08-04 11:34:41 +10:00
utkinpol 2912e732b4 HAL_ChibiOS: updated for KakuteF7 2018-08-04 08:24:49 +10:00
Andrew Tridgell 64c8ca514c HAL_ChibiOS: fixed attach_interrupt check
we can't have two handlers on the same pad
2018-08-03 13:44:59 +10:00
Andrew Tridgell 4e6ac85057 HAL_ChibiOS: use 32 bit time intervals
this makes for smaller and faster code. We really don't need 64 bit
intervals as long sleeps are done with a loop.
2018-08-03 13:44:59 +10:00
Andrew Tridgell 1bd0ea079b HAL_ChibiOS: fixed build on older compilers
allow build with gcc 4.9.x
2018-08-03 13:44:59 +10:00
Andrew Tridgell 7aba99e229 HAL_ChibiOS: fixes for ChibiOS version update 2018-08-03 13:44:59 +10:00
Andrew Tridgell f8e2edbc7f HAL_ChibiOS: fixed cache flush for updated ChibiOS version 2018-08-03 13:44:59 +10:00
Siddharth Purohit 2604b00b43 HAL_ChibiOS: use ch.h header for oslib api 2018-08-03 13:44:59 +10:00
Siddharth Purohit ea709b9316 AP_Radio: move to using updated time conv API 2018-08-03 13:44:59 +10:00
Siddharth Purohit 9f5dbb74e7 AP_IOMCU: move to using updated time conv API 2018-08-03 13:44:59 +10:00
Siddharth Purohit ff65487ab3 HAL_ChibiOS: follow updated gpio pin setup procedure 2018-08-03 13:44:59 +10:00
Siddharth Purohit 5f88163e17 HAL_ChibiOS: update configuration and rtlib headers for ChibiOS 18.x.x 2018-08-03 13:44:59 +10:00
Siddharth Purohit 395c48933c HAL_ChibiOS: move tto using updated time conversion API 2018-08-03 13:44:59 +10:00
Siddharth Purohit 4e8d072d6d HAL_ChibiOS: move to using recent pal driver api for GPIO IRQ events 2018-08-03 13:44:59 +10:00
Mark Whitehorn 86b7adf68f AP_HAL_Chibios: fix fmuv3/hwdef.dat printf/STDOUT description and clean up 2018-08-03 13:08:37 +10:00
Peter Barker aa4cf5b40e SRV_Channel: use method to get rc channels 2018-08-03 13:07:50 +10:00
Peter Barker ff36eb3aca RC_Channel: remove old members objects 2018-08-03 13:07:50 +10:00
Matt 15823d9e97 AP_LANDING_GEAR: Remove deploy lock
Since the RC switches only respond to changes, there is no longer a need
for this lock state. The gear can be retracted or deployed by RC switch,
flight mode, or mavlink command freely without convoluted unlocking
methods.  Also removed use of this in the associated Copter code.
2018-08-03 10:59:15 +09:00
Lucas De Marchi 73f8dd98f2 AP_BoardConfig: kill AP_FEATURE_SAFETY_BUTTON
This is redundant and can be just HAL_HAVE_SAFETY_SWITCH.
2018-08-02 13:15:02 -07:00
Lucas De Marchi 259195a7c7 AP_BoardConfig: fix handling of AP_FEATURE_SAFETY_BUTTON
Not all PX4-based board have a safety button. Rely on
HAL_HAVE_SAFETY_SWITCH instead of ifdef'ing each of them.

This allows to build for aerofc-v1 without safety button.
2018-08-02 13:15:02 -07:00
Lucas De Marchi 000ae3cb85 AP_BoardConfig: add default for BOARD_SAFETY_ENABLE
If HAL supports safety button but the board didn't declare a default,
define one to match what is done with BOARD_SAFETY_OPTION_DEFAULT.
2018-08-02 13:15:02 -07:00
Lucas De Marchi 099eefee87 AP_HAL: Chibios: HAL_GPIO_PIN_SAFETY_IN implies HAL_HAVE_SAFETY_SWITCH 2018-08-02 13:15:02 -07:00
Lucas De Marchi 20778f73f1 AP_HAL_ChibiOS: define HAL_HAVE_SAFETY_SWITCH accordingly 2018-08-02 13:15:02 -07:00
Lucas De Marchi 8e3777a163 AP_HAL_PX4: RCOutput: honour HAL_HAVE_SAFETY_SWITCH 2018-08-02 13:15:02 -07:00
Lucas De Marchi 7f984f2700 AP_HAL: linux: disable safety switch
Linux boards don't really handle the safety switch.
2018-08-02 13:15:02 -07:00
Lucas De Marchi 2336d2214b AP_HAL: sitl: disable safety switch
sitl doesn't really handle the safety switch and it's actually disabled
by AP_FEATURE_SAFETY_BUTTON.
2018-08-02 13:15:02 -07:00
Andrew Tridgell 13f96bcb00 HAL_ChibiOS: fixed an i2c dma callback bug
many thanks to Kelly-Foster for chasing me on this one!
2018-08-02 12:29:02 +10:00
Andrew Tridgell b0badf8caf HAL_ChibiOS: fixes for F745 builds 2018-08-02 11:56:33 +10:00
Lucas De Marchi 0606b00f15 AP_BoardConfig: don't try to set pwm mode for aerofc-v1
We don't have that in aerofc, so don't try to initialize it and fail
with following error messages:

    RCOutput: unable to setup AUX PWM with BRD_PWM_COUNT 0
2018-08-01 16:49:08 -07:00
Randy Mackay 9799567416 AP_Follow: fixup offset initialisation 2018-08-01 20:18:23 +09:00
hoangthien94 f4255712c1 AP_Follow: Initialize offsets based on offset type 2018-08-01 20:18:23 +09:00
Peter Barker 5df70cf93a RC_Channel: update examples for new rc() method 2018-08-01 12:11:30 +09:00
Peter Barker e2b31a535c AC_PID: update example for new rc() method 2018-08-01 12:11:30 +09:00
Peter Barker 0f084ed5bf RC_Channel: add compatability static functions
Just to avoid churn in Sub, Plane and Tracker
2018-08-01 12:11:30 +09:00
Peter Barker c1a1f4f970 SRV_Channel: use rc() method to get rc singleton 2018-08-01 12:11:30 +09:00