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 May 16, 2024
1 parent 1e2e535 commit adfbddb
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 @@ -398,6 +398,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 adfbddb

Please sign in to comment.