Commit Graph

14592 Commits

Author SHA1 Message Date
Andrew Tridgell b2668a88ee HAL_PX4: fixed a race condition on i2c init
we could call init on two devices with the same name, which caused
init_ok to be false. This could cause the SMBus battery to fail to
initialise

Thanks to Michael duBreuil for finding this!
2017-10-29 19:52:03 +11:00
Lucas De Marchi d0494350d5 AP_HAL_Linux: UARTDevice: never be the controlling terminal
If we are the controlling terminal for a tty device we will receive a
SIGHUP when the device disappears. Currently what happens is that we
simply stop the whole process. We don't want to fall off the sky due
to a bad device. This can happen for any reason, but it's more likely
if the UART is behind a USB connection.
2017-10-29 19:52:03 +11:00
Andrew Tridgell 3126dea51d DataFlash: log critical messages while disarmed
this logs critical messages while disarmed if we have logged any
messages while armed. This fixes issue #7010 where log files show the
incorrect mode if the log includes any portions where the user
disarmed. It makes analysing users logs very difficult. It also
affects parameters, so we don't always know the true parameter values
in logs from users.
2017-10-29 19:52:02 +11:00
Peter Barker 2d684cd9e8 AP_HAL_SITL: implement in_main_thread 2017-10-29 19:52:02 +11:00
Andrew Tridgell 844bcf33c9 AP_HAL_QURT: make in_main_thread const and override
# Conflicts:
#	libraries/AP_HAL_QURT/Scheduler.cpp
#	libraries/AP_HAL_QURT/Scheduler.h
2017-10-29 19:52:02 +11:00
Andrew Tridgell 9d897f5da6 AP_HAL_VRBRAIN: make in_main_thread const and override
# Conflicts:
#	libraries/AP_HAL_VRBRAIN/Scheduler.cpp
#	libraries/AP_HAL_VRBRAIN/Scheduler.h
2017-10-29 19:52:02 +11:00
Andrew Tridgell 8b472919da AP_HAL_PX4: make in_main_thread const and override
# Conflicts:
#	libraries/AP_HAL_PX4/Scheduler.cpp
#	libraries/AP_HAL_PX4/Scheduler.h
2017-10-29 19:52:02 +11:00
Andrew Tridgell 3ef150e9f7 AP_HAL_Linux: make in_main_thread const and override
# Conflicts:
#	libraries/AP_HAL_Linux/Scheduler.cpp
#	libraries/AP_HAL_Linux/Scheduler.h
2017-10-29 19:52:02 +11:00
Peter Barker 4cb981afa6 AP_HAL: make in_main_thread public, pure and virtual 2017-10-29 19:52:02 +11:00
Peter Barker f9f20970c9 DataFlash: resolve race conditions with IMU logging thread 2017-10-29 19:52:01 +11:00
Andrew Tridgell 8a4e84e099 AP_TECS: improved support for VTOL transitions 2017-10-21 18:50:50 +11:00
Andrew Tridgell 665cdee768 SITL: use thread for FlightAxis comms
this allows us to run SITL at a much higher framerate than RF can
provide, and results in the EKF being much happier
2017-10-21 18:50:40 +11:00
Andrew Tridgell 77702c18a5 HAL_SITL: don't run IO at more than 100Hz
save some CPU for faster frame rates
2017-10-21 18:50:36 +11:00
Andrew Tridgell 5b4e57414d AP_Airspeed: fixed airspeed autocal
don't use negative pressures
2017-09-22 18:28:32 +10:00
Mark Whitehorn a39cfda192 AP_Airspeed: eliminate airspeed positive bias 2017-09-22 18:28:07 +10:00
Rufus Wong add27e4b3b AP_Compass: Add break to prevent fallthrough of PIXRACER to PIXHAWK_PRO 2017-09-18 19:57:52 +10:00
Andrew Tridgell eafbdee118 AC_AttitudeControl: added a update_vel_controller_xy() API
this allows for just XY control of velocity for quadplanes
2017-09-08 15:58:59 +10:00
Michael du Breuil e4c20986c6 AP_GPS: SBF: Reject short packets early, allow 256 byte long messages to be decoded 2017-09-06 10:42:49 +10:00
Andrew Tridgell ff220d5348 AP_GPS: make SBF driver more robust
this fixes a crash bug in the SBF GPS driver where a badly formed packet
could cause crc16_ccitt to reference invalid memory
2017-09-06 10:42:46 +10:00
Michael du Breuil 740e1c4326 GCS_MAVLink: Correct a bug in the FOR_EACH_ACTIVE_CHANNEL macro 2017-08-31 11:02:26 +10:00
Andrew Tridgell 32ee618a8f AP_SerialManager: enable debug console use for other protocols
this allows SERIAL5_PROTOCOL to be set on FMUv2 and FMUv3 for use by
other protocols
2017-08-28 18:00:24 +10:00
Andrew Tridgell efa07ea6b5 HAL_PX4: allow uart5 to be used for non-nsh on FMUv2/FMUv3 2017-08-28 18:00:21 +10:00
Andrew Tridgell 7829e6652d SITL: added simple launch sim for plane
allow for bungee, catapult and hand launches
2017-08-28 17:55:47 +10:00
Andrew Tridgell 992baa7026 RC_Channel: fixed bug in manual with TRIM == MIN
This fixes the bug described here:

https://discuss.ardupilot.org/t/arduplane-reverse-thrust-setup/18324/5

which otherwise would prevent output with TRIM == MIN or TRIM == MAX
2017-08-26 20:31:36 +10:00
Michael du Breuil e00811375b AP_NavEKF3: Fix possible compass nullptr dereference 2017-08-02 12:49:14 +10:00
Michael du Breuil b09b7f7867 AP_NavEKF2: Fix possible compass nullptr dereference 2017-08-02 12:49:14 +10:00
Andrew Tridgell 20bddf4d5a SRV_Channel: added copy_radio_in_out_mask() 2017-08-02 12:49:13 +10:00
Andrew Tridgell 336fbfbdbc SRV_Channel: added get/set for reversed and function
these are needed in plane for auto-conversion of old elevon code
2017-08-02 12:49:12 +10:00
Andrew Tridgell 470ae43ba4 SRV_Channel: prevent negative slew rate
thanks to Michael for pointing this out
2017-08-02 12:49:12 +10:00
Randy Mackay 159906762f AP_Arming: rename _MIN_VOLT to _VOLT_MIN
Also _MIN_VOLT2 to _VOLT2_MIN
2017-08-02 12:49:11 +10:00
Randy Mackay 1405801595 AP_Arming: minor variable type change
no functional change
2017-08-02 12:49:11 +10:00
Randy Mackay ed6e740ad0 AP_Arming: Copter gets MIN_VOLT parameters 2017-08-02 12:49:11 +10:00
Michael du Breuil 52c98b56cb L1_Control: Ensure that LIM_BANK passes a sea level sanity check
This fixes #6637 where the LIM_BANK can be set such that the vehicle demands a radius at sea level that is much higher then the loiter radius was configured to be. This effectively feels like a fly away and is due to bad parameters usually. If this happens just fall back to the simple EAS2TAS scaling of the radius.
2017-08-02 12:49:10 +10:00
Peter Barker 851f23fe9c AP_Camera: camera is responsible for taking distance-based-images and logging 2017-08-02 12:49:09 +10:00
Peter Barker 3e85c9bd83 AP_GPS: make time_epoch_usec const 2017-08-02 12:49:09 +10:00
priseborough 3772fd68da AP_NavEKF3: Fix bug in wheel odometry timestamp correction 2017-08-02 12:49:09 +10:00
Matt d681ec304f AP_Notify: Fix for Oreo LED gyro init inidication
If parameter INS_GYRO_CAL is disabled, usually because operator is
arming on a moving vehicle such as a boat, the Oreo LEDs would wait
indefinitely for a gyro calibration that will never happen.  This
removes that dependency.  The LEDs will strobe blue only when gyros are
actually initializing. Not before.  Consequently, this greatly
simiplifies that portion of the code.
2017-08-02 12:49:08 +10:00
khancyr 93fdbf1573 AC_Fence: reset fences breach on disable
Also rename enable function parameter
2017-08-02 12:49:08 +10:00
priseborough c7f6d52065 AP_NavEKF3: Add wheel encoder odometry
Uses the existing body frame odometry observation model.
Handles each sensored wheel as a separate sensor.
2017-07-27 16:52:27 +09:00
priseborough cbe8f97489 AP_NavEKF3: rename struct used for velocity odometry observations
Do this so we can add other odometry observation types.
2017-07-27 16:52:26 +09:00
priseborough 08a3f55c90 AP_NavEKF3: Fix error in scaling of observation error 2017-07-27 16:52:25 +09:00
priseborough 593437ca95 AP_NavEKF3: Add tuning of visual odometry observation error
Also adjust default values based on replay analysis.
2017-07-27 16:52:25 +09:00
Randy Mackay eaf8aad5ad AP_WheelEncoder: last_reading is last update time instead of system time 2017-07-27 14:19:08 +09:00
Randy Mackay 2c7b9d9cf7 AP_WheelEncoder: add get_delta_angle
The total angular change measured by the wheel encoder in radians
2017-07-27 14:19:08 +09:00
Randy Mackay a53e254bd0 AP_WheelEncoder: replace scaling with CPR and radius
CPR is the wheel encoder's counts per revolution of the wheel
radius is the radius of the wheel in meters
2017-07-27 14:19:08 +09:00
Randy Mackay cd71984705 AP_WheelEncoder: 3d position offset 2017-07-27 14:19:08 +09:00
Randy Mackay 1ddf38869a AP_AHRS: set AP_Notify gps_glitching flag 2017-07-27 14:16:23 +09:00
Randy Mackay 0d5c98ad45 AP_Notify: add gps glitch notification 2017-07-27 14:16:23 +09:00
Randy Mackay 9123b6034e SRV_Channel: update_aux_servo_function first checks function is valid
This resolves a bug in which the board could become unresponsive if an invalid function is selected
2017-07-27 11:09:57 +09:00
Patrick José Pereira 1eeea82e31 AP_Parachute: Add function to return _release_in_progress status
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2017-07-26 17:51:34 +01:00