Commit Graph

18023 Commits

Author SHA1 Message Date
Peter Barker
9af11d79d1 AP_Mission: remove pointless else clauses 2018-08-20 14:15:40 +09:00
Andrew Tridgell
83f293305f AP_OSD: raise thread stack size to 1024
based on testing in SITL
2018-08-20 13:49:14 +10:00
Andrew Tridgell
836176297d HAL_SITL: added stack checking to SITL 2018-08-20 13:49:14 +10:00
Peter Barker
0a7399ae7d AC_PrecLand: use AHRS singleton, remove pointless initialisations 2018-08-17 21:14:57 +09:00
Peter Barker
898a46fe0e AP_Winch: undefine PASS_TO_BACKEND convenience function 2018-08-17 21:14:57 +09:00
Andrew Tridgell
60ec695f55 AP_TECS: set default pitch max to 15 2018-08-17 20:42:29 +10:00
Andrew Tridgell
7c57fb0c31 AP_L1_Control: lower default L1 period 2018-08-17 20:42:27 +10:00
Andrew Tridgell
9e2933df89 APM_Control: raised default PID gains for roll/pitch 2018-08-17 20:42:25 +10:00
Hwurzburg
53a28cdf18 AP_OSD: Adding efficiency and climb efficiency
and new font characters
2018-08-17 16:33:53 +10:00
Peter Barker
e4d3ed7e39 RC_Channel: move handling of sprayer and gripper in from Copter 2018-08-17 15:33:35 +09:00
Peter Barker
4223d933d2 AC_Sprayer: add singleton 2018-08-17 15:33:35 +09:00
Andrew Tridgell
5988c3258f GCS_MAVLink: use Semaphore.h 2018-08-16 12:40:10 +10:00
Andrew Tridgell
5ac15714fd AP_Common: moved WITH_SEMAPHORE to Semaphore.h 2018-08-16 12:40:10 +10:00
Andrew Tridgell
d3af854949 HAL_ChibiOS: fixed bootloader build 2018-08-16 12:40:10 +10:00
Andrew Tridgell
a26e534654 GCS_MAVLink: use WITH_SEMAPHORE()
this is a suggestion from Peter, will need some discussion
2018-08-16 12:40:10 +10:00
Andrew Tridgell
6f058e8c0d AP_Common: added WithSemaphore class 2018-08-16 12:40:10 +10:00
Andrew Tridgell
048a52ebc0 GCS_MAVLink: make mavlink send from multiple threads safe
this takes a lock to prevent interleaving of mavlink msgs from
multiple threads
2018-08-16 12:40:10 +10:00
Andrew Tridgell
5de49aa5aa GCS_MAVLink: flush parameters on reboot 2018-08-16 12:40:10 +10:00
Andrew Tridgell
f1e10b0a8f HAL_Linux: make uart writes thread safe 2018-08-16 12:40:10 +10:00
Andrew Tridgell
b2b56c3e46 HAL_VRBRAIN: added support for HAL_Semaphore type 2018-08-16 12:40:10 +10:00
Andrew Tridgell
5d3b17db6b HAL_SITL: added support for HAL_Semaphore type 2018-08-16 12:40:10 +10:00
Andrew Tridgell
fe93113240 HAL_PX4: added support for HAL_Semaphore type 2018-08-16 12:40:10 +10:00
Andrew Tridgell
f005e60066 HAL_Linux: added support for HAL_Semaphore type 2018-08-16 12:40:10 +10:00
Andrew Tridgell
dabdb969f6 HAL_ChibiOS: added support for HAL_Semaphore type 2018-08-16 12:40:10 +10:00
Andrew Tridgell
0a73c3492d AP_HAL: support HAL_Semaphore type 2018-08-16 12:40:10 +10:00
Andrew Tridgell
4d662a913a AP_Param: use background parameter save
this moves both the storage scan and the save code out of the main
thread and into the IO thread. It means that if we have more than 30
parameters saves in very rapid succession while armed that we can lose
parameter changes, but that is extremely unlikely.

This fixes an issue where parameter saves in flight can cause
considerable scheduling problems, sometimes several milliseconds
2018-08-16 12:40:10 +10:00
Hwurzburg
7c79175309 AP_OSD: add flytime item 2018-08-16 12:00:50 +10:00
Andrew Tridgell
a0ce604721 AP_Stats: make singleton and add flighttime accessor 2018-08-16 12:00:50 +10:00
Hwurzburg
5f72c9040e AP_OSD: Adding flight distance and summary panels for OSD 2018-08-16 12:00:50 +10:00
Alexander Malishev
eec34fc47d AP_OSD: add waypoint and xtrack_error items 2018-08-16 10:26:34 +10:00
vierfuffzig
aae1054a94 AP_OSD: add hdop display 2018-08-16 09:39:02 +10:00
Peter Barker
fa7ba7ddbc DataFlash: force messagewriters to completion
Setting a dataflash-file buffer size of less than or equal to 2kiB would
cause the startup-messagewriter to never push any messages other than
FMT out to the logs.

This is a combination of the return values of
critical_message_reserved_space and
non_messagewriter_message_reserved_space

This patch forces the startup messages out to the logs by ignoring the
space constraints every 100ms
2018-08-15 12:40:33 +10:00
Peter Barker
fa5757f618 AP_Math: fix float-equals warnings 2018-08-15 12:16:49 +10:00
Alexander Malishev
05099b8b8b HAL_ChibiOS: restore default dataflash buffer size
This fix log corruption in copter
2018-08-15 10:15:09 +10:00
Andrew Tridgell
71988b49a4 AP_RSSI: allow override of RSSI pin 2018-08-15 09:51:30 +10:00
Andrew Tridgell
c3cf8f5435 AP_Math: fixed a bug in segment_intersection()
we could get an intercept point beyond the end of the segment
2018-08-14 19:41:45 +10:00
Peter Barker
626467db14 AP_Math: add tests for line intersection 2018-08-14 19:41:45 +10:00
Francisco Ferreira
1b46104a98 AP_HAL_ChibiOS: fix warning when STDOUT is defined
../../libraries/AP_HAL_ChibiOS/UARTDriver.cpp:118:12: warning: 'int hal_console_vprintf(const char*, va_list)' defined but not used [-Wunused-function]
 static int hal_console_vprintf(const char *fmt, va_list arg)
            ^
2018-08-14 10:17:38 +10:00
Francisco Ferreira
62a4f08e12 AP_Arming: fix system check 2018-08-14 10:17:38 +10:00
mirkix
c33b692f53 AP_HAL_ChibiOS: fix CubeYellow build 2018-08-14 06:26:22 +10:00
Lucas De Marchi
5068f2e8fd AP_HAL_Linux: fix log after tonealarm thread removal
../../libraries/AP_HAL_Linux/Scheduler.cpp: In member function ‘void Linux::Scheduler::_debug_stack()’:
../../libraries/AP_HAL_Linux/Scheduler.cpp:127:47: warning: format ‘%zu’ expects a matching ‘size_t’ argument [-Wformat=]
                 _uart_thread.get_stack_usage());
                                               ^
2018-08-12 20:29:35 -07:00
Francisco Ferreira
f69638f24f
AP_UAVCAN: add configuration of hardware filters 2018-08-12 13:35:04 +01:00
Francisco Ferreira
3cb8421aa6
AP_UAVCAN: reorganize header and code
Also a bit more cleanup
2018-08-12 13:35:04 +01:00
Francisco Ferreira
ee8e2923ae
AP_UAVCAN: cleanup code 2018-08-12 13:35:04 +01:00
Francisco Ferreira
8c382b6904
AP_UAVCAN: adapt to new CANProtocol interface
This includes creating own thread

Also adapts example
2018-08-12 13:35:03 +01:00
Francisco Ferreira
126f1379d3
AP_UAVCAN: fix bug introduced in #7863 2018-08-12 13:35:03 +01:00
Francisco Ferreira
7e8abc92fe
AP_UAVCAN: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:03 +01:00
Francisco Ferreira
861e1a0a54
SRV_Channel: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:03 +01:00
Francisco Ferreira
3b61a31bb4
AP_Notify: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:03 +01:00
Francisco Ferreira
f468602baf
AP_Notify: revert wrong commit 228058e089
Also change the order of logical OR so that led_write in UAVCAN_RGB_LED is called for all UAVCAN instances and not only first one
2018-08-12 13:35:03 +01:00
Francisco Ferreira
b29369eb82
AP_GPS: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:03 +01:00
Francisco Ferreira
317e8e0296
AP_Compass: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:03 +01:00
Francisco Ferreira
31b8a051cc
AP_BattMonitor: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:02 +01:00
Francisco Ferreira
8e6692744f
AP_BattMonitor: fix warning in UAVCAN driver
../../libraries/AP_BattMonitor/AP_BattMonitor_UAVCAN.cpp: In member function ‘virtual void AP_BattMonitor_UAVCAN::init()’:
../../libraries/AP_BattMonitor/AP_BattMonitor_UAVCAN.cpp:15:123: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘AP_Int32 {aka AP_ParamT<int, (ap_var_type)3u>}’ [-Wformat=]
 #define debug_bm_uavcan(level, fmt, args...) do { if ((level) <= AP_BoardConfig_CAN::get_can_debug()) { printf(fmt, ##args); }} while (0)
                                                                                                                           ^
../../libraries/AP_BattMonitor/AP_BattMonitor_UAVCAN.cpp:36:33: note: in expansion of macro ‘debug_bm_uavcan’
                                 debug_bm_uavcan(2, "UAVCAN BattMonitor BatteryInfo registered id: %d\n\r", _params._serial_number);
2018-08-12 13:35:02 +01:00
Francisco Ferreira
9489ec9e7c
AP_Baro: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:02 +01:00
Francisco Ferreira
5efde5fa8b
AP_HAL_VRBRAIN: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:02 +01:00
Francisco Ferreira
9766ca44d4
AP_HAL_PX4: adapt to changes in AP_BoardConfig_CAN 2018-08-12 13:35:02 +01:00
Francisco Ferreira
b7a3e1ae77
AP_BoardConfig_CAN: put debug code behind compile-time flag
And disable it by default
2018-08-12 13:35:02 +01:00
Francisco Ferreira
4b4ba66987
AP_BoardConfig_CAN: add singleton and do naming cleanup
Also added more getter methods
2018-08-12 13:35:02 +01:00
Francisco Ferreira
1cfb38b4ee
AP_BoardConfig_CAN: adapt to new CANProtocol interface 2018-08-12 13:35:02 +01:00
Francisco Ferreira
350d03800f
AP_HAL_SITL: remove unused CAN header 2018-08-12 13:35:01 +01:00
Francisco Ferreira
9204ca898b
AP_HAL_VRBRAIN: remove CAN thread management 2018-08-12 13:35:01 +01:00
Francisco Ferreira
68ada13f28
AP_HAL_PX4: remove CAN thread management 2018-08-12 13:35:01 +01:00
Francisco Ferreira
1d7f3e48a4
AP_HAL_Linux: remove CAN thread management
Also fix comment
2018-08-12 13:35:01 +01:00
Francisco Ferreira
7278af05e0
AP_HAL_ChibiOS: remove CAN thread management 2018-08-12 13:35:01 +01:00
Francisco Ferreira
0645a5b11a
AP_HAL: introduce a CANProtocol interface and remove HAL CAN thread management 2018-08-12 13:35:01 +01:00
Francisco Ferreira
e1bf89f32d
AP_HAL_ChibiOS: fix CAN manager initialization 2018-08-12 13:35:01 +01:00
Peter Barker
5ad1dee284 AP_Notify: make LED blink at constant rate in Rover 2018-08-09 11:57:05 +10:00
Michael du Breuil
83d01c8b7d GCS_MAVLink: Use ARRAY_SIZE to avoid a magic value 2018-08-09 11:53:05 +10:00
Michael du Breuil
6469a985d7 DataFlash: Fix allocating extra values for RC logging 2018-08-09 11:53:05 +10:00
Michael du Breuil
e7ebea55d2 RC_Channel: Fix possible user induced out of bounds write
CID 308348
2018-08-09 10:27:10 +10:00
Andrew Tridgell
385f735799 HAL_ChibiOS: avoid 64 bit maths in AP_HAL::micros()
this saves a few cycles
2018-08-08 21:24:49 +10:00
fnoop
bfceb5dd32 AC_PrecLand: Improve logging
Add unit/multiplier of new fields to log structure
Fix new log structure
2018-08-08 10:23:26 +09:00
Michael du Breuil
f2b4e06a1a AP_Airspeed: Add 5"H2O DLVR differential sensor driver 2018-08-08 09:07:17 +10:00
Michael du Breuil
d568767164 AP_Math: Add conversion between inches of water to pascals 2018-08-08 09:07:17 +10:00
Andrew Tridgell
c9a830bf3f AP_Notify: support both NCP5623 addresses 2018-08-08 07:11:50 +10:00
Andrew Tridgell
935165a8f8 AP_Notify: tidy up NCP5623 driver 2018-08-08 07:11:50 +10:00
caijie
a98d892dec AP_Notify: Add RGB LED driver for NCP5623 2018-08-08 07:11:50 +10:00
Andrew Tridgell
301884f7a6 AP_RCProtocol: fixed coverity error in SUMD
CID308356
2018-08-07 13:22:08 +10:00
Andrew Tridgell
d1334fab73 AP_ROMFS: fixed error handling in tinflate
coverity CID308327
2018-08-07 13:22:08 +10:00
Michael du Breuil
4aff747b28 AP_RCProtocol: Fix out of bounds write, CID 308323 and 308333 2018-08-07 12:11:49 +10:00
Andrew Tridgell
3ed7c060df AP_Compass: address review comments 2018-08-07 10:00:10 +10:00
Jonathan Challinger
cefd998177 AP_Compass: add expected DEV_ID parameters 2018-08-07 10:00:10 +10:00
Jonathan Challinger
878e84a015 AP_Compass: correct edge case where checks pass when saved dev_id != detected dev_id 2018-08-07 10:00:10 +10:00
Michael du Breuil
ee9cc28fda AP_NavEKF2: Utilize the GPS drivers estimate for lag 2018-08-07 09:55:26 +10:00
Michael du Breuil
1a406dacfc AP_GPS: Ensure a lag value is always provided
The value may not be the optimal value for the driver, but we should
always try to provide a value for the caller
2018-08-07 09:55:26 +10:00
Michael du Breuil
21dfe02c6e GCS_MAVLink: always send an idea of battery voltage as part of
BATTERY_STATUS
2018-08-07 09:52:45 +10:00
Peter Barker
e4ff937c96 RC_Channel: remove min-max-configured pre-arm checks
These are really, really expensive to run while your RC isn't
configured.

We now have a split between inputs (RC) and servos (SRV), so these
aren't as critical as they were.  We also have range checks to ensure
they're roughly good enough to fly with.
2018-08-07 09:45:09 +10:00
Peter Barker
eaefdcfac2 AP_Arming: remove min-max-configured pre-arm checks 2018-08-07 09:45:09 +10:00
Peter Barker
87e7cc7ef0 RC_Channels: zero all channels before populating
Fix for CID 308365
2018-08-07 09:12:43 +10:00
vierfuffzig
bc52d430f9 Chibios add bootloader for mini-pix 2018-08-07 07:09:39 +10:00
Andrew Tridgell
f0fba01138 AP_Stats: use set_and_save_ifchanged()
if the board has no GPS then the values usually don't change
2018-08-06 21:46:06 +10:00
Randy Mackay
1c18d06aa3 AR_AttitudeControl: move unnecessary else 2018-08-06 11:30:22 +09:00
Randy Mackay
9b60e0844b AR_AttitudeControl: add get_desired_pitch accessor 2018-08-06 11:30:22 +09:00
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
Peter Barker
dbccd6a399 GCS_MAVLink: use rc() method to get rc singleton 2018-08-01 12:11:30 +09:00
Peter Barker
f4c93dc697 DataFlash: use rc() method to get rc singleton 2018-08-01 12:11:30 +09:00
Peter Barker
c209152d13 AP_Tuning: use rc() method to get rc singleton 2018-08-01 12:11:30 +09:00
Peter Barker
497746c3d0 AP_RSSI: use rc() method to get rc singleton 2018-08-01 12:11:30 +09:00
Peter Barker
2489234fcf AP_Mount: use rc() method to get rc singleton 2018-08-01 12:11:30 +09:00
Peter Barker
80a4083fc7 AP_ICEngine: use rc() method to get rc singleton 2018-08-01 12:11:30 +09:00
Peter Barker
1eacd685e3 AP_Arming: use rc() method to get rc singleton 2018-08-01 12:11:30 +09:00
Peter Barker
747fc3814d RC_Channel: rename in_rc_failsafe to has_valid_input 2018-08-01 12:11:30 +09:00
Peter Barker
61c34ea98c RC_Channel: move handling of auxillary switches into RC_Channel
RC_Channel: move handling of Rover's functions into RC_Channel

RC_Channel: move auxsw handling for camera to base RC_Channel

RC_Channel: add responsibility for servorelay events

RC_Channel: move mode switch handling to base class
2018-08-01 12:11:30 +09:00
Peter Barker
007434cdac AC_Sprayer: move Copter CHn_OPT to RC_Channel RCn_OPTION 2018-08-01 12:11:30 +09:00
Peter Barker
fb786b8d56 AP_Camera: add singleton 2018-08-01 12:11:30 +09:00
Andrew Tridgell
44fd85ff29 HAL_ChibiOS: reduce memory used by serial buffers
this does not appear to affect log download speed. It saves about 27k
of memory
2018-08-01 13:11:16 +10:00
Peter Barker
ce62b2303a DataFlash: add ability to log-disarmed 2018-08-01 11:28:52 +09:00
Michael du Breuil
1e699a53f6 AP_Landing: Fix misspelling in deepstall docs 2018-08-01 09:24:26 +10:00
Michael du Breuil
8357b31e57 AP_Relay: Remove APM doc references 2018-08-01 09:24:26 +10:00
Michael du Breuil
f0a4059d73 AP_Rangefinder: Remove APM doc references 2018-08-01 09:24:26 +10:00
Michael du Breuil
2134373646 AP_RSSI: Remove APM doc references 2018-08-01 09:24:26 +10:00
Michael du Breuil
e82663baf2 AP_BattMonitor: Remove APM doc references 2018-08-01 09:24:26 +10:00
Michael du Breuil
6225f51815 AP_Airspeed: Remove APM doc references 2018-08-01 09:24:26 +10:00
Michael du Breuil
fd9f9cdfe0 AP_BattMonitor: Removed the need to set the battery_voltage flag 2018-08-01 09:22:09 +10:00
Michael du Breuil
a5e974c227 AP_Notify: Reduce flash consumption, fix some drivers, always allow
buzzer
2018-08-01 09:22:09 +10:00
Michael du Breuil
cca6b54921 AP_GPS: Remove unneeded field limitations
Saves ~1100 bytes of flash
2018-08-01 09:19:20 +10:00
Michael du Breuil
80313abf31 SRV_Channel: Remove useless read from manual passthrough 2018-08-01 09:19:20 +10:00
Michael du Breuil
60f19bbf02 RC_Channel: Allow an input to be ignored 2018-08-01 09:19:20 +10:00
Pierre Kancir
37f7cc4bcf SITL: rearrange Grippers and Sprayers in SITL 2018-07-31 23:34:43 +10:00
Pierre Kancir
96c54550e5 AP_HAL_SITL: rearrange Grippers and Sprayers in SITL
Adds parameters to configure and disable
2018-07-31 23:34:43 +10:00
Andrew Tridgell
8b4b38bcb2 DataFlash: removed "no io thread heartbeat" msg 2018-07-31 19:37:17 +10:00
Hwurzburg
19f44f80ad HAL_ChibiOS: Added Omnibus F4 NanoV6 (only V6)
bench tested all ports
2018-07-30 19:32:29 +10:00
Andrew Tridgell
4026b9f49d HAL_ChibiOS: probe all external compasses on mini-pix 2018-07-30 17:26:19 +10:00
Andrew Tridgell
2ded88e611 AP_Compass: allow override of QMC5883L orientation 2018-07-30 17:26:19 +10:00
Andrew Tridgell
397ba488db AP_Notify: use NTF_BUZZ_ENABLE to disable tonealarm 2018-07-30 15:42:58 +10:00
Randy Mackay
cb3731e08e Compass: fix compile warning in calibrator output 2018-07-30 14:57:01 +10:00
Andrew Tridgell
1eb010fbf1 AP_Notify: reduced tone buffer size
100 is plenty
2018-07-30 14:02:12 +10:00
Andrew Tridgell
bdca329012 HAL_PX4: fixes for new tone_alarm system
we need to start the driver
2018-07-30 14:02:12 +10:00
Andrew Tridgell
b11bd33b0e AP_Notify: removed extra call to play_string 2018-07-30 14:02:12 +10:00
Andrew Tridgell
d28c8f0214 AP_Notify: added duration to toneAlarm_set_buzzer_tone 2018-07-30 14:02:12 +10:00
Andrew Tridgell
22d588146e HAL_PX4: added duration to toneAlarm_set_buzzer_tone 2018-07-30 14:02:12 +10:00
Andrew Tridgell
03b7c08be6 HAL_Linux: added duration to toneAlarm_set_buzzer_tone
required for disco
2018-07-30 14:02:12 +10:00
Andrew Tridgell
c83567dcba HAL_ChibiOS: added duration to toneAlarm_set_buzzer_tone 2018-07-30 14:02:12 +10:00
Andrew Tridgell
949324ff2b AP_HAL: added duration to toneAlarm_set_buzzer_tone 2018-07-30 14:02:12 +10:00
Jonathan Challinger
ddf0333a24 AP_HAL_Linux: reflect changes to tonealarm interface 2018-07-30 14:02:12 +10:00
Jonathan Challinger
0dd151c0f3 AP_Notify: changes needed for PX4 tonealarm 2018-07-30 14:02:12 +10:00
Jonathan Challinger
4e48923c64 AP_HAL_PX4: implement new tonealarm interface 2018-07-30 14:02:12 +10:00
Jonathan Challinger
f4fc9249f7 AP_Notify: support extended PLAY_TUNE message 2018-07-30 14:02:12 +10:00
Jonathan Challinger
cba85eee7b AP_Notify: MMLPlayer constrain note frequency 2018-07-30 14:02:12 +10:00
Jonathan Challinger
98d962ffa2 AP_Notify: MMLPlayer note_tab static const 2018-07-30 14:02:12 +10:00
Jonathan Challinger
720676b28c AP_Notify: run astyle on ToneAlarm and MMLPlayer 2018-07-30 14:02:12 +10:00
Jonathan Challinger
b31ddedfef AP_Notify: merge ToneAlarm files, use new AP_HAL tonealarm interface 2018-07-30 14:02:12 +10:00
Jonathan Challinger
f5f6220283 AP_HAL_ChibiOS: reflect changes to AP_HAL tonealarm interface 2018-07-30 14:02:12 +10:00
Jonathan Challinger
f936b1dbc2 AP_HAL: change tonealarm interface 2018-07-30 14:02:12 +10:00
murata
396517fe58 DataFlash: Delete unused arguments. 2018-07-30 12:14:49 +09:00
Andrew Tridgell
b1d9f4cc39 AP_SpdHgtControl: update API for TECS change 2018-07-30 13:09:15 +10:00
Andrew Tridgell
f3336fdb60 AP_TECS: removed dependency on soaring controller 2018-07-30 13:09:15 +10:00
Andrew Tridgell
e39d070b78 AP_Compass: clear DEV_ID for undetected compasses
this prevents user confusion with the number of compasses detected
2018-07-30 13:07:55 +10:00
Randy Mackay
5cf119cd2f AP_RSSI: const get_gpio and fix includes 2018-07-30 10:14:04 +09:00
Randy Mackay
eb026eef98 AP_RSSI: support pwm input on gpio pin 2018-07-30 10:14:04 +09:00
Randy Mackay
4f6c50b79e AP_RSSI: minor format fix 2018-07-30 10:14:04 +09:00
Randy Mackay
06d26aaaa7 AP_RSSI: clarify PIN_LOW/HIGH parameter description 2018-07-30 10:14:04 +09:00
Andrew Tridgell
72ee20c590 HAL_ChibiOS: added RC input for OMNIBUSF7V2 2018-07-30 10:45:55 +10:00
Timothy Knab
d4c19ebc3c HAL_ChibiOS: Updated OMNIBUSF7V2
Compasses on the I2C bus are now detected properly and GPS on UART3 works.
2018-07-30 10:45:55 +10:00
Andrew Tridgell
95aaa01014 HAL_ChibiOS: override COMPASS_AUTO_ROT on several boards 2018-07-28 18:05:12 +10:00
Andrew Tridgell
b181340fd9 AP_Compass: allow override of COMPASS_AUTO_ROT 2018-07-28 18:05:12 +10:00
Andrew Tridgell
8c9f2bc79e AP_IOMCU: fixed setting of rate masks
this affects layouts which set a subset of channels on a timer
2018-07-28 15:25:57 +10:00
Andrew Tridgell
1eef29e525 HAL_ChibiOS: only set freq on valid IO channels 2018-07-28 15:25:57 +10:00
Andrew Tridgell
2174c53eb6 HAL_ChibiOS: added Pixhawk1 build target
this is more obvious to users than fmuv3
2018-07-27 10:02:31 +10:00
Andrew Tridgell
a8647f834e AP_RangeFinder: fixed VL53L0X semaphore usage 2018-07-27 09:15:32 +10:00
Randy Mackay
8bf6e8e0cf AP_OSD: fix compiler warnings 2018-07-26 10:25:56 -07:00
Alexander Malishev
1377943eb3 HAL_ChibiOS: fix DTCM size in stm32f745 mcu 2018-07-26 17:52:37 +10:00
Michael du Breuil
46355e3de9 AP_Math: Add a warning to rotations to indicate that it is expected to
match the MAVLink definitions
2018-07-26 12:58:14 +09:00
liang.tang
8664ed006a AC_Circle: use stopping point to get closest point on circle 2018-07-26 12:12:07 +09:00
Raouf
e55369b1c8 AC_Fence: add always land option 2018-07-26 10:08:45 +09:00
Aaron Wang Shi
1304d37699 AP_HAL_Linux: fix bhat GPS SPI conflict 2018-07-24 11:28:22 -07:00
Andrew Tridgell
b130036798 HAL_SITL: use SIM_RC_CHANCOUNT 2018-07-24 19:44:03 +10:00
Andrew Tridgell
128ea42286 SITL: added SIM_RC_CHANCOUNT parameter 2018-07-24 19:44:03 +10:00
Andrew Tridgell
787493277e AP_Arming: only check trim on valid channel count 2018-07-24 19:44:03 +10:00
Peter Barker
937d8dac97 AP_Motors: remove unneeded initialisations 2018-07-23 16:30:40 +09:00
Peter Barker
610bcb3387 AP_Parachute: remove un-needed initialisations 2018-07-23 13:53:33 +09:00
Peter Barker
ec6e2b9da8 AP_RPM: remove unneeded initialisations
These should always be static
2018-07-23 13:53:09 +09:00
Peter Barker
d3877bf2d0 AP_WheelEncoder: remove un-needed initialisations
Should only be created statically
2018-07-23 13:52:34 +09:00
Peter Barker
57bc4d8736 AP_Mount: remove un-needed initialisations
These objects should always be created with new() or statically.
2018-07-23 13:18:37 +09:00
Michael du Breuil
c5a69d8ec2 AP_Notify: Fix bad loop count on notify LED's 2018-07-23 10:11:29 +09:00
vierfuffzig
1c91bd3588 AP_OSD: added temperature item 2018-07-21 06:32:07 +10:00
Aaron Wang Shi
4f2d9c2c4d AP_HAL_Linux: support PWM input for BH hat 2018-07-20 00:32:55 -07:00
Andrew Tridgell
8a26ca1ddf HAL_ChibiOS: added a DMA reserve heap
this ensures we keep some DMA-capable memory aside for when it is
needed
2018-07-20 15:48:21 +10:00
Andrew Tridgell
1dcac14b1e AP_RCProtocol: cleanup code style
using Tools/CodeStyle/ardupilot-astyle.sh
2018-07-20 15:47:18 +10:00
Siddharth Purohit
f9ab7e54d4 HAL_ChibiOS: increase sigread buffer size for protocols with longer length 2018-07-20 15:47:18 +10:00
Siddharth Purohit
baff7291ce AP_RCProtocol: add support for srxl and st24 protocol 2018-07-20 15:47:18 +10:00
Siddharth Purohit
f99bd32b51 RC_Protocol: add detection of sumd protocol over sigread 2018-07-20 15:47:18 +10:00
Michael du Breuil
bff985a9f4 AP_Notify: Configure the PCA9685 every boot 2018-07-20 14:53:23 +10:00
Michael du Breuil
961e16dca9 AP_Notify: Use a bitfield to load LED drivers 2018-07-20 14:53:23 +10:00
Andrew Tridgell
73cfd40e7f HAL_ChibiOS: reduce latency of DMA sharing
if we are sharing a DMA channel between i2c and SPI then this saves
latency on SPI by giving up the DMA channel between retries
2018-07-20 14:51:18 +10:00
Ebin
ccb32cf357 APM_Control: BRAKE param default is true 2018-07-20 14:41:32 +10:00
Ebin
1dc1b28234 APM_Control: changed default PID for Balance Bot 2018-07-20 14:41:32 +10:00
Ebin
89ffa94427 SITL: Removed redundant variables and modified/deleted commented lines 2018-07-20 14:41:32 +10:00
Ebin
21445e91be SITL: new balancebot physics simulation 2018-07-20 14:41:32 +10:00
Andrew Tridgell
cb19d4dffc AP_HAL: added toneAlarm_set_tune_string 2018-07-20 14:37:16 +10:00
Andrew Tridgell
d93964b319 AP_Notify: support playing tunes by string on ChibiOS 2018-07-20 14:37:16 +10:00
Andrew Tridgell
4244daeb2d HAL_ChibiOS: support playing tunes by string 2018-07-20 14:37:16 +10:00
Andrew Tridgell
98f87f5087 SITL: fixed gimbal for tailsitter 2018-07-20 14:21:06 +10:00
Andrew Tridgell
9a6113e5d8 AP_AHRS: fixed tailsitters in RealFlight
we need to use the rotated accel for the earth-frame accel
2018-07-20 14:21:06 +10:00
Andrew Tridgell
cbd6f4cc21 AP_Compass: fixed compass for tailsitters in SITL 2018-07-20 14:21:06 +10:00
Randy Mackay
9eebb6225a AR_AttitudeControl: brake fix to set limit in only one direction 2018-07-19 09:04:50 +08:00
Peter Barker
fdd111a24d AP_HAL_SITL: move include for pthread.h
We need pthread_t for a member
2018-07-19 10:27:47 +10:00
E Thomas
c8ce76e8a6 Added support for PX4V1 UARTD in HAL_PX4_Class 2018-07-19 08:11:18 +10:00
Michael du Breuil
16b6201195 RC_Channel: Allow a RC_OVERRIDE_TIMEOUT of -1 to use the overrides
forever
2018-07-19 07:53:43 +10:00
Jonathan Challinger
65b20bfd83 AP_IOMCU: fix radio failsafe handling 2018-07-19 06:52:09 +10:00
Andrew Tridgell
ec97e7772d HAL_ChibiOS: rename f4by-ch to F4BY 2018-07-18 21:24:11 +10:00
Alexander Malishev
f265d7e128 AP_Bootloader: add f4by bootloader 2018-07-18 21:10:39 +10:00
Andrew Tridgell
3a8ef21d89 HAL_F4Light: renamed bootloader 2018-07-18 17:49:54 +10:00
Andrew Tridgell
75c5fda222 AP_SerialManager: make console do mavlink2 by default
this is low impact as it doesn't affect radios that may not do mavlink2
2018-07-18 16:21:02 +10:00
Randy Mackay
465564ba99 AP_Follow: fix initialisation of offsets 2018-07-18 15:11:09 +09:00
Randy Mackay
0834e7ae9b AP_Follow: update FOLL log column names
VelN is easier to understand than VelX
Also minor formatting fix
2018-07-18 15:11:09 +09:00
Randy Mackay
f53bfdbd38 AP_Follow: fix reporting to GCS 2018-07-18 15:11:09 +09:00
Andrew Tridgell
027beb0dc1 AP_Compass: rename COMPASS_ROT_AUTO to COMPASS_AUTO_ROT
request from Randy
2018-07-18 16:07:19 +10:00
Andrew Tridgell
15d2daabf0 AP_Compass: don't do auto-orientation if using ROTATION_CUSTOM 2018-07-18 16:07:19 +10:00
Andrew Tridgell
a73492b40a AP_Compass: fixed newline in statustext 2018-07-18 16:07:19 +10:00
Andrew Tridgell
196ba0e858 AP_Compass: make COMPASS_ROT_AUTO take 3 values
0 for disabled, 1 for check only, 2 for check and fix
2018-07-18 16:07:19 +10:00
Andrew Tridgell
d15a4ad92a AP_Compass: improved error reporting, check all compasses
this uses extensions to the MAG_CAL_REPORT message to convey failures
of orientation checking.

It also checks all compasses, external or internal. It only tries to
fix the orientation if it is external
2018-07-18 16:07:19 +10:00
Andrew Tridgell
a5749c1869 AP_Compass: allow diagonals and off-diagonals to be calculated on rot change
this re-runs the fit on change in orientation
2018-07-18 16:07:19 +10:00
Andrew Tridgell
b4c7d1925e AP_Compass: allow for runtime changes to SIM_MAG_DIA_?
this makes for easier testing
2018-07-18 16:07:19 +10:00
Andrew Tridgell
3c2e8baee2 AP_Compass: improved orientation reporting
and fail magcal if we fail orientation detection for an external
compass
2018-07-18 16:07:19 +10:00
Andrew Tridgell
8b0f40b402 AP_Compass: implement automatic compass orientation
this automatically determines the compass orientation when doing a 3D
compass calibration, if COMPASS_ROT_AUTO is enabled.
2018-07-18 16:07:19 +10:00
Andrew Tridgell
4acc06df87 AP_Compass: support diagonal, off-diagonal and rotation in SITL
compass
2018-07-18 16:07:19 +10:00
Andrew Tridgell
8170fbcf80 AP_Math: added a comment on conventions for to_euler() 2018-07-18 16:07:19 +10:00
Andrew Tridgell
d1f67f6ded SITL: added diagonal, off-diagonal and orientation of SITL compass 2018-07-18 16:07:19 +10:00
Andrew Tridgell
1056e64419 AP_AHRS: added get_DCM_rotation_body_to_ned()
this specifically asks for the DCM attitude, which will be used for
the comass calibration to help determine compass orientation
2018-07-18 16:07:19 +10:00
Andrew Tridgell
5b0b9ef962 AP_AHRS: don't do yaw correction in DCM while calibrating compass
this avoids applying bad compass yaw, and helps the compass
calibration code
2018-07-18 16:07:19 +10:00
Andrew Tridgell
caa553e727 HAL_ChibiOS: fixed internal i2c mask for Pixracer 2018-07-18 12:04:01 +10:00
Andrew Tridgell
59aab9987e HAL_ChibiOS: account for I2C base in compass masks 2018-07-18 12:04:01 +10:00
Randy Mackay
3d72022f6e EKF: modify ALT_SOURCE param description
We regularly find users changing the ALT_SOURCE to 1 (range finder) when trying to implement terrain following which is not the correct way to do it
2018-07-18 08:31:09 +09:00
Patrick José Pereira
2ba6f64281 SITL: Remove unused variables
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-07-17 20:25:22 +09:00
Michael du Breuil
e4a8e9deb1 AP_RCMapper: Mark sub specific parameters as sub only for docs 2018-07-17 12:08:27 +10:00
Michael du Breuil
fc44f693e5 AP_Airspeed: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil
65df5c3ff6 AP_AHRS: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil
08ef60d436 AP_ADC: Remove unused AP_ADC class 2018-07-17 09:29:50 +10:00
Michael du Breuil
1e7a06ef6b AP_Mount: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil
a5b8279ea4 AP_Motors: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil
dddb1e6a58 AP_Module: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil
1efad07a84 AP_InertialSensor: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil
2e135f4fc4 AP_HAL_Linux: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil
fcb1c4cdfd AP_GPS: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil
875e03bdd9 AP_BattMonitor: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil
57f3e9cd88 AP_Airspeed: Remove unused ADC include 2018-07-17 09:29:50 +10:00
bnsgeyer
0f75866042 AP_Motors: Tradheli-corrected get_motor_mask method 2018-07-16 12:41:16 +10:00
bnsgeyer
dec8c5de77 AP_Motors: convert heli code to use SRV_Channels
this converts the heli code to use the SRV_Channels output
functions. It does not change behaviour, but removes the last vehicle
type that did its own servo output calculations.  This change also
fixed servo initialization conflicts.

Note that this also allows helis to be setup with more than one
channel for a particular output (eg. two separate channels for tail
servo if they are wanted). This isn't likely to be used much, but does
make heli consistent with other vehicle types
2018-07-16 12:41:16 +10:00
bnsgeyer
c3d4b792ad SRV_Channel: fixes channel numbering for channel already assigned message 2018-07-16 12:41:16 +10:00
bnsgeyer
73df3e0af2 SRV_Channel: modified set_output_pwm_trimmed for reverse property
Modified function to account for servo reverse property
2018-07-16 12:41:16 +10:00
Andrew Tridgell
e94177e469 SRV_Channel: added function based set_output_min_max
this is for a conversion of AP_Motors heli code to servo functions
2018-07-16 12:41:16 +10:00
Alexander Malishev
4342dae065 HAL_ChibiOS: define BOARD_RSSI_ANA_PIN to simpify tuning 2018-07-16 08:29:49 +10:00
Alexander Malishev
e04f438ce3 HAL_ChibiOS: fix analog pins on MatekF405 2018-07-16 08:29:49 +10:00
Alexander Malishev
89f7d652e0 HAL_ChibiOS: removed wrong led pin 2018-07-16 08:29:49 +10:00
Alexander Malishev
13b56d5870 AP_OSD: improve AHI for large roll angles 2018-07-14 18:08:36 +10:00
Andrew Tridgell
3c0ed01fd0 AP_Compass: prevent use of null dev_icm device in ICM20948 driver 2018-07-14 17:51:50 +10:00
Andrew Tridgell
ed09467f06 AP_BoardConfig: removed verbose SPI probe debug messages
these are just confusing for users
2018-07-14 17:51:50 +10:00
Andrew Tridgell
71647cfc6b AP_Compass: removed HMC5843 compass probe error 2018-07-14 17:51:50 +10:00
Andrew Tridgell
2a62938fb1 AP_BoardConfig: enable get_board_type() on all boards
return BOARD_TYPE_UNKNOWN for boards that don't use board detection
2018-07-14 17:51:50 +10:00
Andrew Tridgell
9ab55f6838 HAL_ChibiOS: probe for external compasses on several boards
boards that have no internal compass will now probe for all external
compass types
2018-07-14 17:51:50 +10:00
Andrew Tridgell
ff6d639ed7 AP_Compass: separated out external compass probing
this allows any ChibiOS board to specify that it wants to probe for
all possible external compass types with a define in hwdef.dat

It also implements duplicate compass detection for all i2c drivers,
ensuring we can't get a load of a driver on the same bus/address twice
2018-07-14 17:51:50 +10:00
Andrew Tridgell
476bddd9a3 HAL_ChibiOS: use HAL_I2C_INTERNAL_MASK 2018-07-14 17:51:50 +10:00
Andrew Tridgell
0fc6ca22f7 AP_HAL: setup HAL_I2C_INTERNAL_MASK for ChibiOS 2018-07-14 17:51:50 +10:00
Andrew Tridgell
63d385ffb1 AP_AHRS: fixed arming with no compass in plane
allow arming if the GPS quality is good, the yaw alignment and
position will fix itself once the vehicle starts moving
2018-07-14 17:49:52 +10:00
Andrew Tridgell
ac40a20c02 AP_NavEKF3: fill in gps_quality_good flag 2018-07-14 17:49:52 +10:00
Andrew Tridgell
3d31773fb4 AP_NavEKF2: fill in gps_quality_good flag 2018-07-14 17:49:52 +10:00
Andrew Tridgell
103d1aea41 AP_NavEKF: added gps_quality_good EKF flag 2018-07-14 17:49:52 +10:00
heitiane
2c24bac79e BARO_generic: add Dummy GCS to meet the requirement of AP_Baro::calibrate(). 2018-07-14 10:32:51 +10:00
vierfuffzig
78386ed080 AP_OSD: added OSD_MSG_TIME parameter 2018-07-14 09:07:42 +10:00
Andrew Tridgell
7eabee04a3 HAL_ChibiOS: enable OSD on KakuteF7 2018-07-13 14:53:53 +10:00
Andrew Tridgell
b96f24c80e HAL_ChibiOS: added KakuteF7
thanks to Huibean for the fixes!
2018-07-13 14:53:53 +10:00
Andrew Tridgell
dc54babe41 SITL: setup more defaults with flightaxis
with copters now you only need to set FRAME_CLASS to fly
2018-07-13 10:19:01 +10:00
Andrew Tridgell
7ec6522b9d AP_Compass: default to right mag offsets for SITL 2018-07-13 10:19:01 +10:00
Andrew Tridgell
2fe2c8fbda AP_Compass: initialise compass IDs saved in SITL
this ensures we don't get uncalibrates compasses in SITL
2018-07-13 10:19:01 +10:00
Andrew Tridgell
5f8b57ba19 AP_InertialSensor: added SITL device IDs 2018-07-13 10:19:01 +10:00
Andrew Tridgell
823c4523b3 AP_Compass: added SITL device IDs 2018-07-13 10:19:01 +10:00
Andrew Tridgell
464dc9102f AP_HAL: added device types for SITL
and fixed a stack init bug for make_bus_id
2018-07-13 10:19:01 +10:00
Andrew Tridgell
f2d602690e HAL_ChibiOS: fixed build error with some compilers 2018-07-13 08:50:46 +10:00
Andrew Tridgell
83f38d536e HAL_ChibiOS: fixed flow control auto-detect without DMA
this fixes automatic flow control detection when we are not using DMA
for TX
2018-07-13 07:34:30 +10:00
Andrew Tridgell
0201893f7c HAL_ChibiOS: fixed peripheral power-up on fmuv5
we need to do the powerup before we initialise the UARTs
2018-07-13 07:34:30 +10:00
Andrew Tridgell
409e857f6b HAL_ChibiOS: use pullup on CTS line
this makes life less difficult for SiK radios which go into bootloader
mode on low CTS
2018-07-13 07:34:30 +10:00
Andrew Tridgell
11e09a846c HAL_ChibiOS: setup RTS pins as pullup
this prevents RTS pins from keeping SiK radios in bootloader mode on
peripheral powerup
2018-07-13 07:34:30 +10:00
Andrew Tridgell
63a0a4979c HAL_ChibiOS: delay peripheral power on for fmuv5
this should prevent SiK radios staying in the bootloader
2018-07-13 07:34:30 +10:00
Michael du Breuil
0aaa029f9b AP_HAL_Linux: GPIO_RPi: Fix UB when reading a pin
You can't shift by more then the word width
2018-07-11 23:09:52 -07:00
Michael du Breuil
d06a82af1d AP_HAL_VRBrain: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Michael du Breuil
1ac78d3a80 AP_HAL_SITL: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Michael du Breuil
039e146dec AP_HAL_PX4: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Michael du Breuil
1f7ee55211 AP_HAL_Linux: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Michael du Breuil
312e21dc2f AP_HAL_F4Light: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Michael du Breuil
f4b1d530c1 AP_HAL_Empty: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Michael du Breuil
6fba374069 AP_HAL_ChibiOS: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Michael du Breuil
3419b045e1 AP_HAL: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Michael du Breuil
6925dfb4ae AP_Camera: Remove usage of analogPinToDigitalPin 2018-07-11 23:09:52 -07:00
Andrew Tridgell
10e9182c21 HAL_SITL: fixed delay() for SITL threads
with the new thread_create() interface we need to handle delays a bit
differently
2018-07-12 15:04:43 +10:00
Alexander Malishev
785cf293cd AP_OSD: use software blink
This should fix blink issue with some hardware
2018-07-12 15:04:32 +10:00
Andrew Tridgell
f083b80700 HAL_ChibiOS: added preallocation of DMA bouncebuffers
we need 512 bytes for microSD
2018-07-12 14:34:04 +10:00
Andrew Tridgell
e193a161f2 HAL_ChibiOS: enable SDIOv1 bouncebuffers 2018-07-12 14:34:04 +10:00
Andrew Tridgell
f84424cca4 HAL_ChibiOS: added specific builds for the Pixracer and mRoX21 boards 2018-07-12 12:33:32 +10:00
Andrew Tridgell
e52176e23b AP_BoardConfig: allow hwdef.dat override of BRD_TYPE 2018-07-12 12:33:32 +10:00
Andrew Tridgell
721f5d86b1 HAL_ChibiOS: fixed mRoX21 IMU setup 2018-07-12 12:33:32 +10:00
Andrew Tridgell
0310bd468c HAL_ChibiOS: changed uart order for KakuteF4
thanks to feedback from Arther
2018-07-12 11:50:10 +10:00
Andrew Tridgell
48747be494 HAL_VRBrain: don't clear buffers on no baud change 2018-07-12 11:41:31 +10:00
Andrew Tridgell
1d1af5fd68 HAL_Linux: don't clear buffers on no baud change 2018-07-12 11:41:31 +10:00
Andrew Tridgell
fe07a73935 HAL_PX4: don't clear buffers if no baudrate change 2018-07-12 11:41:31 +10:00
Andrew Tridgell
50f7e55f0b HAL_ChibiOS: don't clear buffers if no baudrate change 2018-07-12 11:41:31 +10:00
fnoop
374c46bd57 HAL_ChibiOS: MatekF405-Wing UART reorder 2018-07-11 16:26:04 -07:00
Dr.-Ing. Amilcar do Carmo Lucas
fe90618e3e AP_TempCalibration: remove duplicated parameter 2018-07-11 12:16:42 -07:00
Randy Mackay
ce9857d77d AP_BattMonitor: add BLHeli ESC to MONITOR param desc 2018-07-11 17:44:00 +09:00
Andrew Tridgell
1f2c24ef7b HAL_ChibiOS: backup storage to microSD if possible
very useful for diagnostics.

This also fixes a bug on boards with flash storage, to not switch to
microSD storage if flash storage available
2018-07-11 16:38:03 +10:00
Andrew Tridgell
66ee202e24 HAL_PX4: backup storage to microSD if possible
very useful for diagnostics
2018-07-11 16:38:03 +10:00
fnoop
922a9762df HAL_ChibiOS: Fix MatekF405-Wing default compass rotation 2018-07-11 10:10:34 +10:00
Andrew Tridgell
985a319c42 AP_FlashStorage: fixed build of example on small memory boards 2018-07-11 10:07:38 +10:00
Lucas De Marchi
d2446e1219 AP_HAL_Linux: use Thread abstraction to create thread
The open coded version has the same problem fixed by Thread abstraction:
the order of the calls matters and it's easy to call in the wrong order.
Here pthread_attr_setschedparam() and pthread_attr_setschedpolicy()
should be swapped, like in 62c2f737d5 (AP_HAL_Linux: fix setting RT priorities.)
2018-07-11 10:00:29 +10:00
Lucas De Marchi
e11d268818 AP_HAL_Linux: Thread: allow loose running thread 2018-07-11 10:00:29 +10:00
Andrew Tridgell
ba0fb3d9d2 AP_IOMCU: fixed repeated upload of IO fw 2018-07-11 09:51:43 +10:00
Andrew Tridgell
2d8dbc05d0 HAL_ChibiOS: fixed omnibusf4pro I2C
many thanks to Kelly-Foster and @sh83
2018-07-11 08:33:49 +10:00
Andrew Tridgell
fff4b3b4a0 HAL_ChibiOS: fixed build on some F4 boards 2018-07-11 07:24:39 +10:00
Jack
4b24a61023 AP_HAL_Linux: fix spelling of generated in panics 2018-07-10 09:55:01 -07:00
liang.tang
c03e50660c AC_WPNav: check validity of kP 2018-07-10 18:07:50 +09:00
Andrew Tridgell
ece10082e2 HAL_ChibiOS: added separate builds for Pixhawk4 and CUAVv5
this makes it easier to distinguish boards in logs, plus makes life
easier when the user is selecting the right firmware.

It also gives us the flexibility to make parameter changes as needed
2018-07-10 18:29:14 +10:00
Andrew Tridgell
f88a4b3a2f AP_Compass: fixed compass orientations on PH4 2018-07-10 18:29:14 +10:00
Andrew Tridgell
b647dde28f HAL_ChibiOS: changed which I2C bus is internal on fmuv5
match PH4 arrangement
2018-07-10 18:29:14 +10:00
Andrew Tridgell
385713abdd HAL_ChibiOS: support for PH4-mini board 2018-07-10 18:29:14 +10:00
Andrew Tridgell
9ca2c11333 AP_Arming: use check_enabled() in storage check 2018-07-10 15:41:44 +10:00
Andrew Tridgell
bf1bca6820 AP_Arming: added arming check for storage health 2018-07-10 15:41:44 +10:00
Andrew Tridgell
63a9b903ba HAL_ChibiOS: added fallback to microSD for param storage
useful for boards without flash sectors setup in bootloader for
storage, but can use microSD
2018-07-10 15:41:44 +10:00
Andrew Tridgell
d35abe67ae AP_HAL: added optional healthy check on storage object
used to check parameter storage is functional
2018-07-10 15:41:44 +10:00
Andrew Tridgell
3e5d5b4095 HAL_VRBRAIN: ensure system_id is nul terminated 2018-07-10 15:40:08 +10:00
Andrew Tridgell
7beb8b4872 HAL_PX4: ensure system_id is nul terminated 2018-07-10 15:40:08 +10:00
Andrew Tridgell
5d8b4c1e23 HAL_ChibiOS: ensure system_id is nul terminated 2018-07-10 15:40:08 +10:00
Andrew Tridgell
6328a7233f AP_OSD: cope with no EKF for vspeed 2018-07-10 15:40:08 +10:00
Andrew Tridgell
4939f30ec4 AP_HAL: make linux internal i2c be 0xffff
based on feedback from Lucas
2018-07-10 15:39:47 +10:00
Andrew Tridgell
b19219d636 HAL_Linux: allow for 16 I2C buses on Linux 2018-07-10 15:39:47 +10:00
Andrew Tridgell
8fd69250bd AP_Compass: use I2C bus masks
this allows for external compasses on all external I2C ports, while
retaining existing device ordering
2018-07-10 15:39:47 +10:00
Andrew Tridgell
6bf3dea5e7 AP_Notify: use I2C bus masks 2018-07-10 15:39:47 +10:00
Andrew Tridgell
cb77cc772c HAL_PX4: implement I2C bus masks 2018-07-10 15:39:47 +10:00
Andrew Tridgell
070e3cf37b HAL_Linux: implement I2C bus masks 2018-07-10 15:39:47 +10:00
Andrew Tridgell
4f9bd50038 HAL_ChibiOS: implement I2C bus masks 2018-07-10 15:39:47 +10:00
Andrew Tridgell
281a1b6569 AP_HAL: added I2C bus mask functions and macros 2018-07-10 15:39:47 +10:00
vierfuffzig
bdede462e8 AP_OSD: updated fonts 2018-07-10 12:34:42 +10:00
vierfuffzig
02bc49f6b5 AP_OSD: added roll and pitch angle items 2018-07-10 12:34:42 +10:00
Andrew Tridgell
33653b6734 AP_OSD: added SI and Aviation units 2018-07-10 12:34:42 +10:00
Andrew Tridgell
3292abaa19 HAL_ChibiOS: fixed F412 build 2018-07-10 11:48:06 +10:00
Michael du Breuil
f8e9e57523 AP_Camera: reduce feedback pin timer work, remove unneeded inits 2018-07-09 16:42:17 -07:00
Dr.-Ing. Amilcar do Carmo Lucas
59e087214f AP_NavEKF2: spell in comments (NFC) 2018-07-10 08:17:57 +09:00
Andrew Tridgell
a561aa2f6d AP_OSD: allow for runtime H and V offset change 2018-07-10 08:52:02 +10:00
Andrew Tridgell
a085b33729 AP_OSD: make units tables a bit easier to read
and add OSD_UNITS parameter
2018-07-10 08:52:02 +10:00
Alexander Malishev
d2e05eb927 AP_OSD: ensure spi_buffer space 2018-07-10 08:52:02 +10:00
Alexander Malishev
ac71a181d6 AP_OSD: refactoring based on review suggestions 2018-07-10 08:52:02 +10:00
Alexander Malishev
e364a815f8 AP_OSD: add warning levels for vbat, rssi and nsat 2018-07-10 08:52:02 +10:00
Alexander Malishev
731ae44ffa AP_OSD: add imperial units option 2018-07-10 08:52:02 +10:00
Alexander Malishev
eaac477131 AP_OSD: add inverted roll AH and inverted wind direction 2018-07-10 08:52:02 +10:00
Alexander Malishev
7873aff0b8 AP_OSD: allow to fine tune osd position 2018-07-10 08:52:02 +10:00
Alexander Malishev
dc454881df AP_OSD: increased lat/lon field
Lattitude integer part could be 4 char wide like -171.123
2018-07-10 08:52:02 +10:00
Alexander Malishev
8dd4108f3c AP_OSD: create usable default osd layout 2018-07-10 08:52:02 +10:00
Andrew Tridgell
6eb00b92fd AP_OSD: don't panic on bad font num in SITL 2018-07-10 07:21:20 +10:00
Randy Mackay
af6c5ebda1 AP_HAL_ChibiOS: reduce default BRD_PWM_COUNT to 4 for fmv3
also default relay pins to use aux out 5 and 6
2018-07-10 05:30:05 +10:00
Andrew Tridgell
a7d9f4eef7 HAL_ChibiOS: don't add defaults.parm when building bootloader 2018-07-09 20:59:51 +10:00
Andrew Tridgell
52a8198311 AP_OSD: added font switching at runtime for SITL 2018-07-09 20:48:59 +10:00
Andrew Tridgell
64fae25882 AP_OSD: added runtime font switching 2018-07-09 19:48:09 +10:00
Andrew Tridgell
5682cef162 AP_OSD: created font binaries 2018-07-09 19:48:09 +10:00
vierfuffzig
4f1db0f979 AP_OSD: added fonts and styles 2018-07-09 19:48:09 +10:00
vierfuffzig
795947b405 AP_OSD: Addded README.md for fonts 2018-07-09 19:46:48 +10:00
Andrew Tridgell
7454c9f8c5 AP_OSD: load font on startup
this reduces memory fragmemtation and maximises available memory
during update
2018-07-09 19:41:56 +10:00
Andrew Tridgell
6347de2b89 AP_OSD: added OSD_FONT parameter
allow for user selection of font
2018-07-09 19:41:56 +10:00
Andrew Tridgell
4055f28bc5 AP_OSD: use font*.bin as font name 2018-07-09 19:41:56 +10:00
Andrew Tridgell
fd02865a8b HAL_ChibiOS: use wildcard ROMFS name for fonts 2018-07-09 19:41:56 +10:00
Andrew Tridgell
822e20f830 AP_OSD: rename clarity.bin to font0.bin 2018-07-09 19:41:56 +10:00
Andrew Tridgell
e200de1f57 AP_IOMCU: use compressed interface for IO fw upload 2018-07-09 19:41:56 +10:00
Andrew Tridgell
27c435e217 HAL_ChibiOS: use compressed ROMFS for bootloader update 2018-07-09 19:41:56 +10:00
Andrew Tridgell
aa205d0537 AP_OSD: use compressed font file 2018-07-09 19:41:56 +10:00
Andrew Tridgell
c3db5c3da2 AP_ROMFS: added support for compressed files in ROMFS 2018-07-09 19:41:56 +10:00
Andrew Tridgell
3fc6968700 HAL_SITL: allow delay from other than main thread 2018-07-09 19:41:18 +10:00
Andrew Tridgell
3cd6d8cac7 HAL_VRBRAIN: removed restriction on delay in threads
threads other than the main thread should be able to sleep, but not
call the delay callback
2018-07-09 19:41:18 +10:00
Andrew Tridgell
c317cc3fa4 HAL_PX4: removed restriction on delay in threads
threads other than the main thread should be able to sleep, but not
call the delay callback
2018-07-09 19:41:18 +10:00
Andrew Tridgell
492978c0fa HAL_Linux: removed restriction on delay in threads
threads other than the main thread should be able to sleep, but not
call the delay callback
2018-07-09 19:41:18 +10:00
Andrew Tridgell
a489c93001 HAL_ChibiOS: removed restriction on delay in threads
threads other than the main thread should be able to sleep, but not
call the delay callback
2018-07-09 19:41:18 +10:00
Andrew Tridgell
0e29bcc4ab AP_IOMCU: use thread_create() API 2018-07-09 19:41:18 +10:00
Andrew Tridgell
b98d941526 AP_OSD: use thread_create API
this prevents a freeze in the FAT filesystem from affecting the OSD
2018-07-09 19:41:18 +10:00
Andrew Tridgell
9918ae3209 HAL_Linux: implement thread_create() 2018-07-09 19:41:18 +10:00
Andrew Tridgell
3dfa1f2879 HAL_PX4: implement thread_create() API 2018-07-09 19:41:18 +10:00
Andrew Tridgell
df3ce87e02 HAL_ChibiOS: implement thread_create() 2018-07-09 19:41:18 +10:00
Andrew Tridgell
88842adbd5 HAL_SITL: implement thread_create() API 2018-07-09 19:41:18 +10:00
Andrew Tridgell
e14e0b8a14 AP_HAL: added thread_create() API
this is deliberately a minimalistic API, for ease of implementation in
each HAL
2018-07-09 19:41:18 +10:00
Andrew Tridgell
8b337bfc4c AP_Notify: fixed shadowed variable warning 2018-07-09 19:41:18 +10:00
Andrew Tridgell
a9c570702c AP_Param: fixed build warning 2018-07-09 19:41:18 +10:00
Andrew Tridgell
5929b5fc33 AP_SerialManager: fixed find_baudrate to return mapped baudrate 2018-07-09 15:41:48 +10:00
Andrew Tridgell
dbe096e2f3 AP_OSD: default OSD_TYPE to SITL when enabled with --osd 2018-07-08 08:22:40 +10:00
Andrew Tridgell
ba1a611ea9 AP_OSD: fixed CPU usage in SITL thread 2018-07-07 13:09:52 +10:00
Andrew Tridgell
12a53ed662 HAL_PX4: fixed link on aerofc-v1
it does not have bl_update
2018-07-06 21:18:16 +10:00
Ebin
30b3d63e8a APM_Control: New default PID values for balance bots 2018-07-06 19:41:09 +10:00
Ebin
ce182fd307 APM_Control: fixed test condition in AR_AttutudeControl.cpp 2018-07-06 19:41:09 +10:00
Peter Barker
d698960728 GCS_MAVLink: correct bad fall-through 2018-07-06 10:43:17 +10:00
Andrew Tridgell
847cb760b4 HAL_ChibiOS: fixed fmuv4-beta hwdef for dup pin 2018-07-06 10:21:12 +10:00
Andrew Tridgell
bf6906819d HAL_ChibiOS: fixed configure of cube-red 2018-07-06 10:21:12 +10:00
Peter Barker
3710c50c4e GCS_MAVLink: handle MAV_CMD_ACCELCAL_VEHICLE_POS in GCS base class 2018-07-06 09:43:09 +10:00
Peter Barker
4775a67ea0 GCS_Common: handle command_long in GCS base class 2018-07-06 09:43:09 +10:00
Peter Barker
4ad065de99 GCS_MAVLink: handle command_int in base class 2018-07-06 09:43:09 +10:00
Peter Barker
37145253d9 AP_SerialManager: remove set_console_baud, factor out find_protocol_instance 2018-07-06 09:36:19 +10:00
Alexander Malishev
7a3eb69818 HAL_ChibiOS: allow arm without compass on omnibusf4pro 2018-07-06 09:04:50 +10:00
Andrew Tridgell
570470ac59 AP_AdvancedFailsafe: removed some old AVR code 2018-07-06 09:04:15 +10:00
Andrew Tridgell
fbf24f0492 HAL_ChibiOS: make serial number match HAL_PX4 2018-07-06 09:02:11 +10:00
Andrew Tridgell
840362f355 HAL_ChibiOS: fixed default revo compass orientation 2018-07-05 19:43:12 +10:00
Andrew Tridgell
15ee9593b5 HAL_ChibiOS: fixed duplicate pin definitions
thanks to @liang-tang for noticing
2018-07-05 12:07:55 +10:00
Andrew Tridgell
53dcf5bef8 HAL_ChibiOS: fixed build warning with MATEKF405 2018-07-05 11:48:40 +10:00
Andrew Tridgell
d280dbf119 AP_OSD: display --- when no airspeed available 2018-07-05 09:32:09 +10:00
Andrew Tridgell
cdf92c5158 AP_BattMonitor: fixed ESC telem scaling 2018-07-05 09:16:50 +10:00
Andrew Tridgell
f96c3c2c0f AP_OSD: added check for get_telem_data() 2018-07-05 09:16:50 +10:00
Andrew Tridgell
84d2b1cd93 AP_OSD: make packed decimal the default
and fix SITL char spacing
2018-07-05 08:06:04 +10:00