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

tunes: Pause alarm delimiters in tune_control #20541

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

muramura
Copy link
Contributor

@muramura muramura commented Nov 3, 2022

Describe problem solved by this pull request

The tune_control command set off a standard PX4 alarm.

https://github.com/PX4/PX4-Autopilot/blob/main/src/lib/tunes/tune_definition.desc#L95
https://github.com/PX4/PX4-Autopilot/blob/main/src/lib/tunes/tune_definition.desc#L96

After two alarms were executed, it hung.

  1. no alarm.
  2. cannot be executed in succession.

This phenomenon occurs in HOLYBLO PIXHARK 5x and 6C. Other FCs are unknown.

Describe your solution

In the alarm pattern, N is specified as the alarm delimiter.
When this N was removed, it could be executed many times. However, the alarm delimiter is lost.
N and P are alarm delimiter designations.
I change N to P.

Describe possible alternatives

None.

Test data / coverage

I ran this many times with QGC's MAVLINK CONSOLE.

Additional context

none

Copy link
Contributor

@junwoo091400 junwoo091400 left a comment

Choose a reason for hiding this comment

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

Just small question in the comment!

Comment on lines +95 to +96
PX4_DEFINE_TUNE(7, BATTERY_WARNING_SLOW, "MBT100a8P", true /* battery warning slow */)
PX4_DEFINE_TUNE(8, BATTERY_WARNING_FAST, "MBT255a8a8a8a8a8a8a8a8a8a8a8a8a8a8a8a8P", true /* battery warning fast */)
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like the definition requires a number in the range of 1 ~ 64 for the duration of pause: http://www.vgmpf.com/Wiki/index.php?title=Microsoft_BASIC_MML

Any reason you didn't specify the definition?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@junwoo091400 san. I have matched it to ERROR_TUNE.

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.

None yet

2 participants