Commit Graph

14195 Commits

Author SHA1 Message Date
José Roberto de Souza
d985bffa1c AP_HAL_PX4: Map PX4_I2C_BUS_EXPANSION1 2017-08-04 09:07:50 -07:00
José Roberto de Souza
134f351a3e AP_HAL_PX4: aeorfc: Move GPS to UART7
The UART3 also have the I2C bus 2 functions so moving GPS to UART7 to
have one additional I2C.
To keep GPS working is also necessary update the FPGA RTL to version
0xC1 or higher.
2017-08-04 09:07:45 -07:00
Randy Mackay
458449eca8 AP_Proximity: SF40c driver treats zero distances as invalid 2017-07-12 11:46:23 +09:00
Michael du Breuil
33231bf9b5 AP_Math: Add is_negative and is_positive helpers 2017-07-12 11:46:23 +09:00
Michael du Breuil
7d2b8b6bde AP_GPS: Fix SBF race condition on start
Unsure what the underlying problem is, but the length of the first string in
the initilisation_blob increasing resulted in a race condition, waiting
longer before retrying the message resolves it, but we still need to identify
the underlying problem. This patch just results in the GPS working with current
configurations. Tested against AsteRx-M firmware 3.6.3
2017-07-12 11:46:22 +09:00
Randy Mackay
53368a2afd AP_GPS: Revert Don't autodetect NMEA instances
This reverts commit bea48e8711.
2017-07-11 18:10:14 +09:00
Randy Mackay
af032414f0 AP_NavEKF3: final mag reset at 2.5m 2017-07-08 09:52:38 +09:00
Randy Mackay
3b8038fe27 AP_NavEKF2: final mag reset at 2.5m 2017-07-08 09:52:36 +09:00
Lucas De Marchi
462334f605 AP_HAL: add HAL_OS_POSIX_IO for aerofc-v1
What aerofc-v1 doesn't have is an sdcard, but it has posix-like API as
it's running on top of NuttX.

(cherry picked from commit eb70dbc6f5)
2017-07-06 18:16:13 -07:00
Randy Mackay
49f618f07a AP_InertialSensor: increase accel filter to 20hz 2017-07-03 10:13:40 +09:00
Rob Ratcliff
b52e1e0d55 AP_GPS: fix bug when injecting messages bigger than 255 bytes
Commit 5261654 changed the used injection method so change this method signature to use uint16 for message length like previous injection method did
2017-07-03 10:12:33 +09:00
Leonard Hall
cdf7d26d5d AC_AttControl: save accel max using shorter set_and_save
no functional change
2017-07-03 10:11:45 +09:00
Leonard Hall
3fcd4517a1 AC_AttControl: add step input for autotune 2017-07-03 10:11:32 +09:00
priseborough
977b8b5653 AP_NavEKF3: Improve variable names and documentation
Also remove unnecessary calculation of innov * gain
2017-07-03 10:10:43 +09:00
priseborough
08ddae8882 AP_NavEKF3: Clean up aiding mode logic using switch statements 2017-07-03 10:10:40 +09:00
priseborough
b847a6e38c AP_NavEKF3: Fix bugs causing height drift when using range beacons 2017-07-03 10:10:38 +09:00
priseborough
618644addc AP_NavEKF3: Fix calculation of predicted LOS rate in terrain estimator 2017-07-03 10:09:45 +09:00
priseborough
01f959c1ab AP_NavEKF2: Fix calculation of predicted LOS rate in terrain estimator 2017-07-03 10:09:42 +09:00
priseborough
0d7d804bd5 AP_NavEKF3: Fix terrain estimator innovation consistency check 2017-07-03 10:09:09 +09:00
priseborough
fc36bd7874 AP_NavEKF2: Fix terrain estimator innovation consistency check 2017-07-03 10:09:06 +09:00
priseborough
647fb51688 AP_NavEKF3: Fix bug in flow fusion for terrain estimation
Also remove unused class variables
2017-07-03 10:09:03 +09:00
priseborough
19ef7e6d96 AP_NavEKF2: Fix bug in flow fusion for terrain estimation
Also remove unused class variables
2017-07-03 10:09:01 +09:00
Michael du Breuil
bea48e8711 AP_GPS: Don't autodetect NMEA instances 2017-07-03 10:08:31 +09:00
priseborough
aafacd0f8e AP_GPS: Fix bug in calculation of blended GPS delay 2017-07-03 09:42:15 +09:00
Randy Mackay
a0d1b3b19a AP_Beacon: fix pozyx west-east processing 2017-06-15 10:33:50 +09:00
Randy Mackay
f8b5714ced DataFlash: protect against large testRatio from EKF
This should be resolved in the EKF but for now this stops the floating point exception
2017-06-15 10:33:45 +09:00
Randy Mackay
a6982dedf0 AP_LandingGear: set pwm only when set_position called
Also simplify interface and internal state
2017-06-15 10:33:17 +09:00
Randy Mackay
7a5ef83d53 LandingGear: remove unused enabled method
Also minor formatting fix
2017-06-15 10:33:12 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
cc632a2825 AP_LandingGear: Improve the PWM parameters descriptions 2017-06-15 10:32:01 +09:00
Peter Barker
bf6e7ba6ec DataFlash: correct dataflash examples 2017-06-15 10:29:15 +09:00
Peter Barker
268d6523e9 DataFlash: check all backends for sensor health 2017-06-15 10:29:05 +09:00
Peter Barker
cc7d75ea5d DataFlash: StartUnstartedLogging replaces logging_started/start_logging 2017-06-15 10:28:49 +09:00
Peter Barker
c9a4a6d772 DataFlash: eliminate calls to manipulate _writes_enabled 2017-06-15 10:28:23 +09:00
Peter Barker
9464bc6173 DataFlash: create a WritesOK method for WritePrioritisedBlock 2017-06-15 10:28:11 +09:00
Peter Barker
694b42c8f4 AP_BoardConfig: add public method returning true if on sensor error 2017-06-15 10:27:20 +09:00
murata
894b759149 AP_Notify: Change to the value of boolean. 2017-06-15 10:26:19 +09:00
Matt
fc3406d07f AP_Notify: OreoLED rework
Reworked the process flow.  Created the aviation vs rover themes.
Created visual operator feedback for prearm checks, GPS, EKF, gyro init,
radio failsafe, and low battery. This also includes work by Hugh Eaves
to open up the full extended properties of the Oreo LEDs.  Not only are
far more functions available, but you can override and do custom things
via mavlink.
2017-06-15 10:26:06 +09:00
Matt
ddd327e365 AP_Notify: Complete rework of notify device selection
Jaime did the hard work on this one.  He reworked notify device
selection to take place on init rather than on compile like before.  The
notify decivces are mostly set on compile using preprocessor directives
based on board type.  I created NTF_OREO_THEME.  This will allow the
user to enable/disable the OreoLED driver. And it also allows you to
select between aircraft and rover lighting themes. This allows the Solo
to use the OreoLEDs, and doesn't waste the memory on vehicles not
equipped with Oreo LEDs. The OreoLED driver is restricted to Pixhawk 2
FCs by proprocessor directive due to memory constraints. So it will
never work by accident on another board.

There is also a new notify flag for GPS Fusion.  This flag is true when
the EKF is happy with the GPS, actively using it for position
information.
2017-06-15 10:26:03 +09:00
Peter Barker
4adf8a83a6 AP_Notify: remove non-required initialisation of variables
These objects are dynamically allocated, and we zero the memory
as we allocate them
2017-06-15 10:25:38 +09:00
Peter Barker
49b8d8319c AP_Notify: simplify scrolling code 2017-06-15 10:25:35 +09:00
mirkix
d106726dee AP_Notify: enable display for BeagleBone Blue 2017-06-15 10:25:24 +09:00
Matt
61931fd326 AP_AHRS: Set the new gps_fusion notify flag
Uses EKF filter state to set the new gps_fusion notify flag. This allows
the GCS and notify devices to specifically be notified if the GPS is or
is not usable.
2017-06-15 10:13:41 +09:00
Matt
22d0f41b1b AP_Notify: Remove solo specific tones, align with px4 tones
Evaluated solo specific tones file vs standard px4 tones files.  The
only thing the Solo had that standard ArduPilot does not have is the GPS
unplugged tone and the power off tone.
* Some tones have a different tune, which is fine. We want the Solo to
sound like ArduPilot if it is running ArduPilot.
* GPS unplugged tone abandoned. Determined to be unnecessary.
* Power off tone merged into standard px4 tones file. Smart battery
signalling a power off will make use of this tone. Has application for
any smart battery equipped vehicle, not just Solo.
* Removed all references and dependencies to `ToneAlarm_PX4_Solo.cpp`
and `ToneAlarm_PX4_Solo.h`
* Deleted `ToneAlarm_PX4_Solo.cpp` and `ToneAlarm_PX4_Solo.h` since
they're no longer needed.
2017-06-15 10:13:38 +09:00
priseborough
46b4c55fdc AP_NavEKF2: Fix bug in declination fusion 2017-06-15 10:12:57 +09:00
mirkix
b4c1ecf9ce AP_HAL: BeagleBone Blue fix HMC5843 I2C bus number 2017-06-15 10:12:13 +09:00
mirkix
5cf9b1e985 AP_Compass: BeagleBone Blue add external compass HMC5843 2017-06-15 10:12:10 +09:00
Leonard Hall
23f594ef7d AP_InertialSensor: reduce accel filter to 10hz 2017-06-15 10:11:50 +09:00
Leonard Hall
406a7739a6 AC_AttControl: adjust default rate IMAX and Yaw Filt
Increase Roll, Pitch and Yaw IMAX from 0.444 or 0.222 to 0.5
Decrease Yaw Filter from 5hz to 2.5hz based on the results of autotunes on many vehicles which always seems to produce values between 2 and 3hz
2017-06-15 10:11:43 +09:00
Randy Mackay
b43f23561f AP_Proximity: validate range finder distances 2017-06-15 10:11:03 +09:00
murata
4dc3833a4e AP_Avoidance: Change the determination place of the index value. 2017-06-15 10:10:06 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
f97c76cbd9 AC_WPNav: correct min limit 2017-06-15 10:08:48 +09:00
Michael du Breuil
78a463472d AP_Mission: Prohibit resuming mission waypoints that are no longer in the mission 2017-05-25 12:02:45 +09:00
Andrew Tridgell
6ce42a429b AP_BoardConfig: drop target temperature for cube to 45
getting to 60 was taking far too long (15 minutes or so). 45 is more
achievable.

This is a result of the fix to the invensense temperature detection
code
2017-05-25 11:30:40 +09:00
Andrew Tridgell
0ce9b9ded4 AP_BoardConfig: cope with bad config of pixhawk2
don't allow FMUv2 firmware on cube, and force temperature if incorrect
2017-05-25 11:30:32 +09:00
Lucas De Marchi
d062b5b8f2 AP_HAL_Linux: RCInput_RPI: ignore unwanted signals
We are setting a termination handler for some signals which are of not
interest.  Just ignore them.  Ignoring SIGWINCH allows for example to
run on a screen and change the window size later without killing
ardupilot.
2017-05-25 11:28:41 +09:00
Lucas De Marchi
c1984451e7 AP_HAL_Linux: Scheduler: increase stack for scheduler threads
RPI-based boards that use RCInput_RPI need more stack space otherwise we
end up with stack corruption. This leads to crash particularly when also
using GPIO_RPI since it may change what that driver is poking on memory.

This increases stack size to 1M which is overkill for most of other
boards with a more controllable stack usage. However this exposes that
on multiple different HWs a single point for stack size decision may not
be the best.  This can be improved in future.
2017-05-25 11:28:38 +09:00
Randy Mackay
f618359041 AC_WPNav: sanity check wpnav-radius
Occasionally users accidentally set the wpnav-radius to 0 and the vehicle gets stuck at waypoints
2017-05-25 11:27:28 +09:00
Randy Mackay
945a7bfaed AP_Beacon: minor formatting fixes for marvelmind 2017-05-25 11:26:38 +09:00
Karthik Desai
4daba8e98a AP_Beacon: order the stationary beacons in ascending order of address 2017-05-25 11:26:35 +09:00
Karthik Desai
677aa88e33 AP_Beacon: transform Marvelmind ENU to ArduPilot NED coordinates
Cache beacon positions to speed-up distance calculations
Only pass data to EKF after both hedgehog and beacon positions are known
Add license and credit Marvelmind
Re-order code around to minimize diff with upstream marvelmind code
Integrated review requests
2017-05-25 11:26:33 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
43f22cf502 AP_Beacon: added units in the comments documentation, to make the API easier to use 2017-05-25 11:26:31 +09:00
karthik.desai
653ecfc4cb AP_SerialManager: Rename Pozyx Beacon to Beacon 2017-05-25 11:26:28 +09:00
Peter Barker
6105452ccb GCS_MAVLink: count parameters in param thread
This helps avoid counting parameters on the main thread,
avoiding long-loops
2017-05-15 14:23:34 +09:00
Andrew Tridgell
37166301c9 HAL_PX4: use sensor_config_error() 2017-05-03 11:37:02 +10:00
Andrew Tridgell
cbea29ad71 AP_Baro: use sensor_config_error() 2017-05-03 11:37:01 +10:00
Andrew Tridgell
e32e2f5b5d AP_BoardConfig: added sensor_config_error()
used to notify user of fatal sensor setup error
2017-05-03 11:37:01 +10:00
Randy Mackay
bffc5daeb0 AC_WPNav: unset yaw when setting new origin and destination
This ensures that old yaw targets are not used in the short interval before they are initialised in advance_wp_target_along_track or advance_spline_along_track
2017-05-03 09:15:01 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
1691a39b36 AP_GPS: spell in comments 2017-05-03 08:45:08 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
23b7f1e645 AP_NavEKF3: Improve comments, typos 2017-05-03 08:45:01 +09:00
Dr.-Ing. Amilcar Do Carmo Lucas
ce37517268 AP_NavEKF2: Improve comments, typos 2017-05-03 08:44:49 +09:00
Pierre Kancir
a6eb337438 AP_Notify: remove unused variables 2017-05-02 18:14:40 +01:00
Andrew Tridgell
bfd8d151c8 AP_InertialSensor: lower slave rate with fast sampling
On an invensense IMU with fast sampling we need to lower the slave
sample rate for slave sensors such as the built-in AK8963 compass on a
MPU9250.

The slave rate is set as a multiple of the main rate, so it needs to be
much lower for fast sampling. If we leave it high then it greatly
impacts on IMU sample rate.

Without this change a MPU9250 with fast sampling and a compass enabled
will give a gyro rate of around 7200Hz. With this change it gets 7760Hz
2017-05-02 12:11:08 +10:00
Peter Barker
ece0e84ddf AP_Notify: reindent (NFC) 2017-05-02 08:50:41 +10:00
Peter Barker
ce5739f1a0 AP_Notify: remove semaphores protecting pixels
The semaphore-take-forevers were absolutely killing performance.

We can take some random pixel corruption to avoid vehicles crashing.
2017-05-02 08:50:41 +10:00
Andrew Tridgell
519a293af9 AP_InertialSensor: fixed instance usage in set_gyro_oversampling()
thanks Francisco!
2017-05-02 08:27:11 +10:00
Andrew Tridgell
112b22516a AP_InertialSensor: fixed use of accel2_noise
thanks Francisco!
2017-05-02 08:24:50 +10:00
Peter Barker
a3f4a523b2 AP_Notify: convert unknown characters to spaces 2017-05-01 16:21:55 +01:00
Peter Barker
5a02219642 AP_HAL_Linux: use HAL_SEMAPHORE_BLOCK_FOREVER 2017-05-01 15:05:51 +01:00
Peter Barker
3ff4cd8c07 AP_HAL_PX4: use HAL_SEMAPHORE_BLOCK_FOREVER 2017-05-01 15:05:51 +01:00
Peter Barker
b11ca5d538 AP_HAL_QURT: use HAL_SEMAPHORE_BLOCK_FOREVER 2017-05-01 15:05:51 +01:00
Peter Barker
2f79a5bd90 AP_HAL_SITL: use HAL_SEMAPHORE_BLOCK_FOREVER 2017-05-01 15:05:51 +01:00
Peter Barker
85e5de15c4 AP_HAL_VRBRAIN: use HAL_SEMAPHORE_BLOCK_FOREVER 2017-05-01 15:05:51 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
5b67b33310 AP_GPS: Remove un-used AP_GPS::inject_data_all() function 2017-05-01 13:06:18 +01:00
Dr.-Ing. Amilcar Do Carmo Lucas
5261654756 AP_GPS: Only inject RTCM data to the selected GPS device defined in GPS_INJECT_TO parameter 2017-05-01 13:06:18 +01:00
Michael du Breuil
12f83ecf75 AP_GPS: SBF if RAW_DATA is enabled check that the GPS is succeeding at logging 2017-05-01 13:04:52 +01:00
Peter Barker
ac1484f60e DataFlash: clear format sent mask when backend starts new log 2017-05-01 19:16:47 +10:00
Andrew Tridgell
2876f1467c AP_InertialSensor: converge sensor rate quickly, then slowly
converge fast for the first 60 seconds, then more slowly to reduce
noise
2017-05-01 15:13:56 +10:00
Andrew Tridgell
db25b6e966 AP_InertialSensor: estimate and log sensor rates for all IMUs
this adds IMU.GHz and IMU.AHz log fields so we can see the actual
observed sensor rates of each IMU
2017-05-01 15:06:46 +10:00
Andrew Tridgell
0a83281a29 DataFlash: added logging of actual sensor rates 2017-05-01 15:06:46 +10:00
Andrew Tridgell
49cc0965c0 AP_InertialSensor: separate handling of FIFO and non-FIFO sensors
FIFO sensors produce data at a well known rate, but samples come in
bunches, so we can't use the system clock to calculate deltaT.

non-FIFO sensors produce data when we sample them, but that rate is
less regular due to timing jitter.

For FIFO sensors this changes makes us use a learned sample rate,
which allows for different clock speeds on sensor and system board.

For non-FIFO sensors we use the system clock to measure deltaT

the overall effect is a fix for sensors that produce samples at other
than the claimed datasheet rate.
2017-05-01 15:06:46 +10:00
Andrew Tridgell
74eb7a7243 AP_InertialSensor: make SITL sensor rate match a Pixhawk1
use 760Hz 2nd gyro and 800 Hz 2nd accel
2017-05-01 15:06:46 +10:00
Andrew Tridgell
25cd16a275 AP_InertialSensor: fixed LSM303D registered sample rate
we are running the LSM303D at 1600Hz, and are sampling it at 1kHz. We
need to tell the AP_InertialSensor layer that samples will arrive at 1kHz
2017-05-01 15:06:46 +10:00
Andrew Tridgell
28030dd85c AP_AHRS: use SIM_ODOM_ENABLE to enable visual odom in SITL 2017-05-01 15:06:46 +10:00
Andrew Tridgell
67404e9660 SITL: added SIM_ODOM_ENABLE
for enabling visual odomotry simulated data
2017-05-01 15:06:46 +10:00
Andrew Tridgell
56aa467d60 AP_Scheduler: adjust debug levels
this is more useful for performance analysis of scheduler, using perf
command
2017-05-01 15:02:34 +10:00
Andrew Tridgell
5c62e4f4c2 GCS_MAVLink: don't use more than 1ms sending parameters
this reduces the scheduling misses when fetching parameters initially
2017-05-01 14:37:15 +10:00
Andrew Tridgell
f465c37c65 GCS_MAVLink: added async parameter sending 2017-05-01 14:37:13 +10:00
Andrew Tridgell
5c4ca3bf0b GCS_MAVLink: added send_queued_parameters() 2017-05-01 14:36:52 +10:00
Andrew Tridgell
f778954b84 GCS_MAVLink: split parameter functions into a separate file 2017-05-01 14:36:10 +10:00
Andrew Tridgell
60e4c0eb98 AP_Param: make count_parameters() thread safe 2017-05-01 14:36:10 +10:00