Commit Graph

17443 Commits

Author SHA1 Message Date
Andrew Tridgell 465c6c5a68 AP_BoardConfig: allow hwdef.dat override of BRD_TYPE 2018-07-12 11:44:30 +10:00
Andrew Tridgell 8a23a21383 HAL_ChibiOS: fixed mRoX21 IMU setup 2018-07-12 11:44:27 +10:00
fnoop 35a5166038 HAL_ChibiOS: MatekF405-Wing UART reorder 2018-07-12 11:43:23 +10:00
Andrew Tridgell cd6d585591 HAL_VRBrain: don't clear buffers on no baud change 2018-07-12 11:43:23 +10:00
Andrew Tridgell e661b1266f HAL_Linux: don't clear buffers on no baud change 2018-07-12 11:43:23 +10:00
Andrew Tridgell 84a6c18c43 HAL_PX4: don't clear buffers if no baudrate change 2018-07-12 11:43:23 +10:00
Andrew Tridgell 84624fbbf6 HAL_ChibiOS: don't clear buffers if no baudrate change 2018-07-12 11:43:23 +10:00
Andrew Tridgell 4f78d7200f AP_FlashStorage: fixed build of example on small memory boards 2018-07-11 15:32:35 +09:00
fnoop abdf56d6dd HAL_ChibiOS: Fix MatekF405-Wing default compass rotation 2018-07-11 14:20:53 +09:00
Andrew Tridgell d9ba148083 AP_Compass: fixed compass orientations on PH4 2018-07-11 14:20:34 +09:00
Andrew Tridgell 260ac21e13 AP_HAL: make linux internal i2c be 0xffff
based on feedback from Lucas
2018-07-11 14:20:26 +09:00
Andrew Tridgell 59a3deba3e HAL_Linux: allow for 16 I2C buses on Linux 2018-07-11 14:20:21 +09:00
Andrew Tridgell 16bd8ae852 AP_Compass: use I2C bus masks
this allows for external compasses on all external I2C ports, while
retaining existing device ordering
2018-07-11 14:20:18 +09:00
Andrew Tridgell d324c967de AP_Notify: use I2C bus masks 2018-07-11 14:20:15 +09:00
Andrew Tridgell ac3886e27e HAL_PX4: implement I2C bus masks 2018-07-11 14:20:13 +09:00
Andrew Tridgell 15ff760601 HAL_Linux: implement I2C bus masks 2018-07-11 14:20:11 +09:00
Andrew Tridgell 98f241c7e4 HAL_ChibiOS: implement I2C bus masks 2018-07-11 14:20:08 +09:00
Andrew Tridgell 44685bbb7b AP_HAL: added I2C bus mask functions and macros 2018-07-11 14:20:05 +09:00
Andrew Tridgell 05c0885d04 AP_SerialManager: fixed find_baudrate to return mapped baudrate 2018-07-11 14:14:14 +09:00
Peter Barker 969827d8f5 AP_SerialManager: remove set_console_baud, factor out find_protocol_instance 2018-07-11 14:14:04 +09:00
Andrew Tridgell f02e944857 HAL_PX4: fixed link on aerofc-v1
it does not have bl_update
2018-07-11 14:11:21 +09:00
liang.tang 1a12b958fc AC_WPNav: check validity of kP 2018-07-11 14:07:43 +09:00
Randy Mackay 734e61e80d 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-11 14:02:55 +09:00
Andrew Tridgell 5b056ff8d5 HAL_ChibiOS: fixed omnibusf4pro I2C
many thanks to Kelly-Foster and @sh83
2018-07-11 14:02:43 +09:00
Andrew Tridgell 61b8cbc3c6 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-11 14:02:15 +09:00
Andrew Tridgell a75447c8bd HAL_ChibiOS: changed which I2C bus is internal on fmuv5
match PH4 arrangement
2018-07-11 14:00:28 +09:00
Andrew Tridgell ac49b3aad4 HAL_ChibiOS: support for PH4-mini board 2018-07-11 14:00:18 +09:00
Andrew Tridgell 29dc4b6e8b HAL_ChibiOS: ensure system_id is nul terminated 2018-07-11 14:00:00 +09:00
Andrew Tridgell 4e4a83a2fb HAL_ChibiOS: make serial number match HAL_PX4 2018-07-11 13:57:59 +09:00
Andrew Tridgell c5e659c9dd HAL_ChibiOS: fixed default revo compass orientation 2018-07-11 13:57:53 +09:00
Andrew Tridgell 7bcb01d28f GCS_MAVLink: expose HUD throttle accessor 2018-07-05 11:39:46 +10:00
Andrew Tridgell 2738ae63a3 HAL_ChibiOS: rename to CubeYellow 2018-07-05 10:40:57 +10:00
Andrew Tridgell 7296767408 HAL_ChibiOS: make CubeOrange IDs consistent with CubeBlack 2018-07-05 10:40:55 +10:00
Andrew Tridgell 2418a05459 HAL_ChibiOS: rename cube-orange to CubeOrange 2018-07-05 10:40:53 +10:00
proficnc 0a03597872 HAL_ChibiOS: Added CubeBlack hwdef 2018-07-05 10:40:51 +10:00
Andrew Tridgell 88987608ae AP_OSD: display --- when no airspeed available 2018-07-05 10:39:48 +10:00
Andrew Tridgell f44fe31c23 AP_OSD: added check for get_telem_data() 2018-07-05 10:39:46 +10:00
Andrew Tridgell 5a0354dfee AP_OSD: make packed decimal the default
and fix SITL char spacing
2018-07-05 10:39:44 +10:00
Alexander Malishev 7320b15be4 AP_OSD: fixed packed dot 2018-07-05 10:39:41 +10:00
Andrew Tridgell eb238a3c80 AP_OSD: added blink for SITL backend 2018-07-05 10:39:39 +10:00
Andrew Tridgell ccdd5d2bbf AP_OSD: use a thread for SITL OSD
this allows for window scaling and should fix ubuntu 18 warning
2018-07-05 10:39:37 +10:00
Andrew Tridgell 76bf630efd AP_OSD: fixed sign of altitude 2018-07-05 10:39:35 +10:00
Andrew Tridgell 141b9703a9 AP_OSD: added option to pack decimal numbers 2018-07-05 10:39:32 +10:00
Andrew Tridgell d8b643a888 AP_OSD: fixed sign on GPS coords 2018-07-05 10:39:29 +10:00
Kelly-Foster 2f77c4cddb AP_OSD: widgets for BLHeli32 ESC amps, temp, rpm, and GPS lat/long 2018-07-05 10:39:27 +10:00
Andrew Tridgell f008015b24 AP_OSD: fixed vector orientation 2018-07-05 10:39:25 +10:00
Alexander Malishev 4485efe989 AP_OSD: fixed up/down arrows 2018-07-05 10:39:23 +10:00
Alexander Malishev b370131505 AP_OSD: fixed vertical speed item 2018-07-05 10:39:20 +10:00
Alexander Malishev 57e26c0e6b AP_OSD: fixed speed vector calculation 2018-07-05 10:39:18 +10:00
Alexander Malishev 9dcd9298a7 AP_OSD: fixed review issues 2018-07-05 10:39:16 +10:00
Alexander Malishev 734e5647f5 AP_OSD: reduce width of the vspeed item 2018-07-05 10:39:13 +10:00
Alexander Malishev 80d85ceebc AP_OSD: fixed type in the script 2018-07-05 10:39:10 +10:00
Alexander Malishev 5e66b57e0c AP_OSD: added airspeed and climbrate 2018-07-05 10:39:08 +10:00
Alexander Malishev 1514a96bcb AP_OSD: add wind speed/direction item 2018-07-05 10:39:06 +10:00
Alexander Malishev 90d6922de5 AP_OSD: show direction of the groundspeed vector 2018-07-05 10:39:04 +10:00
Alexander Malishev 9f559d2f82 AP_OSD: add compass item 2018-07-05 10:39:02 +10:00
vierfuffzig f6bfb76691 AP_OSD: implement throttle and heading 2018-07-05 10:39:00 +10:00
Alexander Malishev 70829e67ce AP_OSD: fixed horizon roll/pitch signs 2018-07-05 10:38:57 +10:00
Alexander Malishev b9d36f1a77 AP_OSD: fix home direction 2018-07-05 10:38:55 +10:00
Alexander Malishev 08ff48bd74 AP_OSD: give credits to the original authors 2018-07-05 10:38:52 +10:00
Andrew Tridgell 7f17c2f41b AP_BattMonitor: fixed ESC telem scaling 2018-07-05 10:37:51 +10:00
Peter Barker fc378eeae1 DataFlash: move log-transfer state variables into enumerated variable 2018-07-02 10:46:52 +10:00
Peter Barker 4c2925d693 AP_Compass: remove pointless initialisations
If you are allocating one of these on the stack you're doing something
wrong.
2018-07-02 10:44:34 +10:00
Andrew Tridgell 0af83f9364 AP_OSD: use correct SFML header file 2018-07-02 10:43:48 +10:00
Andrew Tridgell d3bc281a10 HAL_ChibiOS: use generic ROMFS embedding system 2018-07-02 10:43:48 +10:00
Andrew Tridgell 8ba137bd9a waf: moved ROMFS embed script into waf folder 2018-07-02 10:43:48 +10:00
Peter Barker 20d22f3629 AP_Math: quaternion requires isnan, so include math.h to get it 2018-07-02 09:31:11 +10:00
Peter Barker 493f958eb2 DataFlash: remove unused ReadBlock method 2018-07-02 09:00:51 +10:00
Andrew Tridgell 35192a6162 AP_OSD: added SITL OSD backend 2018-07-01 21:21:28 +10:00
Alexander Malishev 0169a9287d AP_OSD: fixed issues with horizont and home
Fixed roll direction.
Fixed home direction at small distances
2018-07-01 20:26:53 +10:00
Alexander Malishev daf13cb9f4 AP_OSD: add home item 2018-07-01 20:26:53 +10:00
Alexander Malishev d2e2a5b2ea AP_OSD: fixes in screen swithing methods
Do not switch to the next screen just after initialization.
Reduced auto switch interval to 1s.
Allow switch sreen in autoswitch mode just after transition.
2018-07-01 20:26:53 +10:00
Alexander Malishev c0db1a3625 AP_OSD: fix warnings 2018-07-01 20:26:53 +10:00
Alexander Malishev 9b687e0e50 AP_OSD: use autoscroll in text messages, add artificial horizon 2018-07-01 20:26:53 +10:00
Alexander Malishev 1949166dde AP_OSD: add two new methods to switch osd screen 2018-07-01 20:26:53 +10:00
Alexander Malishev d0571f55ed AP_OSD: use autoincrement mode to reduce spi traffic 2018-07-01 20:26:53 +10:00
Peter Barker be19ae41d4 AP_HAL_SITL: increase debug for SIM connections 2018-06-30 10:11:10 +10:00
Peter Barker c5d13847b2 AP_HAL_SITL: set cloexec on sitl-gps file descriptors 2018-06-29 21:53:14 +10:00
Peter Barker 6d6366df48 SITL: Sim_Vicon: set CLOEXEC on vicon file decsriptor 2018-06-29 21:53:14 +10:00
Andrew Tridgell e5435e02ad HAL_ChibiOS: report system ID in mavlink and logs 2018-06-29 20:27:36 +10:00
Andrew Tridgell eb2c9dfe74 AP_HAL: define CHIBIOS_SHORT_BOARD_NAME if not defined 2018-06-29 20:27:36 +10:00
Peter Barker e577a5564f AP_HAL_SITL: correct segfault when uartg configured 2018-06-29 18:47:30 +10:00
Peter Barker ed724bc2be AP_HAL_SITL: strip -w parameter on SITL reboot 2018-06-29 10:54:27 +10:00
Andrew Tridgell b4d527a9f8 HAL_PX4: support flashing bootloader with MAVLink command 2018-06-29 09:00:40 +10:00
Michael du Breuil 4299eb9ba8 AP_Terrain: Reduce memory consumption, simplify enable checking 2018-06-29 09:00:01 +10:00
Andrew Tridgell ca3beb88b7 HAL_ChibiOS: allow for telem1 and telem2 for bootloader on fmuv3 2018-06-29 08:17:38 +10:00
Andrew Tridgell 6cf205bdbe HAL_ChibiOS: make sure we populate up to uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell dd059b89f3 HAL_ChibiOS: added uartG for fmuv4 and fmuv5 2018-06-29 08:17:38 +10:00
Andrew Tridgell 759121f0d0 AP_SerialManager: support uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell 9e7d93ff48 HAL_VRBrain: support uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell 5862138a4b HAL_SITL: support uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell 3fe04e941f HAL_PX4: support uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell 9ae6734469 HAL_Linux: support uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell e120f8be24 HAL_F4Light: support uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell 4ff57bd512 HAL_Empty: support uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell 0a5d287326 HAL_ChibiOS: support uartG 2018-06-29 08:17:38 +10:00
Andrew Tridgell d1fcf2bab6 AP_HAL: added uartG
one more uart ...
2018-06-29 08:17:38 +10:00
Lucas De Marchi 1a45aa12f5 AP_Param: warn on last pass only about unknown parameters
Do not warn about unknown parameters on the first pass, i.e. when
AP_Param:load_all() is called. This is because we may still not know
about dynamically loaded parameters. When we call the second (last)
time, we expect to already know all possible parameters, so print a
warning to both console and the debug terminal.
2018-06-28 10:18:19 -07:00
Lucas De Marchi 7f0d5ddf21 AP_Param: stop panic()'ing on unknown parameters
Our track record on keeping parameters up to date with master is not
great and panic()'ing when loading them apparently is not helping
because every and each vehicle has a different file.

On aerofc load_defaults_file() is used in the same way as
load_embedded_param_defaults() is in which the panic() behavior has been
previously removed.

This finishes the removal of the panic param and add warnings to the
debug console when reading the parameters (rather than when counting
them).
2018-06-28 10:18:19 -07:00
Ebin 97a260a980 APM_Control: get_throttle_out_from_pitch() accepts dt as argument 2018-06-28 21:55:20 +09:00
Ebin 10914d88b7 SITL: all unchanged variables declared const in BalanceBot::update() 2018-06-28 21:55:20 +09:00
Ebin 657ff06380 APM_Control: added balancing function for BalanceBot 2018-06-28 21:55:20 +09:00
Ebin a40de48809 AP_HAL_SITL: added BalanceBot to SITL_cmdline 2018-06-28 21:55:20 +09:00
Ebin 3a171c56b5 SITL: Added BalanceBot 2018-06-28 21:55:20 +09:00
Peter Barker 5d1d435451 AP_Arming: add type-correctness for is-armed check
Also, correct the constant we're testing against
2018-06-28 12:48:31 +10:00
Peter Barker 72d7181e0d AP_Arming: remove pointless initialisations
These are part of a static object
2018-06-28 12:48:31 +10:00
Peter Barker e3dc408295 AP_Arming: move copter-specific code into Copter subclass 2018-06-28 12:48:31 +10:00
Andrew Tridgell 963675689c HAL_ChibiOS: fixed substitution of %BOARD%-BL 2018-06-28 11:35:13 +10:00
Andrew Tridgell 54dc67e2a9 HAL_ChibiOS: default bootloader product string to XX-BL 2018-06-28 11:35:13 +10:00
Andrew Tridgell 946d0208e5 HAL_ChibiOS: fixed stm32f7 cache bug in erase flash page 2018-06-28 11:35:13 +10:00
Andrew Tridgell d183efa720 HAL_ChibiOS: fixed USB string of fmuv5 bootloader 2018-06-28 11:35:13 +10:00
Andrew Tridgell 2b7b499c63 HAL_ChibiOS: added support for RTC sig for fast boot 2018-06-28 11:35:13 +10:00
Andrew Tridgell a3e44b3249 GCS_MAVLink: fix from review comment
thanks Pierre
2018-06-28 11:35:13 +10:00
Andrew Tridgell f7f9d2b0e7 HAL_ChibiOS: added fmuv4 bootloader hwdef-bl.dat 2018-06-28 11:35:13 +10:00
Andrew Tridgell 3a5b3b4b1b HAL_ChibiOS: fixed adding bootloader to ROMFS 2018-06-28 11:35:13 +10:00
Peter Barker e332bece0f AP_HAL_ChibiOS: embed any bootloader found for a board 2018-06-28 11:35:13 +10:00
Peter Barker 4a8614fbbd GCS_MAVLink: handle MAV_CMD_FLASH_BOOTLOADER 2018-06-28 11:35:13 +10:00
Peter Barker a81b3c8a7c AP_HAL_ChibiOS: specify bootloader for sparky2 2018-06-28 11:35:13 +10:00
Peter Barker f07b6f3d78 AP_HAL_ChibiOS: add support for flashing bootloader 2018-06-28 11:35:13 +10:00
Peter Barker b9b0ef0c77 AP_HAL: add flash_bootloader to AP_HAL API 2018-06-28 11:35:13 +10:00
ChristopherOlson 1709c258bf AP_Motors:TradHeli - fix metadata for H_COL_CTRL_DIR 2018-06-28 09:02:48 +09:00
Pierre Kancir 0ee6e41f6e AP_IRLock: Replace find_object with SITL singleton 2018-06-27 14:59:33 -07:00
Patrick José Pereira b66b4775bc SITL: Replace find_object with SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-27 14:59:33 -07:00
Patrick José Pereira 32fa7e2c2a AP_RangeFilter: Fix equality comparison with extraneous parentheses
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-27 14:59:33 -07:00
Michael du Breuil 2577e5ff25 AP_HAL: Don't always define GPIO pins, they may be connected to real
hardware
2018-06-27 15:25:44 +10:00
Michael du Breuil 72439a053b AP_Notify: Handle LED pins being undefined, select appropriate drivers 2018-06-27 15:25:44 +10:00
Michael du Breuil c5669a614e AP_Notify: Remove unneeded init guards 2018-06-27 15:25:44 +10:00
Michael du Breuil 565a84efcb AP_Notify: Remove unreachable ChibiOS defines, enable BoardLed 2018-06-27 15:25:44 +10:00
Michael du Breuil abda44e886 AP_Notify: Move driver deletion to backend creation macro
Creates a dense array of drivers we want to update, reduces runtime
overhead, allows us to try detecting more backends then are present
2018-06-27 15:25:44 +10:00
Michael du Breuil 8e8e9a5a58 AP_Notify: Delete drivers that are not present 2018-06-27 15:25:44 +10:00
Michael du Breuil d0cd37fabb AP_Notify: Reduce flash consumption, remove unneeded middleware classes 2018-06-27 15:25:44 +10:00
Andrew Tridgell 10533fb249 HAL_ChibiOS: enable OSD font on OMNIBUSF7V2 2018-06-27 14:55:00 +10:00
Andrew Tridgell ea3467348e AP_OSD: fixed typo 2018-06-27 14:55:00 +10:00
Andrew Tridgell a86c4d27e1 AP_OSD: fixed CI build error 2018-06-27 14:55:00 +10:00
vierfuffzig aeaf695d83 AP_OSD: add ground speed item 2018-06-27 14:55:00 +10:00
Alexander Malishev fcd351b5c0 AP_OSD: fixed gps stat and messages items, reformat 2018-06-27 14:55:00 +10:00
Alexander Malishev af96673004 AP_OSD: added screen switch by rc channel 2018-06-27 14:55:00 +10:00
Alexander Malishev e487f37fd7 HAL_ChibiOS: added font check on startup
Based on Andrew Tridgell suggestion
2018-06-27 14:55:00 +10:00
Alexander Malishev 79b289f97e HAL_ChibiOS: reverted change in omnibus hwdef.dat 2018-06-27 14:55:00 +10:00
Andrew Tridgell 43d0a61da0 AP_OSD: fixed build 2018-06-27 14:55:00 +10:00
Andrew Tridgell 76fd0962e7 AP_OSD: fixes from review comments 2018-06-27 14:55:00 +10:00
Andrew Tridgell 06fdc50169 AP_OSD: switched to 2-d arrays
makes it a bit easier to read
2018-06-27 14:55:00 +10:00
Andrew Tridgell 2fb63828bb AP_OSD: use fixed array sizes
the allocation didn't win anything as the backend is already allocated
2018-06-27 14:55:00 +10:00
Andrew Tridgell 2c29d1c297 AP_OSD: tidy ups 2018-06-27 14:55:00 +10:00
Andrew Tridgell 5dc3515c83 AP_OSD: fixed X range 2018-06-27 14:55:00 +10:00
Andrew Tridgell 8f8107d13f AP_OSD: moved to new parameter system 2018-06-27 14:55:00 +10:00
Andrew Tridgell 8e8508a9f3 HAL_ChibiOS: enable OSD for MatekF405 2018-06-27 14:55:00 +10:00
Andrew Tridgell cf19e7a3ae HAL_ChibiOS: enabled OSD on KakuteF4 2018-06-27 14:55:00 +10:00
Alexander Malishev c1d82a43c5 AP_OSD: initial version 2018-06-27 14:55:00 +10:00
Alexander Malishev 568e5a24b4 AP_Notify: initial OSD support 2018-06-27 14:55:00 +10:00
Alexander Malishev 8ce7ef1342 HAL_ChibiOS: added OSD support for MatekF405 and Omnibuspro 2018-06-27 14:55:00 +10:00
Andrew Tridgell 35f835a021 HAL_ChibiOS: improved OMNIBUSF7V2 support 2018-06-27 13:01:30 +10:00
Andrew Tridgell 7cce23671a HAL_CbibiOS: removed unnecessary BOARD_SUBTYPE define
just causes build warnings
2018-06-27 11:37:45 +10:00
Andrew Tridgell 5bf078cc86 HAL_ChibiOS: fixed build with -Werror-sign-compare 2018-06-27 11:37:45 +10:00
Alexander Malishev 14db344c12 AP_RCProtocol: improve s-bus parsing
This relax s-bus timing requirement to allow not so perfect signals.
Fixes s-bus on s-bus pin in matekf405-wing
Also fixed comment a bit
2018-06-27 09:10:11 +10:00
Lucas De Marchi 49d08ba72a Global: remove minlure
Minlure is a port of ArduPilot to Minnow Board connected to daughter
board. Very few of those were produced and nobody is flying with it.

It served its purpose and all the the improvements to ArduPilot remain
regardless of it not being supported anymore. Now it's just adding
maintenance work with no clear benefit, so pull the plug.
2018-06-26 07:32:08 -07:00
Lucas De Marchi d31e85e738 AP_HAL_Linux: fix copy and paste error on gpio table 2018-06-26 07:32:08 -07:00
Peter Barker 9eb53e333b AP_Compass: tidy consistency calculations
AP_Compass: normalize vectors in-place to save a few bytes (thanks MdB)
2018-06-26 18:37:55 +10:00
Michael du Breuil a92c4aa9fd AP_HAL: Update comment on UARTDriver::begin to reflect automatic
clearing
2018-06-26 02:18:18 +01:00
Michael du Breuil 3af6b78d67 AP_HAL_VRBrain: Clear UART buffers when opening a port 2018-06-26 02:18:18 +01:00
Michael du Breuil 8680f1ab52 AP_HAL_SITL: Clear UART buffers when opening a port 2018-06-26 02:18:18 +01:00
Michael du Breuil 512939a839 AP_HAL_PX4: Clear UART buffers when opening a port 2018-06-26 02:18:18 +01:00
Michael du Breuil 7043738f3b AP_HAL_Linux: Clear UART buffers when opening a port 2018-06-26 02:18:18 +01:00
Michael du Breuil 153ee6ca8e AP_HAL_ChibiOS: Clear UART buffers when opening a port 2018-06-26 02:18:18 +01:00
Michael du Breuil 037e53ba8a AP_HAL_ChibiOS: Reduce flash space of UARTDriver
Saves 32 bytes
2018-06-26 02:18:18 +01:00
Peter Barker e7e0ee0b50 AP_Proximity: add methods covering sensor health, enable and present 2018-06-26 10:25:28 +10:00
Pierre Kancir bffe3f6c21 AC_WPNav: add getter for crosstrack_error 2018-06-26 08:42:14 +09:00
Michael du Breuil d977ca091a AP_Arming: Correct an edge case that would not run compass checks 2018-06-26 09:26:29 +10:00
Patrick José Pereira cd5c59773b AP_HAL_SITL: Use SITL, baro, INS and compass singletons
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira a4d8ed4b75 AP_HAL_SITL: Use reinterpret_cast with AP_Param::find_object
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira ae378f0fb3 SITL: Use reinterpret_cast with AP_Param::find_object
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira f68b07df1f SITL: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira 00cb588257 AP_RPM: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira 50613c3800 AP_Proximity: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira 653784479e AP_OpticalFlow: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira 0c06bf89e5 AP_InertialSensor: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira e456655932 AP_Compass: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira 37fbd6aaa1 AP_Beacon: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira 4ae6bd2c7e AP_Baro: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Patrick José Pereira 819f08b7f7 AP_AHRS: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Andrew Tridgell a0b4553a26 HAL_ChibiOS: fixed bootloader build issue 2018-06-25 21:22:31 +10:00
Andrew Tridgell bf6fb72904 HAL_ChibiOS: fixed 32 bit flash writes 2018-06-25 21:22:31 +10:00
Andrew Tridgell f71d2a7417 HAL_ChibiOS: support bootloaders with no uarts 2018-06-25 21:22:31 +10:00
Andrew Tridgell 277836ccc7 HAL_ChibiOS: added bootloader definition for fmuv3
including UART support on 2 UARTs
2018-06-25 21:22:31 +10:00
Andrew Tridgell e40457d98f HAL_ChibiOS: avoid malloc in usbcfg
this avoids the need for malloc in the bootloader
2018-06-25 21:22:31 +10:00
Andrew Tridgell 369ac5edd0 HAL_ChibiOS: save more space in the bootloader 2018-06-25 21:22:31 +10:00
Andrew Tridgell e870b5f00a HAL_ChibiOS: use 32 bit flash operations when possible 2018-06-25 21:22:31 +10:00
Andrew Tridgell feefa05b41 HAL_ChibiOS: expose stm32_flash_ispageerased() 2018-06-25 21:22:31 +10:00
Andrew Tridgell dd1bd43a2e HAL_ChibiOS: added stm32_flash_keep_unlocked() 2018-06-25 21:22:31 +10:00
Alexander Malishev 95f3eb5ab6 HAL_ChibiOS: stop logging before reboot 2018-06-25 17:46:20 +10:00
Alexander Malishev cfa18b8e70 HAL_ChibiOS: reduce dataflash buffer size on targets with 128KB ram 2018-06-25 17:43:26 +10:00
Alexander Malishev 932cc4bb69 DataFlash: allow HAL to specify dataflash buffer sizes 2018-06-25 17:43:20 +10:00
Alexander Remizov dc15cbd513 AP_GPS: fixed ublox configuration 2018-06-24 15:25:00 -07:00
Andrew Tridgell dc0f2f9319 HAL_ChibiOS: use USB for stdout on more boards
don't waste a UART
2018-06-24 08:26:28 +10:00
Andrew Tridgell 2cfdc98453 HAL_ChibiOS: fixed omnibusf4pro bootloader LED pins 2018-06-24 08:26:28 +10:00
Andrew Tridgell b149089830 HAL_ChibiOS: fixed board IDs and added more bootloaders 2018-06-24 08:26:28 +10:00
Andrew Tridgell 2f8a534243 HAL_ChibiOS: expand param storage on F4 boards with flash storage
this allows for a lot more param space on these boards
2018-06-24 08:26:28 +10:00
Andrew Tridgell b983caa97e StorageManager: allow for 15k storage
this is for F4 boards using flash storage. They were using 8k, but can
actually fit 16k. This is optimised for lots of param space as we
expect to have a lot of customised params for OSD support
2018-06-24 08:26:28 +10:00
Andrew Tridgell e868a4fe8b HAL_ChibiOS: set FLASH_RESERVE_START_KB in the environment
used to correctly setup an intel hex file
2018-06-23 17:06:38 +10:00
Andrew Tridgell 1c807e0078 HAL_ChibiOS: added option to limit size of bootloader
this will ensure our F4 bootloaders stay under 16k
2018-06-23 17:06:38 +10:00
Peter Barker cba61598b1 AP_Arming: a check_failed function 2018-06-23 15:33:19 +10:00
Peter Barker a44c1378f7 GCS_MAVLink: add send_textv functions 2018-06-23 15:33:19 +10:00
Andrew Tridgell 796291f176 AP_GPS: improved ccache build speed
making this header equal improves speed of fmuv2 build after fmuv3
build with ccache, without affecting binary
2018-06-22 11:13:03 +10:00
Andrew Tridgell e11b3f2f0e HAL_ChibiOS: run CAN thread at 3KHz
at 10KHz we were causing occasional CRC errors on the UART to IOMCU
2018-06-22 08:40:12 +10:00
Andrew Tridgell d88b710ea9 HAL_ChibiOS: added more bootloader hwdef-bl.dat files 2018-06-22 08:00:31 +10:00
Andrew Tridgell 518d41e0d4 HAL_ChibiOS: added OTP defines 2018-06-22 08:00:31 +10:00
Kelly-Foster ba9faafc98 AP_HAL: added MatekF405-wing subtype
Added define for HAL_BOARD_SUBTYPE_CHIBIOS_MATEKF405WING
2018-06-22 08:00:31 +10:00
Kelly-Foster ae84202bf2 HAL_ChibiOS: added MatekF405-Wing hwdef.dat 2018-06-22 08:00:31 +10:00
Andrew Tridgell 14f66461a7 HAL_ChibiOS: shrink build size for bootloader
thanks to @sh83 for the idea
2018-06-22 08:00:31 +10:00
Alexander Malishev 661259de4e HAL_ChibiOS: reduce .text aigment to save flash space 2018-06-22 08:00:31 +10:00
Andrew Tridgell 608490f5ae HAL_ChibiOS: fixed cube-orange bl build 2018-06-22 08:00:31 +10:00
Andrew Tridgell f9faa0765d HAL_ChibiOS: fixed bootloader IDs 2018-06-22 08:00:31 +10:00
Andrew Tridgell 3fc6824bfb HAL_ChibiOS: setup more bootloader config files 2018-06-22 08:00:31 +10:00
Andrew Tridgell 0cd46c063c HAL_ChibiOS: fixed flash driver for F7
we need a data sync barrier due to the F7 cache
2018-06-22 08:00:31 +10:00
Andrew Tridgell 82428dfbc6 HAL_ChibiOS: added f405-bl hwdef.dat 2018-06-22 08:00:31 +10:00
Andrew Tridgell 3ef88e1b8f HAL_ChibiOS: allow flash support for bootloader 2018-06-22 08:00:31 +10:00
Andrew Tridgell 5216870492 HAL_ChibiOS: avoid strstr in usbcfg
saves nearly 2k of flash
2018-06-22 08:00:31 +10:00
Andrew Tridgell c12d14d7a4 HAL_ChibiOS: check for ChibiOS features 2018-06-22 08:00:31 +10:00
Andrew Tridgell 03f67d82c9 HAL_ChibiOS: allow more ChibiOS functionality to be disabled
used by bootloader builds for minimal flash size
2018-06-22 08:00:31 +10:00
Andrew Tridgell e3a23921a2 HAL_ChibiOS: fixed FLASH_LOAD_ADDRESS
needs 0x08000000 base
2018-06-22 08:00:31 +10:00
Patrick José Pereira 87c09f98cc AP_Camera: Change from labs to abs for floats
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-21 17:24:14 +01:00
Peter Barker 997a527c1b AP_Arming: cache results of get_gyro_count and get_accel_count 2018-06-21 16:25:29 +01:00
Peter Barker 4055256878 AP_Arming: cache AP_HAL_millis 2018-06-21 16:25:29 +01:00
Peter Barker 410e72f83c AP_Arming: break out a gyros-consistent method 2018-06-21 16:25:29 +01:00
Peter Barker d2b8ea4bb0 AP_Arming: break out an accels-consistent method 2018-06-21 16:25:29 +01:00
Hyungsub ceab853c86 Possible NULL pointer dereference in libraries/AP_HAL_F4Light/hardware/hal/timer.c 2018-06-21 21:57:46 +10:00
Andrew Tridgell 480017f190 AP_Notify: search for 4 buses in AP_Notify 2018-06-21 13:08:20 +10:00
Andrew Tridgell 1c054f0e4a HAL_ChibiOS: fixed clock line on fmuv5 I2C4
there was a typo in the datasheet
2018-06-21 13:08:20 +10:00
Andrew Tridgell f401dc1a77 GCS_MAVLink: fixed error in SITL for ESC_TELEMETRY 2018-06-21 10:48:02 +10:00
Andrew Tridgell a8f99882ba HAL_ChibiOS: allow FrSky_INV to be controlled as GPIO
this allows control via relay settings
2018-06-21 07:40:50 +10:00
Francisco Ferreira 5de516dd6a
AP_HAL_SITL: remove underscore prefix for local variables 2018-06-20 16:38:52 +01:00
Francisco Ferreira 06c41bc768
AP_HAL_SITL: re-use unused FDM address option for FG view IP address 2018-06-20 16:38:52 +01:00
Francisco Ferreira 46868409ec
AP_HAL_SITL: remove unused code 2018-06-20 16:38:52 +01:00
Peter Barker 27cd972331 GCS_MAVLink: add magic number definitions 2018-06-20 11:43:38 +10:00
Peter Barker d8128ba69a AP_Arming: option to force arm, bypassing checks 2018-06-20 11:43:38 +10:00
Hyungsub 6e2076a3f1 AP_HAL: Remove resource leak in srxl.cpp
I correct this issues and then open a pull request.
2018-06-20 11:33:12 +10:00
Alexander Malishev eb1ae22bb1 DataFlash: fixed inconsistent state after interrupted log download 2018-06-20 09:03:27 +10:00
Andrew Tridgell e455958c87 SITL: fixed build with new vicon_position_estimate message extension 2018-06-19 09:36:03 +10:00
Andrew Tridgell 5495e98483 GCS_MAVLink: build fixes
needed for new mavlink2 extensions in battery monitor message
2018-06-19 09:36:03 +10:00
Andrew Tridgell 9638f6cab9 AP_BattMonitor: changes from PR review 2018-06-19 09:36:03 +10:00
Andrew Tridgell 05a8a5c173 AP_BLHeli: changes from PR review 2018-06-19 09:36:03 +10:00
Andrew Tridgell 4e4e5a2feb GCS_MAVLink: send ESC telemetry messages 2018-06-19 09:36:03 +10:00
Andrew Tridgell dc9ae42067 AP_BattMonitor: added ESC telemetry virtual battery
this aggregates all BLHeli ESCs into a single virtual battery
2018-06-19 09:36:03 +10:00
Andrew Tridgell 34bbd29f25 AP_BLHeli: send ESC telem packets over MAVLink 2018-06-19 09:36:03 +10:00
Peter Barker f2a842e415 AP_HAL_SITL: set_cloexec on SITL's RCIN port 2018-06-19 09:14:28 +10:00
Peter Barker 584c5d5806 AP_HAL: Socket: add set_cloexec 2018-06-19 09:14:28 +10:00
Peter Barker 574a2b3652 AP_HAL_SITL: set cloexec on port 5760 2018-06-19 09:14:28 +10:00
Andrew Tridgell e3b68876a9 HAL_ChibiOS: fixed tx_len on tx DMA timeout 2018-06-19 09:08:45 +10:00
Andrew Tridgell 8431a677d9 HAL_ChibiOS: added a timeout to DMA UART TX
this prevents a shared DMA channel being held for a long time if a CTS
pin is held either by not being connected or by a radio
2018-06-19 09:08:45 +10:00
Peter Barker cad7f9d9c0 GCS_MAVLink: tidy waypoint receiving part of update
This is NFC.  The early-return here is confusing, and there were
redundant checks going on.
2018-06-18 19:54:21 +01:00
Peter Barker 4168bd709c AP_Frsky_Telem: use AP_FWVersion singleton 2018-06-18 19:10:37 +01:00
Peter Barker ceaadc4cce AP_SmartRTL: use AP_FWVersion singleton 2018-06-18 19:10:37 +01:00
Peter Barker 7d52746267 AP_Scheduler: use AP_FWVersion singleton 2018-06-18 19:10:37 +01:00
Peter Barker c333a905df GCS_MAVLink: use AP_FWVersion singleton 2018-06-18 19:10:37 +01:00
Peter Barker 611dcb694b DataFlash: write CHIBIOS_GIT_VERSION to opened log file
DataFlash: use AP_FWVersion singleton
2018-06-18 19:10:37 +01:00
Peter Barker 6ba1678c5e AP_Common: AP_FWVersion: create singleton 2018-06-18 19:10:37 +01:00
Peter Barker beb2147191 DataFlash: use #define instead of constant 90 for data length 2018-06-18 13:50:18 +01:00
Michael du Breuil fba185cefb DataFlash: Fix GPS units 2018-06-18 13:34:16 +01:00
Hyungsub 97b93920b3 AP_HAL_Linux: fix memory leaks
Fixes #8642
2018-06-18 10:30:56 +01:00
Hyungsub 8ae2729022 AP_HAL_ChibiOS: fix memory leaks
Fixes #8644
2018-06-18 10:30:56 +01:00
Andrew Tridgell 1c4bf3d804 HAL_ChibiOS: fixed build warning 2018-06-15 11:26:40 +10:00
Lucas De Marchi 46213eb97e chibios_hwdef: fix wrong uart index
calling uart_list.index() will find the first element with that name,
which is not really what we want when we have multiple EMPTY uarts.
2018-06-15 08:21:40 +10:00
Andrew Tridgell 00d919018b HAL_ChibiOS: added RTC clock implementation 2018-06-15 08:01:22 +10:00
Andrew Tridgell 1283b92cb7 DataFlash: fix for new AP_RTC API 2018-06-15 08:01:22 +10:00
Peter Barker 312ac7dc73 AP_RTC: return 0 from get_utc_usec if rtc not set 2018-06-15 08:01:22 +10:00
Peter Barker f83e65e04e AP_RTC: add parameter for source types we will set the system time from 2018-06-15 08:01:22 +10:00
Peter Barker 22a94addd5 AP_BoardConfig: add parameters for AP_RTC 2018-06-15 08:01:22 +10:00
Peter Barker f5eb281efd AP_HAL: use AP_RTC
Also add a define as to whether set_time / get_time can be used
2018-06-15 08:01:22 +10:00
Peter Barker 00153f513c AP_HAL_SITL: use OS clock for get_hw_rtc 2018-06-15 08:01:22 +10:00
Peter Barker 973fe57827 AP_Stats: use AP_RTC 2018-06-15 08:01:22 +10:00
Peter Barker 5b41db5120 AP_GPS: use AP_RTC
set the system time from a GPS if we have a 3D fix or better
2018-06-15 08:01:22 +10:00
Peter Barker 721feaf40f GCS_MAVLink: use AP_RTC
GCS_MAVLINK: Add SYSTEM_TIME handle (Patrick José Pereira)
2018-06-15 08:01:22 +10:00
Peter Barker f6eb7e2ba5 AP_HAL_F4Light: remove un-needed methods 2018-06-15 08:01:22 +10:00
Peter Barker 89d532b557 AP_HAL_VRBRAIN: use common methods for setting time 2018-06-15 08:01:22 +10:00
Peter Barker 3bdbe3b63c AP_HAL_PX4: use common methods for setting time 2018-06-15 08:01:22 +10:00
Peter Barker c9dbdd7a5c AP_HAL_Linux: clarify method name, use common methods for setting time 2018-06-15 08:01:22 +10:00
Peter Barker 59d1d8aecc AP_BoardConfig: instantiate an RTC
AP_BoardConfig: set RTC from hw clock at startup
2018-06-15 08:01:22 +10:00
Peter Barker ece7ff874c AP_RTC: a library to handle epoch-time 2018-06-15 08:01:22 +10:00
Peter Barker 6af0dcfed0 AP_Math: create a constrain_int64
The template system doesn't work across 32/64 bit builds (SITL
vs fmuv4), probably because int is typedef'd to int64
2018-06-15 08:01:22 +10:00
Peter Barker 01e0c03a12 AP_Scheduler: add singleton 2018-06-15 08:01:22 +10:00
Michael du Breuil 676f60333a DataFlash: Fix power units 2018-06-14 17:50:27 +10:00
Andrew Tridgell 5d20699975 HAL_F4Light: removed ST licensed files from HAL_F4Light 2018-06-14 16:55:21 +10:00
Andrew Tridgell c0bfc77701 HAL_F4Light: removed submodules 2018-06-14 16:55:21 +10:00
Andrew Tridgell 777b4c8cfe DataFlash: avoid stat of current log file
this avoids getting invalid data base for stat() for the current log
file.

It also only gives up writing to a log file if writes fail for 2
seconds. This avoids a temporary write failure causing the log to be
closed (that can happen on ChibiOS with directory listing while writing)
2018-06-14 14:55:41 +10:00
Andrew Tridgell 8a2f1fdb3d AP_Airspeed: fixed airspeed filtering issue
this fixes an issue where an airspeed sensor that becomes unhealthy
can have an undue effect after the sensor becomes healthy again.

In a recent flight log the MS4525 airspeed sensor went unhealthy for a
few seconds, and at the same time gave a reading of 12m/s. The plane
was flying at 24m/s. While the sensor was unhealthy the code correctly
switched to the airspeed estimate, which was fine.

When the airspeed sensor become healthy again the IIR filter in
AP_Airspeed meant that the speed read at 12m/s initially, then came up
to 24m/s over a couple of seconds. This caused the VTOL motors to come
on for a few seconds.
2018-06-14 09:13:30 +10:00
Andrew Tridgell 10ca1e78e8 HAL_ChibiOS: switched to Mode3 on SPI1
this is now working correctly
2018-06-13 20:05:26 +10:00
Andrew Tridgell 9d248456e4 HAL_ChibiOS: re-enable I2C4 DMA for F765
now we have fixed the error from the datasheet we can do DMA
2018-06-13 20:05:26 +10:00
Andrew Tridgell ad3eca4e6b HAL_ChibiOS: fixed I2C4 DMA streams
There is an error in the datasheet. See
https://community.st.com/thread/50484-documentation-error-on-dma-channels-for-i2c4-on-stm32f7
2018-06-13 20:05:26 +10:00
Andrew Tridgell 62e8fbb9d3 HAL_ChibiOS: fixed OMNIBUSF7V2 hwdef.dat 2018-06-13 20:05:26 +10:00
Andrew Tridgell e068106669 HAL_ChibiOS: support I2C devices on STM32F7 without DMA
this allows us to support I2C4 on fmuv5
2018-06-13 20:05:26 +10:00
chobits 0d2b70e607 GCS_MAVLink: fix ATT_POS_MOCAP timestamp handle 2018-06-13 09:43:42 +09:00
Randy Mackay 5e7b37f0b2 AR_AttitudeControl: remove constraint on steering output 2018-06-12 17:44:10 +09:00
Michael du Breuil 95eda5d9b7 RC_Channel: Remove unneeded interfaces 2018-06-11 16:29:36 -07:00
Andrew Tridgell b225868711 AP_Compass: detect conflict between AK09916 and ICM20948
this detects if we have both a AK09916 and an ICM20948 on the same i2c
bus. If that is found then the ICM20948 is disabled as it otherwise we
will have two devices on the same i2c address
2018-06-12 09:04:43 +10:00
Jacob Walser c4175be7aa AP_Camera: explicitly specify floats 2018-06-11 15:57:48 -04:00
Peter Barker b0aeec4b6a GCS_MAVLink: move handling of MAV_CMD_DO_GRIPPER up 2018-06-11 19:07:39 +01:00
Peter Barker 8a3df17a07 AP_Gripper: add singleton 2018-06-11 19:07:39 +01:00
Alexander Malishev 289b93c3d0 HAL_ChibiOS: added parse_timer to chibios_hwdef.dat 2018-06-11 18:32:17 +10:00
murata 4d5e258b19 AP_NavEKF3: Delete unused definitions 2018-06-11 09:11:44 +09:00
murata a9b2b9dddf AP_NavEKF2: Delete unused definitions 2018-06-11 09:11:44 +09:00