diff --git a/src/lib/tunes/tunes.cpp b/src/lib/tunes/tunes.cpp index 726cdcee7bec75604ebe0be21a42b72364b4c463..16be96efd5237d121325b65c2ca0c7674259bdd8 100644 --- a/src/lib/tunes/tunes.cpp +++ b/src/lib/tunes/tunes.cpp @@ -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; } diff --git a/src/lib/tunes/tunes.h b/src/lib/tunes/tunes.h index 3b62553ebe2064f7b43ba06762617488ad61c7da..d50efb21dc3141784539a9637a2c8d49fda0e6d5 100644 --- a/src/lib/tunes/tunes.h +++ b/src/lib/tunes/tunes.h @@ -73,9 +73,6 @@ public: */ Tunes(unsigned default_tempo, unsigned default_octave, unsigned default_note_length, NoteMode default_mode); - /** - * Default destructor - */ ~Tunes() = default; /** diff --git a/src/systemcmds/tune_control/tune_control.cpp b/src/systemcmds/tune_control/tune_control.cpp index f3d9a42255d34efda392cd9526eb04feb6c0907d..cb1e8b156eb4dec85883adc147f28d0b9aea1278 100644 --- a/src/systemcmds/tune_control/tune_control.cpp +++ b/src/systemcmds/tune_control/tune_control.cpp @@ -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",