AP_Rangefinder: request measurement for timer routine to collect

the timer routing attempts to read a reading off the bus straihgt-up, but after initialisation the sensor will not be attempting to provide one, so this will always fail.

Request a sample as the last thing we do in the init routine
This commit is contained in:
Peter Barker 2025-02-19 13:40:55 +11:00 committed by Andrew Tridgell
parent e17c3127b1
commit cf1a1ec88b

View File

@ -97,6 +97,9 @@ bool AP_RangeFinder_TeraRangerI2C::init(void)
return false; return false;
} }
// ask for a new reading for the timer to collect:
measure();
dev->get_semaphore()->give(); dev->get_semaphore()->give();
dev->set_retries(1); dev->set_retries(1);