mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_Periph : CAN
Remove 100 times message counter to improve magnetometer performance. Tested and uavcan.equipment.ahrs.MagneticFieldStrength improves from 7msgs/sec to 75msgs/sec which is likely the output rate of the actual sensor.
This commit is contained in:
parent
49b0d46612
commit
1dc57c84c4
@ -693,11 +693,6 @@ void AP_Periph_FW::can_mag_update(void)
|
|||||||
if (last_mag_update_ms == compass.last_update_ms()) {
|
if (last_mag_update_ms == compass.last_update_ms()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
static uint8_t counter;
|
|
||||||
if (counter++ != 100) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
counter = 0;
|
|
||||||
|
|
||||||
last_mag_update_ms = compass.last_update_ms();
|
last_mag_update_ms = compass.last_update_ms();
|
||||||
const Vector3f &field = compass.get_field();
|
const Vector3f &field = compass.get_field();
|
||||||
|
Loading…
Reference in New Issue
Block a user