mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-30 11:44:06 +08:00
stm32 tone_alarm: Remove stale documentation & cleanup
Since tune control came in this driver does not have a
have a test based interface. The module Documentation
has been moved to tune_control
minor cleanup and assert on workque delay of 0
This commit is contained in:
parent
ec25e4b913
commit
1fb7046052
@ -476,16 +476,11 @@ void ToneAlarm::next_note()
|
||||
|
||||
if (updated) {
|
||||
orb_copy(ORB_ID(tune_control), _tune_control_sub, &_tune);
|
||||
|
||||
if (_tunes.set_control(_tune) == 0) {
|
||||
_play_tone = true;
|
||||
|
||||
} else {
|
||||
_play_tone = false;
|
||||
}
|
||||
_play_tone = _tunes.set_control(_tune) == 0;
|
||||
}
|
||||
|
||||
unsigned frequency = 0, duration = 0;
|
||||
unsigned frequency = 0;
|
||||
unsigned duration = 0;
|
||||
|
||||
if (_play_tone) {
|
||||
_play_tone = false;
|
||||
@ -516,6 +511,7 @@ void ToneAlarm::next_note()
|
||||
}
|
||||
|
||||
// and arrange a callback when the note should stop
|
||||
assert(duration != 0);
|
||||
work_queue(HPWORK, &_work, (worker_t)&ToneAlarm::next_trampoline, this, USEC2TICK(duration));
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user