-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
CurrentState: honor MAVLinkInterface.speechenable #3258
CurrentState: honor MAVLinkInterface.speechenable #3258
Conversation
What about multi vehicle configurations ? Speech is the only feedback for changes on a non selected vehicle and this disables it as well... |
I was thinking about this in the context of multi vehicle applications too. "Mode changed to X", "Heading to Waypoint X", without any indication of which vehicle it came from, is, at best, unhelpful. At worst, it's overwhelming vocal spam. Especially if you have a large swarm. If that's not convincing, then I can reduce this PR to just making CurrentState honor the speechenable flag. That way plugins have the ability to control it, and we can add options for the stock behavior in the future. |
54049d1
to
adfbddb
Compare
MainV2.cs
Outdated
|
||
// Disable speech on old port and enable it on the new one | ||
if (_comPort != null) _comPort.speechenabled = false; | ||
if (value != null) value.speechenabled = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if it was disabled before hand?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, we don't disable this on any interfaces that we also set as MainV2.comPort
. I can't imagine a case where we want some interfaces to speak but don't want the currently selected interface to speak (if you want no interfaces to speak, this doesn't override the global Speech.speechEnable
)
I can definitely see that the hard-coding of false on the old port, is pretty limiting though.
b7baa03
to
ce8ae41
Compare
@meee1, I have decided to limit the scope of this PR to just the bugfix. I can handle silencing/unsilencing in a plugin. |
ce8ae41
to
f00dd6d
Compare
I'm okay with it, but the decision to merge is ultimately up to Michael. |
Some speech events, like mode changes, fire off on all connected com ports, not just the primary. Additionally,
CurrentState
ignores thespeechenable
flag of theMAVLinkInterface
that it's attached to, causing it to go off even for interfaces that are supposed to be silent.This PR makes
CurrentState
honor thespeechenable
flag. Additionally, it setsspeechenable
on an interface whenMainV2.comPort
is set to that interface, and clearsspeechenable
on the old interface thatMainV2.comPort
was pointing to.