Commit Graph

27522 Commits

Author SHA1 Message Date
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 b3ce03bfb0 Sub: stop appending lf to PERF message 2017-05-01 16:21:55 +01:00
Peter Barker 378015691b Plane: stop appending lf to PERF message 2017-05-01 16:21:55 +01:00
Peter Barker b37e64b23c Copter: stop appending lf to PERF message 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
Peter Barker f130b4a580 Tracker: move init of DataFlash references into vehicle init
This makes it look like the other vehicle types
2017-05-01 15:04:34 +01:00
Peter Barker 652292e5c0 Sub: move init of DataFlash references into vehicle init
It is possible to start a log before the existing codepath is crossed.
2017-05-01 15:04:34 +01:00
Peter Barker 74e0d6c60a Rover: move init of DataFlash references into vehicle init
It is possible to start a log before the existing codepath is crossed.
2017-05-01 15:04:34 +01:00
Peter Barker 084242cf03 Plane: move init of DataFlash references into vehicle init
It is possible to start a log before the existing codepath is crossed.
2017-05-01 15:04:34 +01:00
Peter Barker 069e0d1973 Copter: move init of DataFlash references into vehicle init
It is possible to start a log before the existing codepath is crossed.
2017-05-01 15:04:34 +01:00
Peter Barker ee16205438 Tools: ardupilotwaf: include startup tone in ROMFS 2017-05-01 13:28:27 +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
Andrew Tridgell 708b483d77 Plane: prepare for 3.8.0beta5 2017-05-01 20:30:32 +10:00
Peter Barker 6ccb7cf3f4 Copter: tidy dataflash Frame reporting 2017-05-01 19:16:47 +10: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 58861eb51c Sub: use common send_queued_parameters() 2017-05-01 14:36:10 +10:00
Andrew Tridgell 2706c9d57a Plane: use common send_queued_parameters() 2017-05-01 14:36:10 +10:00
Andrew Tridgell 22791b7272 Copter: use common send_queued_parameters() 2017-05-01 14:36:10 +10:00
Andrew Tridgell 37585f213a Rover: use common send_queued_parameters() 2017-05-01 14:36:10 +10:00
Andrew Tridgell 005797c327 AntennaTracker: use common send_queued_parameters() 2017-05-01 14:36:10 +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
Andrew Tridgell 49b18819ce Copter: enable channels in ESC calibration 2017-05-01 14:32:18 +10:00
Andrew Tridgell 84114d067a SRV_Channels: added SRV_Channels::enable_by_mask() 2017-05-01 14:32:18 +10:00
Andrew Tridgell 2c4975ba31 AP_Motors: removed cork/push from AP_Motors
should be done by vehicle code if needed, so that AUX servos are sent
at the same time
2017-05-01 14:32:18 +10:00
Andrew Tridgell 5c028897a3 HAL_VRBrain: cope with nested cork/push 2017-05-01 14:32:18 +10:00
Andrew Tridgell 266f99db93 HAL_QURT: cope with nested cork/push 2017-05-01 14:32:18 +10:00