mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 10:17:45 +08:00
samv7:tone_alarm cleanup
This commit is contained in:
committed by
Lorenz Meier
parent
1306e28874
commit
75d7800deb
@@ -388,13 +388,7 @@ void ToneAlarm::next_note()
|
|||||||
|
|
||||||
if (updated) {
|
if (updated) {
|
||||||
orb_copy(ORB_ID(tune_control), _tune_control_sub, &_tune);
|
orb_copy(ORB_ID(tune_control), _tune_control_sub, &_tune);
|
||||||
|
_play_tone = _tunes.set_control(_tune) == 0;
|
||||||
if (_tunes.set_control(_tune) == 0) {
|
|
||||||
_play_tone = true;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
_play_tone = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned frequency = 0, duration = 0;
|
unsigned frequency = 0, duration = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user