Commit Graph

21593 Commits

Author SHA1 Message Date
Randy Mackay b8458d9cb4 AP_Proximity: integrate oadb::queue_push argument swap 2020-05-11 09:50:53 +09:00
Randy Mackay f6bc33ea2f AP_Proximity: remove unnecessary const from database_push
also shorten current_vehicle_bearing argument to just current_heading
2020-05-11 09:50:50 +09:00
Randy Mackay b59908e4d3 AP_OADatabase: remove unnecessary const on arguments
also swap order of angle and distance arguments to be consistent with proximity library
2020-05-11 09:50:47 +09:00
Kelly Schrock 080e477b36 AP_BattMonitor: NeoDesign battery driver
Adds a driver for the NeoDesign BMS, with variable cell count.
2020-05-06 15:48:49 +09:00
Andrew Tridgell 160839f0e1 AP_Battery: fixed bug in SUI driver
fixed bug in total voltage
2020-05-06 15:48:11 +09:00
Andrew Tridgell 9c16e30178 AP_BattMonitor: added SUI SMBUS battery backend
originally by Kelly Schrock
2020-05-06 15:48:04 +09:00
Randy Mackay 6f77a75be5 AP_BattMonitor: set default I2C bus for Solo and Maxell drivers 2020-05-06 15:47:26 +09:00
Randy Mackay 0edc341231 AP_BattMonitor: Maxell cell voltages timeout after 5sec 2020-05-06 15:47:22 +09:00
Randy Mackay 51cab958b9 AP_Scripting: example to check battery cycle count 2020-05-06 15:47:17 +09:00
Randy Mackay f7a89ae055 AP_Scripting: add binding for BattMonitor's get_cycle_count method 2020-05-06 15:47:12 +09:00
murata 4192ec1700 AP_BattMonitor: Maxell battery on any I2C bus 2020-05-06 15:47:08 +09:00
Randy Mackay 30a0f22d13 AP_BattMonitor: add cycle count for smbus batteries 2020-05-06 15:47:05 +09:00
Andrew Tridgell ede5cabbf5 HAL_ChibiOS: save 3k of flash on MatekF405-Wing
disable SMBUS and fuel battery monitors
2020-05-06 15:46:13 +09:00
Andrew Tridgell 943e495f34 AP_BattMonitor: support selective enable of SMBUS and fuel battery monitors 2020-05-06 15:46:10 +09:00
Andrew Tridgell d40671b8d8 AP_Terrain: added script for creating terrain *.dat files
useful for pre-populating a microSD card
2020-05-06 15:35:00 +09:00
Andrew Tridgell 8efe7c1b71 AP_Terrain: fixed bug in disk offset calculation
this fixes a problem where two different locations could both be
mapped to the same disk block in the terrain/*.DAT files. That meant
that pre-filled terrain on the microSD card would sometimes require a
download in flight. It also means that a RTL with loss of GCS could
sometimes fly through a region with no terrain data available

Other changes in this patch:

 - allow for a 2cm discrepancy in the lat/lon of the grid
   corners. This is needed to allow for slightly different floating
   point rounding in tools that pre-generate terrain data to load on
   the microSD

 - added TERRAIN_OPTIONS parameter to allow the user to disable
   attempts to download new terrain data. This is mostly useful for
   testing to validate a terrain generator
2020-05-06 15:34:57 +09:00
Paul Riseborough 9cd7cf4c01 AP_NavEKF3: Don't use geomag data when user specifies declination 2020-05-06 15:31:02 +09:00
Paul Riseborough 117b2629a9 AP_NavEKF2: Don't use geomag data when user specifies declination 2020-05-06 15:30:59 +09:00
Paul Riseborough db90cf5fb0 AP_Compass: Add accessor function for COMPASS_AUTODEC 2020-05-06 15:30:56 +09:00
Randy Mackay e87e16cc0f AP_NavEKF3: getLLH fix when no GPS available 2020-05-06 15:29:11 +09:00
Randy Mackay a6b825324a AP_NavEKF2: getLLH fix when no GPS available 2020-05-06 15:29:08 +09:00
Andrew Tridgell 12c0d452e9 AP_RCProtocol: fixed buffer overflow in st24 parser
found using random data injection in SITL
2020-05-06 15:21:49 +09:00
murata 5b9fc1b146 AP_Baro: Fix timestamp wrapping 2020-05-06 15:15:56 +09:00
Andrew Tridgell 481852d608 AP_Compass: change RM3100 device ID
changed scale factor means users need to recalibrate
2020-05-06 15:12:11 +09:00
Andrew Tridgell 8787ca868a AP_Compass: fixed scaling of RM3100
scale factor was off by 200/256, resulting in COMPASS_SCALE of about
1.28

thanks to Arace for noticing
2020-05-06 15:12:08 +09:00
Andrew Tridgell 8be1755b12 AP_NavEKF3: make mag variance reporting consistent
logged scaled variance should match the value used in MAVLink
EKF_STATUS_REPORT
2020-05-06 15:07:56 +09:00
Andrew Tridgell 6e5f61935c AP_NavEKF2: make mag variance reporting consistent
logged scaled variance should match the value used in MAVLink
EKF_STATUS_REPORT
2020-05-06 15:07:53 +09:00
bugobliterator 531cf5f3fb AP_Scripting: remove unused user of realloc from lua 2020-05-06 15:00:54 +09:00
bugobliterator 9073f0ffb4 HAL_ChibiOS: deprecate realloc for ChibiOS build, so as to return error when used 2020-05-06 15:00:51 +09:00
bugobliterator cf0c6d3247 AP_HAL: ensure libc realloc is available for all platforms except ChibiOS 2020-05-06 15:00:47 +09:00
bugobliterator a9ea7ca3dc AP_HAL_ChibiOS: implement standard realloc method 2020-05-06 14:59:45 +09:00
bugobliterator 792fe2697a AP_HAL: implement standard realloc method 2020-05-06 14:59:42 +09:00
bugobliterator c093af9ea5 AP_Common: use standard realloc method from HAL 2020-05-06 14:59:39 +09:00
Andrew Tridgell 384571ddf2 GCS_MAVLink: send only old value for readonly param set
this prevents a condition where the GCS can display the wrong value if
the 2nd PARAM_VALUE is lost

Note that groundstations can tell the set failed due to readonly in
the following ways:

 1) look for the statustext: Param write denied (PARAMNAME)

 2) see that the value came back with the old value, with index of
   65535

 3) can repeat the send, looking for (1) and (2)

Michael has proposed we add a PARAM_VALUE mavlink2 flags
extension. That would be nice, but we should still make this change to
fix the issue with mavlink 1.0
2020-05-06 14:41:34 +09:00
Peter Hall 33af883275 AP_Motors: MotorsMulticopter fix floating boost output 2020-05-06 14:36:14 +09:00
Peter Barker 96c97589ae GCS_MAVLink: divide time allowed to send messages fairly 2020-05-06 14:34:21 +09:00
Randy Mackay d0ff724b46 AP_LandingGear: add OPTIONS param to auto deploy and retract 2020-05-06 14:32:44 +09:00
Bill Geyer 23fc62a2d4 AC_AttitudeControlHeli: update filter parameter desc mins 2020-05-06 14:31:06 +09:00
Randy Mackay ab8b482bcd AC_AttitudeControl: update param ranges 2020-05-06 14:31:02 +09:00
Randy Mackay 9fe8e01fe4 AP_Mount: ignore rc trim when calculating desired mount angles 2020-05-06 14:27:01 +09:00
Randy Mackay 52520d9c28 RC_Channel: formatting fixes 2020-05-06 14:26:58 +09:00
Randy Mackay 1ee5862f6d RC_Channel: add norm_input_ignore_trim
same as norm_input but ignores the trim value
2020-05-06 14:26:55 +09:00
bnsgeyer 7b1e34d219 AC_WPNAV:make speed changes during missions obey WPNAV_ACCEL
Includes commits by rmackay9
AC_WPNav: fixup max speed acceleration
AC_WPNav: simplify the initialisation of poscontrol's max speed
          Changed at Leonard's request to keep things simpler
2020-05-06 14:22:23 +09:00
Randy Mackay 5eb54ddfd2 AC_PosControl: allow smaller changes in max speed and accel
also small changes in max speed for z-axis
2020-05-06 14:22:21 +09:00
Andrew Tridgell fe8398fe0d HAL_ChibiOS: use default USB IDs for fmuv3 2020-05-06 14:20:50 +09:00
Andrew Tridgell aafed565f3 AP_NavEKF3: fixed use of antenna position when switching GPS primary
when GPS primary switches we were using a position which had not been
corrected for antenna offset. This was used for calculating the reset
for sensor change.

This fixes that (trivial fix) and also fixes a similar issue on
position reset
2020-05-06 14:17:26 +09:00
Andrew Tridgell 2cf3ad4a3d AP_NavEKF2: fixed use of antenna position when switching GPS primary
when GPS primary switches we were using a position which had not been
corrected for antenna offset. This was used for calculating the reset
for sensor change.

This fixes that (trivial fix) and also fixes a similar issue on
position reset
2020-05-06 14:17:21 +09:00
Matt Lawrence 31b98d5d97 AP_Camera: Make trigger type enum class 2020-05-06 14:14:23 +09:00
Matt Lawrence fd9d4a012d RC_Channel: Add GoPro mode toggle Aux switch 2020-05-06 14:14:11 +09:00
Matt Lawrence 0bef5bd9dd GCS_Mavlink: Add routing for GoPro heartbeat 2020-05-06 14:09:16 +09:00
Matt Lawrence 5fe19911bf AP_Camera: Add handling of GoPro mavlink commands 2020-05-06 14:09:13 +09:00
Matt Lawrence e23e798eb9 AP_HAL_ChibiOS: Fix waf --default-parameters
If a defaults.parm file was present in the hwdef, waf ignored the --default-parameters=xyz.parm command line argument.  This will allow it to use that command line argument specified file.
2020-05-06 14:07:00 +09:00
ashvath f59bbc1c9e Copter: function for mot_pwm checks 2020-05-06 14:00:12 +09:00
Andrew Tridgell ac51e2b02b AP_GPS: fixed yaw error when one GPS has zero position
the M_PI correction was only valid for one zero side. Much simpler to
always calculate difference
2020-05-06 13:58:04 +09:00
Andrew Tridgell 804949707d HAL_SITL: added betaflight-x-rev frame type 2020-05-06 13:54:11 +09:00
Andrew Tridgell b072190cf8 SITL: added betaflight-rev-x frame 2020-05-06 13:54:06 +09:00
Andrew Tridgell 67ffb30954 AP_Motors: added betaflight-x-reversed frame type 2020-05-06 13:53:56 +09:00
Andrew Tridgell 1cbad0c86e SRV_Channel: change function to AP_Int16
this also removes the old parameter conversion code used for when we
first added the SERVO parameters. This was needed for conversion from
Copter 3.4 and Plane 3.7
2020-04-21 08:03:01 +09:00
Andrew Tridgell 8255517e3a AP_Param: added convert_parameter_width()
this allows for easy conversion of the width of a parameter without
changing indexes
2020-04-21 08:03:01 +09:00
Peter Hall ac1c4a3b2c SRV_Channel: add missing ProfiLED description values 2020-04-21 08:03:01 +09:00
Peter Hall 81a95e2a71 AP_Scripting: Add led matrix examples 2020-04-21 08:03:01 +09:00
Peter Hall 4b84e749ad AP_Scripting: update LED_roll example 2020-04-21 08:03:01 +09:00
Peter Hall 21cfe5a3d6 AP_HAL_SITL: update function names 2020-04-21 08:03:01 +09:00
Peter Hall 7dacfcc198 AP_HAL_ChibiOS: add support for ProfiLEDs 2020-04-21 08:03:01 +09:00
Peter Hall a42b459b27 AP_HAL: support ProfiLEDs 2020-04-21 08:03:01 +09:00
Peter Hall fa1b8cb792 AP_Notify: support ProfiLEDs 2020-04-21 08:03:01 +09:00
Peter Hall 473bd4c9ee AP_Scripting: regenerate bindings 2020-04-21 08:03:01 +09:00
Peter Hall 33bef0f884 AP_Scripting: support ProfiLEDs 2020-04-21 08:03:01 +09:00
Peter Hall d8501c4031 AP_SerialLED: support ProfiLEDs 2020-04-21 08:03:01 +09:00
Peter Hall 3f0eeaf6d9 SRV_Channel: add ProfiLED ouputs 2020-04-21 08:03:01 +09:00
Andrew Tridgell 71ef4ef231 AP_SerialLED: added define for LED limit 2020-04-21 08:03:01 +09:00
Andrew Tridgell 59bf162572 HAL_ChibiOS: reserve plenty of DMA memory for luminousbee4 2020-04-21 08:03:01 +09:00
Andrew Tridgell 434ad4e990 AP_SerialLED: allow more than 32 LEDs 2020-04-21 08:03:01 +09:00
Andrew Tridgell 18a9dce6e9 AP_Scripting: adjust for updated LED API 2020-04-21 08:03:01 +09:00
Andrew Tridgell 8ea159fe4e AP_Notify: allow up to 64 LEDs on a pin 2020-04-21 08:03:01 +09:00
Andrew Tridgell b26233495f HAL_SITL: allow more than 32 LEDs on a pin 2020-04-21 08:03:01 +09:00
Andrew Tridgell b219ee453c HAL_ChibiOS: allow more than 32 WS2812 LEDs on a pin 2020-04-21 08:03:01 +09:00
Andrew Tridgell cdee5f8b0e AP_HAL: adjust LED API to allow more than 32 LEDs on a pin 2020-04-21 08:03:01 +09:00
Andrew Tridgell e26860bd09 HAL_ChibiOS: added luminousbee4 flight controller 2020-04-21 08:03:01 +09:00
Peter Hall eb85d98b4d AP_Scripting: regenerate bindings 2020-04-07 09:05:35 +10:00
Peter Hall 389f28d937 AP_Scripting: correct generator bug 2020-04-07 09:05:35 +10:00
Peter Barker b9804be01c AP_HAL_ChibiOS: make a static-const hal a reference to the external symbol 2020-03-03 20:35:57 +09:00
Andrew Tridgell 43c8efd820 HAL_ChibiOS: switched to new USB VID for dual-CDC boards 2020-02-20 13:03:57 +11:00
Andrew Tridgell 2ed21b3be1 HAL_ChibiOS: fixed default fast sampling on CubeOrange and Durandal 2020-02-20 13:03:09 +11:00
Andrew Tridgell 6d8482bc2e HAL_ChibiOS: produce more accurate clocks for DShot and PWM 2020-02-20 13:02:09 +11:00
Andrew Tridgell ca1053a28c HAL_ChibiOS: raised timer clocks to 200MHz
this gives more flexibility in setting up timers for DShot
2020-02-20 13:01:00 +11:00
Andrew Tridgell d3ee8c8795 GCS_MAVLink: don't send statustext from other than main thread
This fixes high stack usage in the RCIN thread when it notifies the
GCS of a new RCIN protocol. The problem is severe when signing is
enabled, as signing adds over 500 bytes to stack cost of sending a
mavlink msg

fixes issue #13615
2020-02-20 12:59:01 +11:00
Randy Mackay 10ef74172c AP_ServoRelayEvents: do-set-servo affects sprayer and gripper 2020-02-20 09:52:20 +09:00
bnsgeyer a8b1f93a83 AP_Motors: tradheli - fix quad heli collective structure 2020-02-20 09:52:19 +09:00
Andrew Tridgell 7eb106ea07 HAL_ChibiOS: fixed output string for non-DMA capable chan
this fixes a problem where the user requests DShot (which rquired DMA)
on an output channel which cannot allocate a DMA channel. We end up
sending normal PWM, so the string representation of the output modes
should reflect that
2020-02-20 09:39:27 +09:00
Randy Mackay 4b684085cc GCS_MAVLink: send rc output mode banner to GCS 2020-02-20 09:36:53 +09:00
Randy Mackay 95ec629923 AP_HAL: add RCOutput::get_output_mode_banner 2020-02-20 09:36:48 +09:00
Randy Mackay dfbccf3811 AC_AttitudeControl_Heli: fix VFF and ILMI param descriptions 2020-02-14 12:51:04 +09:00
Randy Mackay 8f32a1089d AC_PosControl: add missing ACCZ param descriptions 2020-02-14 12:51:01 +09:00
Andrew Tridgell 1201292c09 GCS_MAVLink: raise ftp stack size to 3072 from 1024
this prevents memory corruption on directory listing
2020-02-11 12:43:29 +11:00
Andrew Tridgell 77865e9f78 HAL_ChibiOS: fixed spektrum RC input on Pixracer
RCININT is inverted compared to RCIN, so need to enable SBUS_INV pin
2020-02-05 11:13:30 +09:00
Andrew Tridgell 8e0124f383 AP_RangeFinder: fixed failover between rangefinders
this fixes the case where we have one rangefinder that can handle
short range and another that is good for long range but no good for
short range (quite common, eg radar and lidar)

If possible we want to use the first rangefinder that is in range for
the right orientation. If none are in range then use the first for the
orientation
2020-02-05 11:13:30 +09:00
Henry Wurzburg f7cbdb4520 HWDEF: Speedybeef4 change I2C internal mask to 0 to allow probing ext baros 2020-02-05 11:13:30 +09:00
Andrew Tridgell 72b9a69911 AP_NavEKF3: don't use WMM tables unless we have a compass scale factor set 2020-02-05 11:13:30 +09:00
Andrew Tridgell d47126fc6b AP_NavEKF2: don't use WMM tables unless we have a compass scale factor set 2020-02-05 11:13:30 +09:00