Commit Graph

8963 Commits

Author SHA1 Message Date
Julien BERAUD
3b5d73b1fe AP_Baro_MS5611: Fix state machine in case of error
If there is a read error, reading from the adc will return 0 but moreover,
we need to re-initiate a read or else we are stuck forever.

From MS5611-01BA03 datasheet, p. 10, CONVERSION SEQUENCE:
"After the conversion, using ADC read command the result is clocked out with the MSB first.
If the conversion is not executed before the ADC read command, or the ADC read command is
repeated, it will give 0 as the output result."
2015-09-23 09:19:22 +10:00
Lucas De Marchi
0ed7f94bfc AP_HAL_SITL: use method for downcast
Instead of just doing a static cast to the desired class, use a method
named "from". Pros:

  - When we have data shared on the parent class, the code is cleaner in
    child class when it needs to access this data. Almost all the data
    we use in AP_HAL benefits from this

  - There's a minimal type checking because now we are using a method
    that can only receive the type of the parent class
2015-09-23 09:01:29 +10:00
Lucas De Marchi
6c19f741df AP_BattMonitor: use method for downcast
Instead of just doing a static cast to the desired class, use a method
named "from". Pros:

  - When we have data shared on the parent class, the code is cleaner in
    child class when it needs to access this data. Almost all the data
    we use in AP_HAL benefits from this

  - There's a minimal type checking because now we are using a method
    that can only receive the type of the parent class
2015-09-23 09:01:29 +10:00
Lucas De Marchi
294298ea34 AP_InertialSensor: use method for downcast
Instead of just doing a static cast to the desired class, use a method
named "from". Pros:

  - When we have data shared on the parent class, the code is cleaner in
    child class when it needs to access this data. Almost all the data
    we use in AP_HAL benefits from this

  - There's a minimal type checking because now we are using a method
    that can only receive the type of the parent class
2015-09-23 09:01:29 +10:00
Lucas De Marchi
54c2c5f682 AP_HAL_Linux: use method for downcast
Instead of just doing a static cast to the desired class, use a method
named "from". Pros:

  - When we have data shared on the parent class, the code is cleaner in
    child class when it needs to access this data. Almost all the data
    we use in AP_HAL benefits from this

  - There's a minimal type checking because now we are using a method
    that can only receive the type of the parent class
2015-09-23 09:01:29 +10:00
Andrew Tridgell
0d26252bdb AP_Terrain: don't allocate cache array when terrain not enabled
this makes it easy to save 22k of ram when running other experiments
2015-09-23 08:31:17 +10:00
Tom Pittenger
e2fde36ec6 AP_NavEKF: index out of range due to incorrect assignment 2015-09-22 11:41:51 +09:00
Jonathan Challinger
d2b103b323 AP_SmallEKF: replace incorrect quaternion rotations with library call 2015-09-22 11:15:05 +10:00
Andrew Tridgell
eabdee2b3c DataFlash: only log two rangefinders
this prevents a array index build error on PX4
2015-09-22 09:24:55 +10:00
Andrew Tridgell
5800f0c884 AP_RangeFinder: default to two rangefinders
and fixed documentation strings for rangefinder 3 and 4 if enabled
2015-09-22 09:04:47 +10:00
Paul Riseborough
5c32bb8858 AP_NavEKF: Add pre-flight check for gyro quality 2015-09-21 17:06:31 +09:00
Randy Mackay
73e7e64bb8 AP_Arming: remove unused set_skip_gyro_cal 2015-09-21 17:06:29 +09:00
Randy Mackay
87cada1d54 Scheduler: remove INS start style from example sketch 2015-09-21 17:06:25 +09:00
Randy Mackay
b5e1ad89b3 AHRS: remove INS start style from example sketch 2015-09-21 17:06:23 +09:00
Randy Mackay
ada26082ca InertialSensor: remove INS start style from example sketch 2015-09-21 17:06:20 +09:00
Randy Mackay
ec82aa68c4 InertialSensor: add GYR_CAL to control when gyro calibration occurs 2015-09-21 17:06:16 +09:00
mirkix
038ad31f81 AP_HAL_FLYMAPLE: Add support for using SPI devices of the same type. 2015-09-18 09:15:09 +10:00
mirkix
07d50b5fbb AP_HAL_Empty: Add support for using SPI devices of the same type. 2015-09-18 09:15:09 +10:00
mirkix
f48bdc281f AP_HAL: Add support for using SPI devices of the same type. 2015-09-18 09:15:09 +10:00
mirkix
93941c3349 AP_HAL_Linux: Add support for using SPI devices of the same type. 2015-09-18 09:15:09 +10:00
Peter Barker
8f1471c137 DataFlash: leave room in buffer for non-startup messages 2015-09-18 09:13:45 +10:00
Peter Barker
63a45000b4 DataFlash: take log messages after putting FMTs out 2015-09-18 09:13:45 +10:00
raspilot
1b5e6849d9 AP_Compass: fix milligauss code in LSM303D driver 2015-09-16 16:52:17 +09:00
Randy Mackay
ce6fe0e746 AP_RSSI: add enabled method 2015-09-16 16:41:41 +09:00
Randy Mackay
f633733b3b AP_RSSI: make parameters private 2015-09-16 16:41:38 +09:00
Randy Mackay
9a648117a7 AP_RSSI: use is_zero and add break for avoid compile warning 2015-09-16 16:41:36 +09:00
Randy Mackay
1369179046 AP_RSSI: formatting fixes 2015-09-16 16:41:33 +09:00
Stewart Loving-Gibbard
4dcf6b8dc3 DataFlash: Adding Logging of RSSI data. 2015-09-16 16:41:31 +09:00
Paul Riseborough
8cfde42e15 AP_NavEKF: Ensure bad mag data cannot cause the heading to reset too often 2015-09-16 15:13:37 +09:00
Paul Riseborough
930f730612 AP_NavEKF: Reset mag and heading states to try and pass pre-flight checks 2015-09-16 15:13:36 +09:00
Randy Mackay
fff5ec09eb AP_Compass: fix consistent check for less than three compasses
Also use vector functions where available
Use get_field_milligause instead of just get_field
2015-09-16 15:11:01 +09:00
Jonathan Challinger
87bbf1a487 AP_Compass: add consistent() function 2015-09-16 15:10:27 +09:00
Randy Mackay
39340e70f8 Math: add Vector2 is_zero method 2015-09-16 15:10:25 +09:00
Andrew Tridgell
094b9cb35e AP_TECS: reformat using astyle 2015-09-16 14:24:45 +10:00
Andrew Tridgell
36432e6515 AP_TECS: use climb rate filter consistently between DCM and EKF
we should use baro height not hgt_afe for the climb rate filter. This
makes the climb rate consistent with the one from the EKF. The lidar
correction comes in with the demanded height, not the observed height
2015-09-16 14:24:44 +10:00
Randy Mackay
bc06d67645 AP_Camera: fix configure command id sent to components
Also removed unnecessary setting of target system, component and
confirmation and minor formatting fix
2015-09-16 13:06:46 +09:00
squilter
8391764c60 AP_Camera: add support for do_digicam_x via command_long 2015-09-16 13:06:44 +09:00
Grant Morphett
b2751d876c AP_AHRS: Fixed spelling error in parameter desc. 2015-09-16 09:33:30 +09:00
Grant Morphett
417188d7eb APM_Control: Fixed spelling error in parameter desc. 2015-09-16 09:33:27 +09:00
Julien BERAUD
5602e4055b AP_Compass_AK8963: Fix Rotation on the Bebop 2015-09-15 14:45:17 +09:00
Andrew Tridgell
fa9ff5b604 AP_Compass: added parameter for compass calibration fitness threshold 2015-09-14 17:01:14 +10:00
Andrew Tridgell
eea54c9e09 DataFlash: fixed flymaple build 2015-09-14 16:44:45 +10:00
Andrew Tridgell
5aa54be718 GCS_MAVLink: send SCALED_PRESSURE3 for 3 baros 2015-09-14 14:27:42 +10:00
Andrew Tridgell
afe1fce94e GCS_MAVLink: regenerate headers 2015-09-14 14:27:42 +10:00
Andrew Tridgell
91623322f9 GCS_MAVLink: added SCALED_PRESSURE3 2015-09-14 14:27:41 +10:00
Andrew Tridgell
a5462fec0b AP_Baro: allow selection of primary barometer and add 3rd baro
this is useful for external I2C barometers on a PH2
2015-09-14 14:27:41 +10:00
Andrew Tridgell
61441ab35d HAL_Linux: fixed apm2 build 2015-09-14 14:22:16 +10:00
Andrew Tridgell
bf001f19ff HAL_Linux: don't panic on runtime failures 2015-09-14 14:22:16 +10:00
Andrew Tridgell
582318448f AP_HAL: make new GPIO functions optional
not available on all boards
2015-09-14 14:22:16 +10:00
Andrew Tridgell
e0db1ad93e AP_Notify: added support for raspilot LED 2015-09-14 14:22:16 +10:00