Beat Küng
800266741b
Merge pull request #12063 from PX4/fix_custom_tune
...
fix tunes: make sure a custom tune gets played
6 years ago
Alessandro Simovic
3d668d871b
tunes: don't let tune interrupt itself
6 years ago
mcsauder
31f23c1e76
Rename tune_control_s strength to volume to match Nuttx and Linux standard nomenclature for audio (loudness) control.
6 years ago
mcsauder
a6d186dfed
Rename Tunes::get_next_tune() to Tunes::get_next_note().
6 years ago
Mark Sauder
352be14bbe
Alphabetizing/standardizing orders in tunes.cpp and tunes.h files
...
- Remove a constructor overload by adding default values, and disambiguate a few variables by adding verbosity to naming.
6 years ago
Daniel Agar
2ffb49b734
delete px4_includes.h header and update boards/ to use syslog
6 years ago
David Sidrane
ab26bd76ff
tunes:Refactor for maintenance
...
Adds a single file definition to provide a single point to add
new tunes and clearly understand, the useage: it need to be
stopped will it not allow interruption.
7 years ago
Daniel Agar
ea3acb7121
cmake remove circular linking and reorganize
...
- px4_add_module now requires MAIN
- px4_add_library doesn't automatically link
7 years ago
Beat Küng
576f4e02da
tunes: fix constness for _default_tunes
...
_default_tunes was marked as 'const char *' array, which means the data
of the array was not actually const and thus landed in the data section
(so in RAM instead of FLASH).
The size of the array is 64 bytes.
7 years ago
Alessandro Simovic
9d3dfb7864
libtunes: addressing comments of #9117
7 years ago
Alessandro Simovic
6e1c495268
libtunes: added TUNE_MAX_STRENGTH
7 years ago
Alessandro Simovic
80d80835a0
libtunes: fixed some type conversions and other minor changes
7 years ago
Alessandro Simovic
92b89368f1
libtunes: fixed playback of string melodies
7 years ago
Alessandro Simovic
7d9b09b5e5
libtunes: made logic in Tunes::set_control() more obvious
7 years ago
Alessandro Simovic
4e479b7f04
libtunes: renamed config_tone() to reset()
7 years ago
Alessandro Simovic
6ce839ea1e
libtunes: added tone strength as state and output to libtunes
...
Since the tune library also contains logic how tunes can be overriden,
a user of the tunes library cannot know the strength of the current tune
without replicating some logic. Easy solution is to add strength to the
output of Tunes::get_next_tune().
7 years ago
Alessandro Simovic
acdc81ea0a
libtunes: cleanup / docs
7 years ago
Alessandro Simovic
d455c1e7e1
libtunes: Repeating tunes can be interrupted without override
...
Otherwise the only way of interrupting a repeated tune would be with the override flag, which should only be used rarely.
Now repeating tunes have lowest priority, followed by one-shot tunes, followed by anything with an override flag.
7 years ago
Alessandro Simovic
34836a2b21
libtunes: allow custom tune (id 0) to be used to stop playback.
...
Override flag must still be set to true!
7 years ago
Alessandro Simovic
2cf93df918
libtunes: _repeat was uninitialized. Defaulting to false now.
...
Bugfix: This fixes a bug where libtunes might indicate that there are more tones to play even after the last note of a tune.
7 years ago
Alessandro Simovic
f47443f283
libtunes: (bugfix) sending a custom msg tune overrides everything
...
Custom msg tune can override any tune playing, regardless of the tune_override flag.
7 years ago
Martina
be275b880b
tunes: add fallthrough macro
7 years ago
Simone Guscetti
879c698cab
libtunes: Change TuneID::ERROR in ERROR_TUNE
...
This prevents the expanction of the ERROR macro inside the TuneID enum
7 years ago
Simone Guscetti
4c6daf0748
libtunes: Update tunes and mkblctrl to use the tune_definition
7 years ago
Simone Guscetti
26b721ac8b
libtunes: Add new tune_definition file
7 years ago
Simone Guscetti
47e5382e7e
libtunes: insert explicit fallthrough
7 years ago
Simone Guscetti
9cb95b64ca
libtunes: change variable name
...
This make the variable purpose more clear.
7 years ago
Martina
2ec5ea48a3
tunes: for custom tunes set silence from tune control message and set
...
silence to 0 when the end of the string is reached
7 years ago
Martina
d5b2ba276b
tunes: change tune update interval to 100000 us
7 years ago
Martina
d10372c6b5
tunes: change config_tone definition and add pointer to the beginning
...
of the tune to repeat it
7 years ago
Martina
1988141c6d
tunes: add pointer to the beginning of a tune to allow tune replay
7 years ago
Simone Guscetti
26d2e69ecf
libtunes: Add maximum update interval
7 years ago
Simone Guscetti
f63be6b055
libtunes: If default tune does not exist
...
return -EINVAL
7 years ago
Simone Guscetti
915f728145
libtunes: Separate the default tunes from tunes.cpp
7 years ago
Simone Guscetti
591f9a8a38
libtunes: Handle notification tunes as high priority
7 years ago
Simone Guscetti
3f123acd7e
libtunes: handle tune override
7 years ago
Simone Guscetti
6c8b16391e
libtunes: complete API doc, minor changes
7 years ago
Simone Guscetti
b84a97c6d5
libtunes: Changed to a set_control/string and a get_next_tune functions
...
Now it is possible to set a string and a control.
The get_next_tune function use the same return values as the erliaer
implemented parse_cmd and parse_string functions.
7 years ago
Simone Guscetti
5214642bc3
tunes lib: Minor changes
7 years ago
Simone Guscetti
e9ea7ab698
lib tunes: clean up
7 years ago
Simone Guscetti
79ae413982
lib tunes: Add string input method
7 years ago
Simone Guscetti
8ce57bedb7
libtunes: create a new library for tunes
...
cmake configs: Modify to include new library
7 years ago