AP_IRLock: use millis/micros/panic functions

This commit is contained in:
Caio Marcelo de Oliveira Filho 2015-11-20 12:11:43 +09:00 committed by Randy Mackay
parent 2314578f6f
commit 87b9b4463e
1 changed files with 2 additions and 2 deletions

View File

@ -66,13 +66,13 @@ bool AP_IRLock_PX4::update()
_target_info[count].size_y = report.size_y; _target_info[count].size_y = report.size_y;
count++; count++;
_last_timestamp = report.timestamp; _last_timestamp = report.timestamp;
_last_update = hal.scheduler->millis(); _last_update = AP_HAL::millis();
} }
// update num_blocks and implement timeout // update num_blocks and implement timeout
if (count > 0) { if (count > 0) {
_num_targets = count; _num_targets = count;
} else if ((hal.scheduler->millis() - _last_update) > IRLOCK_TIMEOUT_MS) { } else if ((AP_HAL::millis() - _last_update) > IRLOCK_TIMEOUT_MS) {
_num_targets = 0; _num_targets = 0;
} }