Skip to content

Commit

Permalink
MainV2: fix WarningEngine speech init
Browse files Browse the repository at this point in the history
Needs to come after the speechEnable setting is loaded
  • Loading branch information
robertlong13 authored and meee1 committed Nov 12, 2024
1 parent bdfbe6e commit b8a5cc9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions MainV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -747,12 +747,6 @@ public MainV2()
{
}

Warnings.CustomWarning.defaultsrc = comPort.MAV.cs;
Warnings.WarningEngine.Start(speechEnable ? speechEngine : null);
Warnings.WarningEngine.WarningMessage += (sender, s) => { MainV2.comPort.MAV.cs.messageHigh = s; };

Warnings.WarningEngine.QuickPanelColoring += WarningEngine_QuickPanelColoring;

// proxy loader - dll load now instead of on config form load
new Transition(new TransitionType_EaseInEaseOut(2000));

Expand Down Expand Up @@ -1021,6 +1015,11 @@ public MainV2()
{
}

Warnings.CustomWarning.defaultsrc = comPort.MAV.cs;
Warnings.WarningEngine.Start(speechEnable ? speechEngine : null);
Warnings.WarningEngine.WarningMessage += (sender, s) => { MainV2.comPort.MAV.cs.messageHigh = s; };
Warnings.WarningEngine.QuickPanelColoring += WarningEngine_QuickPanelColoring;

if (CurrentState.rateattitudebackup == 0) // initilised to 10, configured above from save
{
CustomMessageBox.Show("NOTE: your attitude rate is 0, the hud will not work\nChange in Configuration > Planner > Telemetry Rates");
Expand Down

0 comments on commit b8a5cc9

Please sign in to comment.