From a1fc7372d6352a5be0e7203594a92e84946196e5 Mon Sep 17 00:00:00 2001 From: Stanley Date: Fri, 1 Jul 2022 12:45:28 -0400 Subject: [PATCH] Fix avionics power on issue for Cessna 208B and Cessna 172 --- FsConnector/ActionEvent.cs | 3 ++- Provider/SimConnectManager.cs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/FsConnector/ActionEvent.cs b/FsConnector/ActionEvent.cs index 48b753a..6be84b9 100644 --- a/FsConnector/ActionEvent.cs +++ b/FsConnector/ActionEvent.cs @@ -4,6 +4,7 @@ { KEY_MASTER_BATTERY_SET, KEY_ALTERNATOR_SET, - KEY_TOGGLE_AVIONICS_MASTER + KEY_AVIONICS_MASTER_SET, // must have this dummy event register first for "TOGGLE_AVIONICS_MASTER" to work, weird! + KEY_TOGGLE_AVIONICS_MASTER, } } diff --git a/Provider/SimConnectManager.cs b/Provider/SimConnectManager.cs index fb8674c..ac742b5 100644 --- a/Provider/SimConnectManager.cs +++ b/Provider/SimConnectManager.cs @@ -68,6 +68,7 @@ namespace MSFSPopoutPanelManager.Provider _simConnector.TransmitActionEvent(ActionEvent.KEY_MASTER_BATTERY_SET, 1); Thread.Sleep(100); _simConnector.TransmitActionEvent(ActionEvent.KEY_TOGGLE_AVIONICS_MASTER, 1); + Thread.Sleep(100); } } @@ -78,6 +79,7 @@ namespace MSFSPopoutPanelManager.Provider _simConnector.TransmitActionEvent(ActionEvent.KEY_TOGGLE_AVIONICS_MASTER, 1); Thread.Sleep(100); _simConnector.TransmitActionEvent(ActionEvent.KEY_MASTER_BATTERY_SET, 0); + Thread.Sleep(100); _isPowerOnForPopOut = false; }