samv7:tone_alarm cleanup

This commit is contained in:
David Sidrane
2018-08-20 13:00:38 -07:00
committed by Lorenz Meier
parent 1306e28874
commit 75d7800deb
+1 -7
View File
@@ -388,13 +388,7 @@ 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;