mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 11:13:34 +08:00
drivers/differential_pressure move all to px4 work queue
This commit is contained in:
@@ -272,7 +272,7 @@ MS5525::collect()
|
||||
}
|
||||
|
||||
void
|
||||
MS5525::cycle()
|
||||
MS5525::Run()
|
||||
{
|
||||
int ret = PX4_ERROR;
|
||||
|
||||
@@ -292,11 +292,10 @@ MS5525::cycle()
|
||||
_collect_phase = false;
|
||||
|
||||
// is there a collect->measure gap?
|
||||
if (_measure_ticks > USEC2TICK(CONVERSION_INTERVAL)) {
|
||||
if (_measure_interval > CONVERSION_INTERVAL) {
|
||||
|
||||
// schedule a fresh cycle call when we are ready to measure again
|
||||
work_queue(HPWORK, &_work, (worker_t)&Airspeed::cycle_trampoline, this,
|
||||
_measure_ticks - USEC2TICK(CONVERSION_INTERVAL));
|
||||
ScheduleDelayed(_measure_interval - CONVERSION_INTERVAL);
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -315,5 +314,5 @@ MS5525::cycle()
|
||||
_collect_phase = true;
|
||||
|
||||
// schedule a fresh cycle call when the measurement is done
|
||||
work_queue(HPWORK, &_work, (worker_t)&Airspeed::cycle_trampoline, this, USEC2TICK(CONVERSION_INTERVAL));
|
||||
ScheduleDelayed(CONVERSION_INTERVAL);
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ private:
|
||||
* Perform a poll cycle; collect from the previous measurement
|
||||
* and start a new one.
|
||||
*/
|
||||
void cycle() override;
|
||||
void Run() override;
|
||||
|
||||
int measure() override;
|
||||
int collect() override;
|
||||
|
||||
Reference in New Issue
Block a user