ArduPilot / MissionPlanner

Mission Planner Ground Control Station for ArduPilot (c# .net)
http://ardupilot.org/planner/
GNU General Public License v3.0
1.81k stars 2.42k forks source link

CurrentState: honor MAVLinkInterface.speechenable #3258

Closed robertlong13 closed 2 months ago

robertlong13 commented 11 months ago

Some speech events, like mode changes, fire off on all connected com ports, not just the primary. Additionally, CurrentState ignores the speechenable flag of the MAVLinkInterface that it's attached to, causing it to go off even for interfaces that are supposed to be silent.

This PR makes CurrentState honor the speechenable flag. Additionally, it sets speechenable on an interface when MainV2.comPort is set to that interface, and clears speechenable on the old interface that MainV2.comPort was pointing to.

EosBandi commented 10 months ago

What about multi vehicle configurations ? Speech is the only feedback for changes on a non selected vehicle and this disables it as well...

robertlong13 commented 10 months ago

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.

robertlong13 commented 6 months ago

@EosBandi and @meee1, thoughts on this? If you think it's best to default it so that all connections speak normally, I can reduce this PR to just fix it so that speechenable works correctly.

robertlong13 commented 6 months ago

@meee1, I have decided to limit the scope of this PR to just the bugfix. I can handle silencing/unsilencing in a plugin.

robertlong13 commented 2 months ago

@meee1 @EosBandi, any issues with this now that it's just a 2-line bugfix?

EosBandi commented 2 months ago

I'm okay with it, but the decision to merge is ultimately up to Michael.