Skip to content

Commit

Permalink
MainV2: silence comPort when switching to another
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 committed Dec 15, 2023
1 parent ce8ae41 commit 54049d1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions MainV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,11 @@ public static MAVLinkInterface comPort
{
if (_comPort == value)
return;

// Disable speech on old port and enable it on the new one
if (_comPort != null) _comPort.speechenabled = false;
if (value != null) value.speechenabled = true;

_comPort = value;
if (instance == null)
return;
Expand Down

0 comments on commit 54049d1

Please sign in to comment.