AP_Notify: use millis/micros/panic functions
This commit is contained in:
parent
8d882b06dd
commit
daee8e8e76
@ -97,11 +97,11 @@ void Buzzer::update()
|
||||
case ARMING_BUZZ:
|
||||
// record start time
|
||||
if (_pattern_counter == 1) {
|
||||
_arming_buzz_start_ms = hal.scheduler->millis();
|
||||
_arming_buzz_start_ms = AP_HAL::millis();
|
||||
on(true);
|
||||
} else {
|
||||
// turn off buzzer after 3 seconds
|
||||
if (hal.scheduler->millis() - _arming_buzz_start_ms >= BUZZER_ARMING_BUZZ_MS) {
|
||||
if (AP_HAL::millis() - _arming_buzz_start_ms >= BUZZER_ARMING_BUZZ_MS) {
|
||||
_arming_buzz_start_ms = 0;
|
||||
on(false);
|
||||
_pattern = NONE;
|
||||
|
@ -88,7 +88,7 @@ bool ToneAlarm_PX4::init()
|
||||
// play_tune - play one of the pre-defined tunes
|
||||
void ToneAlarm_PX4::play_tone(const uint8_t tone_index)
|
||||
{
|
||||
uint32_t tnow_ms = hal.scheduler->millis();
|
||||
uint32_t tnow_ms = AP_HAL::millis();
|
||||
const Tone &tone_requested = _tones[tone_index];
|
||||
|
||||
if(tone_requested.continuous) {
|
||||
@ -114,7 +114,7 @@ void ToneAlarm_PX4::stop_cont_tone() {
|
||||
}
|
||||
|
||||
void ToneAlarm_PX4::check_cont_tone() {
|
||||
uint32_t tnow_ms = hal.scheduler->millis();
|
||||
uint32_t tnow_ms = AP_HAL::millis();
|
||||
// if we are supposed to be playing a continuous tone,
|
||||
// and it was interrupted, and the interrupting tone has timed out,
|
||||
// resume the continuous tone
|
||||
|
Loading…
Reference in New Issue
Block a user