drivers/differential_pressure move all to px4 work queue

This commit is contained in:
Daniel Agar
2019-05-24 12:58:55 -04:00
parent 83d3ead821
commit e1bc975065
8 changed files with 36 additions and 73 deletions
@@ -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;