Skip to content
Snippets Groups Projects
Commit 9d3dfb78 authored by Alessandro Simovic's avatar Alessandro Simovic Committed by Beat Küng
Browse files

libtunes: addressing comments of #9117

parent 6e1c4952
No related branches found
No related tags found
No related merge requests found
......@@ -89,7 +89,6 @@ int Tunes::set_control(const tune_control_s &tune_control)
{
// Sanity check
if (tune_control.tune_id >= _default_tunes_size) {
PX4_WARN("Tune ID not recognized.");
return -EINVAL;
}
......
......@@ -73,9 +73,6 @@ public:
*/
Tunes(unsigned default_tempo, unsigned default_octave, unsigned default_note_length, NoteMode default_mode);
/**
* Default destructor
*/
~Tunes() = default;
/**
......
......@@ -207,7 +207,11 @@ tune_control_main(int argc, char *argv[])
}
} else if (!strcmp(argv[myoptind], "libtest")) {
tunes.set_control(tune_control);
int ret = tunes.set_control(tune_control);
if (ret == -EINVAL) {
PX4_WARN("Tune ID not recognized.");
}
while (tunes.get_next_tune(frequency, duration, silence, strength) > 0) {
PX4_INFO("frequency: %d, duration %d, silence %d, strength%d",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment