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

Fix Warning Repeat Time #3445

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Conversation

robertlong13
Copy link
Collaborator

@robertlong13 robertlong13 commented Nov 12, 2024

The RepeatTime setting was also the worst-case detection time

As implemented, no matter what, the condition is checked every RepeatTime seconds. At the default time of 10, this means it could take up to 10s before the warning manager tells you that something bad happened. On average it takes 5.

This fixes it so the last repeat time only gets recorded when the check returns true. So, after this function returns true, it will not check again for another RepeatTime seconds.

Also a driveby fix of the initialization of the _speech member of the warning engine. It was always initializing to null due to being initialized before the user's speech settings were loaded.

Needs to come after the speechEnable setting is loaded
The RepeatTime setting was also the worst-case detection time
@meee1 meee1 merged commit b5a456f into ArduPilot:master Nov 12, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants