Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libtunes improvements #9096

Merged
merged 10 commits into from
Mar 19, 2018
Merged

libtunes improvements #9096

merged 10 commits into from
Mar 19, 2018

Conversation

potaito
Copy link
Contributor

@potaito potaito commented Mar 16, 2018

These are a few small baby steps towards improving libtunes:

  • Moved the tune IDs from the message definition to a separate file src/lib/tunes/tune_definition.h. This might facilitate custom implementations with different tune IDs for branding PX4.
  • Simplifications for src/drivers/drv_tone_alarm.h
  • Simplifications for src/lib/tunes/tunes.cpp
  • "Modernizing" src/systemcmds/tests/test_hrt.c

I don't currently have px4 hardware with buzzers at hand. Someone please test before merging!

@simonegu FYI

@potaito potaito force-pushed the pr-libtunes-improvements branch from 23b4e1a to 7e6e065 Compare March 16, 2018 14:05
@potaito potaito self-assigned this Mar 16, 2018
bkueng
bkueng previously approved these changes Mar 19, 2018
Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed & tested on fmu-v5, tunes still work.

While at it, can you please remove the duplicated startup tune in commander (line https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp#L1532 and https://github.com/PX4/Firmware/blob/master/src/modules/commander/commander.cpp#L1538) - the startup tone is already in the ROMFS.

Addressing review comments in PR #9096
Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was quick, thanks!

@potaito
Copy link
Contributor Author

potaito commented Mar 19, 2018

@bkueng Thanks for the review!

While at it, can you please remove the duplicated startup tune in commander

Good point, that also caused some problems for me in the past where the tune playback was chopped up because of the duplicate. I removed it in the new commit if you want to give it another test :)

Edit: argh you were faster 😄

@bkueng bkueng merged commit cd25083 into master Mar 19, 2018
@bkueng bkueng deleted the pr-libtunes-improvements branch March 19, 2018 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants