Randy Mackay
3de2dff6e3
AP_BattMonitor: simplify SMBus driver includes
2020-06-05 16:57:39 -07:00
Randy Mackay
4ea565e4ed
AP_BattMonitor: Maxell driver inherits from SMBus_Generic
2020-06-05 16:57:39 -07:00
Randy Mackay
f869cd9aa6
AP_BattMonitor: complete rename of SMBus_Maxell to Generic
2020-06-05 16:57:39 -07:00
Randy Mackay
c13c037f7b
AP_BattMonitor: rename SMBus_Maxell to Generic
2020-06-05 16:57:39 -07:00
Andrew Tridgell
2e7dc380c4
SITL: revert default physics step to 1200
...
this should help us pass CI
2020-06-06 08:17:25 +10:00
Andrew Tridgell
5349113104
SITL: improved the speedup code
...
more accurate sleeps using sleep debt system
2020-06-06 08:17:25 +10:00
Andrew Tridgell
750b220a5f
SITL: simulations optimisations
...
- change to 600Hz physics rate by default
- don't export rotational acceleration (not needed)
- report speedup in terminal output at 0.5Hz (wall clock rate)
2020-06-06 08:17:25 +10:00
Andrew Tridgell
7c2d13c571
SITL: added simulation of pressure altitude for multicopter
...
this gives us a ceiling of 5.4km above sea level for the default
copter
2020-06-05 11:35:53 +10:00
Siddharth Purohit
c0eb27cc35
AP_Compass: pull compass calibrator out into a separate thread
2020-06-05 09:38:40 +10:00
bugobliterator
c914a91be9
AP_Compass: add support for per mag calibration
2020-06-05 09:38:40 +10:00
bugobliterator
95493e4569
SITL: add support for per mag calibration
2020-06-05 09:38:40 +10:00
Peter Barker
86687d240d
AP_NavEKF3: avoid compiler warnings from -Wclass-memaccess
...
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp: In member function ‘void NavEKF2_core::InitialiseVariables()’:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:343:50: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct NavEKF2_core::ext_nav_vel_elements’; use assignment or value-initialization instead [-Wclass-memaccess]
343 | memset(&extNavVelNew, 0, sizeof(extNavVelNew));
| ^
In file included from ../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:4:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.h:518:12: note: ‘struct NavEKF2_core::ext_nav_vel_elements’ declared here
518 | struct ext_nav_vel_elements {
| ^~~~~~~~~~~~~~~~~~~~
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:344:58: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct NavEKF2_core::ext_nav_vel_elements’; use assignment or value-initialization instead [-Wclass-memaccess]
344 | memset(&extNavVelDelayed, 0, sizeof(extNavVelDelayed));
| ^
In file included from ../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:4:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.h:518:12: note: ‘struct NavEKF2_core::ext_nav_vel_elements’ declared here
518 | struct ext_nav_vel_elements {
| ^~~~~~~~~~~~~~~~~~~~
2020-06-05 08:42:45 +10:00
Peter Barker
b02d9abd32
AP_NavEKF2: avoid compiler warnings from -Wclass-memaccess
...
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp: In member function ‘void NavEKF2_core::InitialiseVariables()’:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:343:50: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct NavEKF2_core::ext_nav_vel_elements’; use assignment or value-initialization instead [-Wclass-memaccess]
343 | memset(&extNavVelNew, 0, sizeof(extNavVelNew));
| ^
In file included from ../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:4:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.h:518:12: note: ‘struct NavEKF2_core::ext_nav_vel_elements’ declared here
518 | struct ext_nav_vel_elements {
| ^~~~~~~~~~~~~~~~~~~~
../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:344:58: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct NavEKF2_core::ext_nav_vel_elements’; use assignment or value-initialization instead [-Wclass-memaccess]
344 | memset(&extNavVelDelayed, 0, sizeof(extNavVelDelayed));
| ^
In file included from ../../libraries/AP_NavEKF2/AP_NavEKF2_core.cpp:4:
../../libraries/AP_NavEKF2/AP_NavEKF2_core.h:518:12: note: ‘struct NavEKF2_core::ext_nav_vel_elements’ declared here
518 | struct ext_nav_vel_elements {
| ^~~~~~~~~~~~~~~~~~~~
2020-06-05 08:42:45 +10:00
James Jacobsson
8a87322d93
AP_HAL_Chibios: Adjust MatekF765-Wing voltage and current scales
...
The new values matches the ones from here:
http://www.mateksys.com/?portfolio=f765-wing#tab-id-5
Also verified to be a lot more accurate in real life.
2020-06-04 10:06:22 +10:00
Alexander Maryanovsky
d73043fc2f
SITL: get_wall_time_us() to use a monotonic clock on non-Windows systems
2020-06-04 10:05:22 +10:00
Phillip Kocmoud
0d5a0f392c
hwdef.dat update x2.1-777
2020-06-04 09:51:27 +10:00
Andrew Tridgell
571fbf8f71
HAL_ChibiOS: update power VALID pins
2020-06-04 09:51:27 +10:00
Andrew Tridgell
863807c9fb
HAL_ChibiOS: use more consistent naming for power VALID pins
...
this uses _VALID for an active high pin and _nVALID for an active low
pin. It uses _OC for active high overcurrent and _nOC for active low
overcurrent
2020-06-04 09:51:27 +10:00
Andrew Tridgell
f896213770
AP_AHRS: drop rotate prefix on 2D rotates
2020-06-04 09:49:52 +10:00
Andrew Tridgell
d7b20c6e48
AP_Scripting: added micros()
2020-06-04 09:49:52 +10:00
Andrew Tridgell
1bc9001267
AP_Scripting: added ahrs:get_EAS2TAS()
2020-06-04 09:49:52 +10:00
Andrew Tridgell
f8be087c7e
AP_Scripting: added new lua bindings
2020-06-04 09:49:52 +10:00
Andrew Tridgell
7d520c8307
AP_AHRS: added body/earth frame ops for Lua
2020-06-04 09:49:52 +10:00
Andrew Tridgell
a56a7f7da4
AP_Math: added more vector3f ops for lua
2020-06-04 09:49:52 +10:00
Andrew Tridgell
cab3630009
AP_InertialSensor: switched to supplying timestamps for SITL
...
this allows the time step to change on each loop as we no longer use
the average sensor rate when calculating deltas
2020-06-03 18:11:06 +10:00
Andrew Tridgell
e4596efe9b
SITL: added SIM_RATE_HZ
...
this allows the physics step size to be changed while flying the
internal models, which allows for lower CPU usage
2020-06-03 18:11:06 +10:00
Andras Schaffer
43bef1ac9e
AP_Proximity: fix proximity ignored zone calulation
...
It seems there was a typo in the checking of proximity ignored zones.
2020-06-03 16:11:55 +09:00
Peter Barker
f842c27070
AP_HAL_SITL: correct clearing of UART drivers
2020-06-03 17:00:44 +10:00
Peter Barker
f3bee7fa03
AP_HAL_Linux: correct clearing of UART drivers
2020-06-03 17:00:44 +10:00
Peter Barker
931c77fa77
AP_HAL_ChibiOS: correct clearing of UART drivers
2020-06-03 17:00:44 +10:00
Randy Mackay
c936307ecf
RC_Channel: minor format fix to option param desc
2020-06-03 15:21:21 +09:00
Tatsuya Yamaguchi
ea3c11030c
RC_Channel: add ZIGZAG_Auto Aux switch
2020-06-03 15:21:21 +09:00
Samuel Tabor
b21f9030b7
AP_Soaring: Update parameter ranges.
2020-06-02 10:36:51 -07:00
TunaLobster
a13ddc1096
AP_Scripting: add binding for get_output_pwm
2020-06-02 12:53:24 +10:00
Andrew Tridgell
78858bbcdd
AP_GPS: switch ublox over to 230400 baud
...
this ensures we have sufficient bandwidth for raw data
2020-06-01 17:18:17 -07:00
Andrew Tridgell
d9d53d380d
AP_Landing: implement continue after land for fixed wing landings
...
this makes touch and go missions possible
2020-06-02 09:12:22 +09:00
Andrew Tridgell
7c49723f19
AP_Mission: added continue after land mission option
...
this allows for option to continue a mission after a landing is
complete. The default in copter was to continue, so adding this
option makes copter not continue by default. Plane already disarmed on
land complete.
2020-06-02 09:12:22 +09:00
Henry Wurzburg
f9b02a6814
AP_RangeFinder: HC-SR04: Add glitch filter
2020-06-02 09:58:53 +10:00
Peter Barker
fc1ea612b1
AP_RangeFinder: add support for HC-SR04 rangefinder
2020-06-02 09:58:53 +10:00
Michael du Breuil
400220e210
AP_BattMonitor: Rearrange arming check order
2020-06-02 09:55:36 +10:00
Andrew Tridgell
2dcf8a3b08
AP_RangeFinder: cope with beyond max range with LightwareI2C
2020-06-02 08:49:38 +09:00
mmk0102
22d052b711
AP_Arming: check for duplicate auxswitch options
2020-06-02 09:43:31 +10:00
Randy Mackay
93d8458d2a
AP_NavEKF3: FuseVelPosNED uses ext nav vel err in obs data check
2020-06-02 08:33:42 +09:00
Randy Mackay
d37eec5fd8
AP_NavEKF3: ext nav vel corrected for sensor position when recalled from buffer
2020-06-02 08:33:42 +09:00
Randy Mackay
79901ffc1b
AP_VisualOdom: pass velocity error to logger
2020-06-02 08:33:42 +09:00
Randy Mackay
08f6b2128e
AP_Logger: add VISV field descriptions
2020-06-02 08:33:42 +09:00
Randy Mackay
714975662d
AP_Logger: VISP message gets velocity error field
2020-06-02 08:33:42 +09:00
Randy Mackay
31763424a3
SITL: speed up vicon messages to avoid EKF timeouts during resets
2020-06-02 08:33:42 +09:00
Randy Mackay
630bc01101
AP_HAL_SITL: send vehicle velocity to sitl vicon class
2020-06-02 08:33:42 +09:00
Randy Mackay
c8f6cb233b
SITL: vicon supports sending vision-speed-estimate
...
SIM_VICON_TMASK controls which of the 3 supported messages are sent
SIM_VICON_VGLI_X/Y/Z allows introducing a velocity glitch
2020-06-02 08:33:42 +09:00
Randy Mackay
3a209d5d84
SITL: SIM_Vicon loses unused obs_elements structure
2020-06-02 08:33:42 +09:00
Randy Mackay
cad9889656
AP_AHRS: send vision-speed-estimates to EKF3
2020-06-02 08:33:42 +09:00
chobits
c7817eaca1
AP_NavEKF3: support VISION_SPEED_ESTIMATE
...
Co-authored-by: Randy Mackay <rmackay9@yahoo.com>
2020-06-02 08:33:42 +09:00
Randy Mackay
bdb67532b0
AP_Math: clarify get_vel_correction_for_sensor_offset comment
2020-06-02 08:33:42 +09:00
Randy Mackay
4639e8a698
AP_Math: add get_vel_correction_for_sensor_offset
2020-06-01 17:51:24 +09:00
chobits
9b480ca755
AP_Logger: support VISION_SPEED_ESTIMATE
2020-06-01 17:51:24 +09:00
chobits
66a5f645d7
AP_VisualOdom: support VISION_SPEED_ESTIMATE
2020-06-01 17:51:24 +09:00
chobits
ff6e4c4f9a
GCS_MAVLink: support VISION_SPEED_ESTIMATE
2020-06-01 17:51:24 +09:00
chobits
dee095b4a4
AP_NavEKF2: support VISION_SPEED_ESTIMATE
2020-06-01 17:51:24 +09:00
chobits
c9e363d529
AP_AHRS: support VISION_SPEED_ESTIMATE
2020-06-01 17:51:24 +09:00
Rishabh
e7d98648e6
AR_WPNav: Reset WP origin if recovering from OA
2020-05-30 08:55:45 +09:00
Rishabh
44f0aef5e9
AP_OAPathPlanner: Add param to reset WP origin while recovering from Bendy
2020-05-30 08:55:45 +09:00
Gone4Dirt
1b7672a84f
AP_Motors: Correctly adjust heli run up timer in bailout
2020-05-28 18:50:08 -04:00
Iampete1
141ab622a3
SITL: examples: JSON: MATLAB: add pnet linux compiled
2020-05-29 08:25:24 +10:00
Iampete1
13965133b0
SITL: examples: JSON: add MATLAB example
2020-05-29 08:25:24 +10:00
Iampete1
fa712082d7
SITL: examples: add JSON readme
2020-05-29 08:25:24 +10:00
Iampete1
ce0cb9660f
SITL: examples: add MATLAB TCP/UDP/IP Toolbox
2020-05-29 08:25:24 +10:00
Iampete1
0c6efa5f26
SITL: add JSON backend
2020-05-29 08:25:24 +10:00
Iampete1
c31a4f4b14
AP_HAL_SITL: add JSON backend
2020-05-29 08:25:24 +10:00
CUAVcaijie
220e6999c7
HAL_ChibiOS:Adapt to CUAV Nora V1.2 hardware
2020-05-28 19:13:49 +10:00
Peter Barker
1ebfc79eb0
AP_HAL_Linux: enable console for examples
...
Turns out we *do* need this for examples. We're back to stuffing up
terminals where examples have been run, but that can be addressed later.
2020-05-28 13:49:47 +10:00
pkocmoud
7809dc849c
HAL_ChibiOS: Added support for mRo Pixracer Pro flight controller
2020-05-27 21:22:56 +10:00
Andrew Tridgell
529bfe8fcd
AP_GPS: fixed issue with GPS selection for moving baseline
...
when you have a moving baseline pair of ublox GPS modules and the
rover GPS does not have full fixed RTK lock on the base GPS then we
should not use it as our primary GPS as it's position and velocity can
be badly affected by the attempts of the GPS to gain a fixed lock.
This was observed in a flight with two F9P GPS, where the GPS velocity
data from the rover GPS went way off when it lost full RTK lock. It's
status stayed at 4, so it was selected as the primary GPS
2020-05-27 10:59:46 +10:00
MisterMower
41245acf14
AP_Logger: Added units to CurrTot message
...
Units are not associated with the CurrTot message. AP_BattMonitor.h indicates the total current consumed is reported in mAh. This change sets the units for CurrTot to Ampere seconds and applies a multiplier of 3.6 to convert the reported mAh value to Ampere seconds.
2020-05-26 16:19:14 +10:00
Peter Barker
6cdee8c830
AP_BLHeli: read more efficiently from telemetry UART
2020-05-26 15:59:11 +10:00
Peter Barker
6d9e563ede
AP_HAL_ChibiOS: override read(buffer,count) method to be more efficient
2020-05-26 15:59:11 +10:00
Peter Barker
d259c03079
AP_HAL: BetterStream add a read(uint8_t*buffer, uint16_t count method
2020-05-26 15:59:11 +10:00
Peter Barker
1d9c2b1726
AP_Logger: add documentation for SBPH and SBRH
2020-05-26 14:13:06 +10:00
Henry Wurzburg
9c72525bbf
AP_HAL_ChibiOS: Add unused LED output as GPIO in OmnibusF4Pro def
2020-05-26 10:51:32 +10:00
Peter Barker
19dc07250d
AP_NavEKF2: clarify yaw reset error message
...
The current wording can be taken to indicate that the mag sensors
stopped, causing this issue.
2020-05-26 10:05:35 +10:00
Peter Barker
bf3cb977fd
AP_NavEKF3: clarify yaw reset error message
...
The current wording can be taken to indicate that the mag sensors
stopped, causing this issue.
2020-05-26 10:05:35 +10:00
vierfuffzig
6fa7dca68b
AP-Baro: fix init without baro
2020-05-26 10:04:22 +10:00
yaapu
13592cef91
AP_Frsky_Telem: removed time constraint to allow SITL regression testing
2020-05-26 10:02:12 +10:00
yaapu
6303c700d4
AP_Frsky_Telem: prevent SPort frame fragmentation by writing whole 8byte frames vs writing single bytes
...
general scheduler delays could introduce small delays when writing SPort frames to the uart one byte
at the time potentially leading to rx desyncs on the SPort bus.
This fix replaces single byte writes with full frame writes.
The library has around 10ms to repond to polling so to guarantee frame integrity responses taking
longer than 7500us are discarded
2020-05-26 10:02:12 +10:00
Peter Barker
af80c4a29f
AP_RangeFinder: remove move-to-error-state for LeddarOne driver
...
Just because there's a lot in your input buffer doesn't necessarily mean
the rangefinder is faulty.
2020-05-26 09:20:32 +10:00
Peter Barker
3bf1ac5918
AP_BLHeli: trim annoying LF from debug "Bad CRC" line
2020-05-26 09:20:32 +10:00
Peter Barker
67e4756f19
AP_Hott_Telem: use new UARTDriver discard_input method
2020-05-26 09:20:32 +10:00
Peter Barker
90038339dc
AP_UAVCAN: use new UARTDriver discard_input method
2020-05-26 09:20:32 +10:00
Peter Barker
95f9769041
AP_RangeFinder: use new UARTDriver discard_input method
2020-05-26 09:20:32 +10:00
Peter Barker
f1182637a6
AP_IOMCU: use new UARTDriver discard_input method
2020-05-26 09:20:32 +10:00
Peter Barker
71f6262294
AP_EFI: use new UARTDriver discard_input method
2020-05-26 09:20:32 +10:00
Peter Barker
d012cf8d47
AP_Camera: use new UARTDriver discard_input method
2020-05-26 09:20:32 +10:00
Peter Barker
a073469423
AP_BLHeli: use new UARTDriver discard_input method
2020-05-26 09:20:32 +10:00
Peter Barker
80615c44ff
AP_HAL_SITL: add discard_input method on UARTDriver
2020-05-26 09:20:32 +10:00
Peter Barker
9a9743e6ba
AP_HAL_Linux: add discard_input method on UARTDriver
2020-05-26 09:20:32 +10:00
Peter Barker
b16c1ea647
AP_HAL_Empty: add discard_input method on UARTDriver
2020-05-26 09:20:32 +10:00
Peter Barker
8f54de4184
AP_HAL_ChibiOS: add discard_input method on UARTDriver
2020-05-26 09:20:32 +10:00
Peter Barker
a8d03990ec
AP_HAL: add discard_input method on UARTDriver
2020-05-26 09:20:32 +10:00
Peter Hall
bfd71fdae1
RC_Channel: add Qassist switch
2020-05-26 09:01:47 +10:00
Andrew Tridgell
5bfcb0ed4a
SRV_Channel: Add servo chan override w/ timeout
...
Adds a feature to override a servo output for a given time. Scripting
bindings and example included.
2020-05-25 14:10:01 +10:00