diff --git a/Joysticks/winwing_fcu_efisl.joystick.json b/Joysticks/winwing_fcu_efisl.joystick.json new file mode 100644 index 00000000..057341ff --- /dev/null +++ b/Joysticks/winwing_fcu_efisl.joystick.json @@ -0,0 +1,303 @@ +{ + "$schema": "./mfjoystick.schema.json", + "InstanceName": "WINWING FCU-320 + EFIS-320L", + "VendorId": "0x4098", + "ProductId": "0xBC1D", + "Inputs": [ + { + "Id": 1, + "Type": "Button", + "Label": "MACH Button" + }, + { + "Id": 2, + "Type": "Button", + "Label": "LOC Button" + }, + { + "Id": 3, + "Type": "Button", + "Label": "TRK Button" + }, + { + "Id": 4, + "Type": "Button", + "Label": "AP1 Button" + }, + { + "Id": 5, + "Type": "Button", + "Label": "AP2 Button" + }, + { + "Id": 6, + "Type": "Button", + "Label": "A/THR Button" + }, + { + "Id": 7, + "Type": "Button", + "Label": "EXPED Button" + }, + { + "Id": 8, + "Type": "Button", + "Label": "METRIC Button" + }, + { + "Id": 9, + "Type": "Button", + "Label": "APPR Button" + }, + { + "Id": 10, + "Type": "Button", + "Label": "SPD DEC" + }, + { + "Id": 11, + "Type": "Button", + "Label": "SPD INC" + }, + { + "Id": 12, + "Type": "Button", + "Label": "SPD PUSH" + }, + { + "Id": 13, + "Type": "Button", + "Label": "SPD PULL" + }, + { + "Id": 14, + "Type": "Button", + "Label": "HDG DEC" + }, + { + "Id": 15, + "Type": "Button", + "Label": "HDG INC" + }, + { + "Id": 16, + "Type": "Button", + "Label": "HDG PUSH" + }, + { + "Id": 17, + "Type": "Button", + "Label": "HDG PULL" + }, + { + "Id": 18, + "Type": "Button", + "Label": "ALT DEC" + }, + { + "Id": 19, + "Type": "Button", + "Label": "ALT INC" + }, + { + "Id": 20, + "Type": "Button", + "Label": "ALT PUSH" + }, + { + "Id": 21, + "Type": "Button", + "Label": "ALT PULL" + }, + { + "Id": 22, + "Type": "Button", + "Label": "VS DEC" + }, + { + "Id": 23, + "Type": "Button", + "Label": "VS INC" + }, + { + "Id": 24, + "Type": "Button", + "Label": "VS PUSH" + }, + { + "Id": 25, + "Type": "Button", + "Label": "VS PULL" + }, + { + "Id": 26, + "Type": "Button", + "Label": "ALT 100" + }, + { + "Id": 27, + "Type": "Button", + "Label": "ALT 1000" + }, + { + "Id": 28, + "Type": "Button", + "Label": "FD Button" + }, + { + "Id": 29, + "Type": "Button", + "Label": "T.O CONFIG Button" + }, + { + "Id": 33, + "Type": "Button", + "Label": "FD Left Button" + }, + { + "Id": 34, + "Type": "Button", + "Label": "LS Left Button" + }, + { + "Id": 35, + "Type": "Button", + "Label": "CSTR Left Button" + }, + { + "Id": 36, + "Type": "Button", + "Label": "WPT Left Button" + }, + { + "Id": 37, + "Type": "Button", + "Label": "VORD Left Button" + }, + { + "Id": 38, + "Type": "Button", + "Label": "NDB Left Button" + }, + { + "Id": 39, + "Type": "Button", + "Label": "ARPT Left Button" + }, + { + "Id": 40, + "Type": "Button", + "Label": "BARO Left PUSH" + }, + { + "Id": 41, + "Type": "Button", + "Label": "BARO Left PULL" + }, + { + "Id": 42, + "Type": "Button", + "Label": "BARO Left DEC" + }, + { + "Id": 43, + "Type": "Button", + "Label": "BARO Left INC" + }, + { + "Id": 44, + "Type": "Button", + "Label": "inHg Left" + }, + { + "Id": 45, + "Type": "Button", + "Label": "hPa Left" + }, + { + "Id": 46, + "Type": "Button", + "Label": "ND LS Left" + }, + { + "Id": 47, + "Type": "Button", + "Label": "ND VOR Left" + }, + { + "Id": 48, + "Type": "Button", + "Label": "ND NAV Left" + }, + { + "Id": 49, + "Type": "Button", + "Label": "ND ARC Left" + }, + { + "Id": 50, + "Type": "Button", + "Label": "ND PLAN Left" + }, + { + "Id": 51, + "Type": "Button", + "Label": "RANGE 10 Left" + }, + { + "Id": 52, + "Type": "Button", + "Label": "RANGE 20 Left" + }, + { + "Id": 53, + "Type": "Button", + "Label": "RANGE 40 Left" + }, + { + "Id": 54, + "Type": "Button", + "Label": "RANGE 80 Left" + }, + { + "Id": 55, + "Type": "Button", + "Label": "RANGE 160 Left" + }, + { + "Id": 56, + "Type": "Button", + "Label": "RANGE 320 Left" + }, + { + "Id": 57, + "Type": "Button", + "Label": "NAV1 ADF Left" + }, + { + "Id": 58, + "Type": "Button", + "Label": "NAV1 OFF Left" + }, + { + "Id": 59, + "Type": "Button", + "Label": "NAV1 VOR Left" + }, + { + "Id": 60, + "Type": "Button", + "Label": "NAV2 ADF Left" + }, + { + "Id": 61, + "Type": "Button", + "Label": "NAV2 OFF Left" + }, + { + "Id": 62, + "Type": "Button", + "Label": "NAV2 VOR Left" + } + ] +} diff --git a/Joysticks/winwing_fcu_efisl_efisr.joystick.json b/Joysticks/winwing_fcu_efisl_efisr.joystick.json new file mode 100644 index 00000000..70191819 --- /dev/null +++ b/Joysticks/winwing_fcu_efisl_efisr.joystick.json @@ -0,0 +1,453 @@ +{ + "$schema": "./mfjoystick.schema.json", + "InstanceName": "WINWING FCU-320 + EFIS-320L + EFIS-320R", + "VendorId": "0x4098", + "ProductId": "0xBA01", + "Inputs": [ + { + "Id": 1, + "Type": "Button", + "Label": "MACH Button" + }, + { + "Id": 2, + "Type": "Button", + "Label": "LOC Button" + }, + { + "Id": 3, + "Type": "Button", + "Label": "TRK Button" + }, + { + "Id": 4, + "Type": "Button", + "Label": "AP1 Button" + }, + { + "Id": 5, + "Type": "Button", + "Label": "AP2 Button" + }, + { + "Id": 6, + "Type": "Button", + "Label": "A/THR Button" + }, + { + "Id": 7, + "Type": "Button", + "Label": "EXPED Button" + }, + { + "Id": 8, + "Type": "Button", + "Label": "METRIC Button" + }, + { + "Id": 9, + "Type": "Button", + "Label": "APPR Button" + }, + { + "Id": 10, + "Type": "Button", + "Label": "SPD DEC" + }, + { + "Id": 11, + "Type": "Button", + "Label": "SPD INC" + }, + { + "Id": 12, + "Type": "Button", + "Label": "SPD PUSH" + }, + { + "Id": 13, + "Type": "Button", + "Label": "SPD PULL" + }, + { + "Id": 14, + "Type": "Button", + "Label": "HDG DEC" + }, + { + "Id": 15, + "Type": "Button", + "Label": "HDG INC" + }, + { + "Id": 16, + "Type": "Button", + "Label": "HDG PUSH" + }, + { + "Id": 17, + "Type": "Button", + "Label": "HDG PULL" + }, + { + "Id": 18, + "Type": "Button", + "Label": "ALT DEC" + }, + { + "Id": 19, + "Type": "Button", + "Label": "ALT INC" + }, + { + "Id": 20, + "Type": "Button", + "Label": "ALT PUSH" + }, + { + "Id": 21, + "Type": "Button", + "Label": "ALT PULL" + }, + { + "Id": 22, + "Type": "Button", + "Label": "VS DEC" + }, + { + "Id": 23, + "Type": "Button", + "Label": "VS INC" + }, + { + "Id": 24, + "Type": "Button", + "Label": "VS PUSH" + }, + { + "Id": 25, + "Type": "Button", + "Label": "VS PULL" + }, + { + "Id": 26, + "Type": "Button", + "Label": "ALT 100" + }, + { + "Id": 27, + "Type": "Button", + "Label": "ALT 1000" + }, + { + "Id": 28, + "Type": "Button", + "Label": "FD Button" + }, + { + "Id": 29, + "Type": "Button", + "Label": "T.O CONFIG Button" + }, + { + "Id": 33, + "Type": "Button", + "Label": "FD Left Button" + }, + { + "Id": 34, + "Type": "Button", + "Label": "LS Left Button" + }, + { + "Id": 35, + "Type": "Button", + "Label": "CSTR Left Button" + }, + { + "Id": 36, + "Type": "Button", + "Label": "WPT Left Button" + }, + { + "Id": 37, + "Type": "Button", + "Label": "VORD Left Button" + }, + { + "Id": 38, + "Type": "Button", + "Label": "NDB Left Button" + }, + { + "Id": 39, + "Type": "Button", + "Label": "ARPT Left Button" + }, + { + "Id": 40, + "Type": "Button", + "Label": "BARO Left PUSH" + }, + { + "Id": 41, + "Type": "Button", + "Label": "BARO Left PULL" + }, + { + "Id": 42, + "Type": "Button", + "Label": "BARO Left DEC" + }, + { + "Id": 43, + "Type": "Button", + "Label": "BARO Left INC" + }, + { + "Id": 44, + "Type": "Button", + "Label": "inHg Left" + }, + { + "Id": 45, + "Type": "Button", + "Label": "hPa Left" + }, + { + "Id": 46, + "Type": "Button", + "Label": "ND LS Left" + }, + { + "Id": 47, + "Type": "Button", + "Label": "ND VOR Left" + }, + { + "Id": 48, + "Type": "Button", + "Label": "ND NAV Left" + }, + { + "Id": 49, + "Type": "Button", + "Label": "ND ARC Left" + }, + { + "Id": 50, + "Type": "Button", + "Label": "ND PLAN Left" + }, + { + "Id": 51, + "Type": "Button", + "Label": "RANGE 10 Left" + }, + { + "Id": 52, + "Type": "Button", + "Label": "RANGE 20 Left" + }, + { + "Id": 53, + "Type": "Button", + "Label": "RANGE 40 Left" + }, + { + "Id": 54, + "Type": "Button", + "Label": "RANGE 80 Left" + }, + { + "Id": 55, + "Type": "Button", + "Label": "RANGE 160 Left" + }, + { + "Id": 56, + "Type": "Button", + "Label": "RANGE 320 Left" + }, + { + "Id": 57, + "Type": "Button", + "Label": "NAV1 ADF Left" + }, + { + "Id": 58, + "Type": "Button", + "Label": "NAV1 OFF Left" + }, + { + "Id": 59, + "Type": "Button", + "Label": "NAV1 VOR Left" + }, + { + "Id": 60, + "Type": "Button", + "Label": "NAV2 ADF Left" + }, + { + "Id": 61, + "Type": "Button", + "Label": "NAV2 OFF Left" + }, + { + "Id": 62, + "Type": "Button", + "Label": "NAV2 VOR Left" + }, + { + "Id": 65, + "Type": "Button", + "Label": "FD Right Button" + }, + { + "Id": 66, + "Type": "Button", + "Label": "LS Right Button" + }, + { + "Id": 67, + "Type": "Button", + "Label": "CSTR Right Button" + }, + { + "Id": 68, + "Type": "Button", + "Label": "WPT Right Button" + }, + { + "Id": 69, + "Type": "Button", + "Label": "VORD Right Button" + }, + { + "Id": 70, + "Type": "Button", + "Label": "NDB Right Button" + }, + { + "Id": 71, + "Type": "Button", + "Label": "ARPT Right Button" + }, + { + "Id": 72, + "Type": "Button", + "Label": "BARO Right PUSH" + }, + { + "Id": 73, + "Type": "Button", + "Label": "BARO Right PULL" + }, + { + "Id": 74, + "Type": "Button", + "Label": "BARO Right DEC" + }, + { + "Id": 75, + "Type": "Button", + "Label": "BARO Right INC" + }, + { + "Id": 76, + "Type": "Button", + "Label": "inHg Right" + }, + { + "Id": 77, + "Type": "Button", + "Label": "hPa Right" + }, + { + "Id": 78, + "Type": "Button", + "Label": "ND LS Right" + }, + { + "Id": 79, + "Type": "Button", + "Label": "ND VOR Right" + }, + { + "Id": 80, + "Type": "Button", + "Label": "ND NAV Right" + }, + { + "Id": 81, + "Type": "Button", + "Label": "ND ARC Right" + }, + { + "Id": 82, + "Type": "Button", + "Label": "ND PLAN Right" + }, + { + "Id": 83, + "Type": "Button", + "Label": "RANGE 10 Right" + }, + { + "Id": 84, + "Type": "Button", + "Label": "RANGE 20 Right" + }, + { + "Id": 85, + "Type": "Button", + "Label": "RANGE 40 Right" + }, + { + "Id": 86, + "Type": "Button", + "Label": "RANGE 80 Right" + }, + { + "Id": 87, + "Type": "Button", + "Label": "RANGE 160 Right" + }, + { + "Id": 88, + "Type": "Button", + "Label": "RANGE 320 Right" + }, + { + "Id": 89, + "Type": "Button", + "Label": "NAV1 ADF Right" + }, + { + "Id": 90, + "Type": "Button", + "Label": "NAV1 OFF Right" + }, + { + "Id": 91, + "Type": "Button", + "Label": "NAV1 VOR Right" + }, + { + "Id": 92, + "Type": "Button", + "Label": "NAV2 ADF Right" + }, + { + "Id": 93, + "Type": "Button", + "Label": "NAV2 OFF Right" + }, + { + "Id": 94, + "Type": "Button", + "Label": "NAV2 VOR Right" + } + ] +} diff --git a/Joysticks/winwing_fcu_efisr.joystick.json b/Joysticks/winwing_fcu_efisr.joystick.json new file mode 100644 index 00000000..d92cc732 --- /dev/null +++ b/Joysticks/winwing_fcu_efisr.joystick.json @@ -0,0 +1,303 @@ +{ + "$schema": "./mfjoystick.schema.json", + "InstanceName": "WINWING FCU-320 + EFIS-320R", + "VendorId": "0x4098", + "ProductId": "0xBC1E", + "Inputs": [ + { + "Id": 1, + "Type": "Button", + "Label": "MACH Button" + }, + { + "Id": 2, + "Type": "Button", + "Label": "LOC Button" + }, + { + "Id": 3, + "Type": "Button", + "Label": "TRK Button" + }, + { + "Id": 4, + "Type": "Button", + "Label": "AP1 Button" + }, + { + "Id": 5, + "Type": "Button", + "Label": "AP2 Button" + }, + { + "Id": 6, + "Type": "Button", + "Label": "A/THR Button" + }, + { + "Id": 7, + "Type": "Button", + "Label": "EXPED Button" + }, + { + "Id": 8, + "Type": "Button", + "Label": "METRIC Button" + }, + { + "Id": 9, + "Type": "Button", + "Label": "APPR Button" + }, + { + "Id": 10, + "Type": "Button", + "Label": "SPD DEC" + }, + { + "Id": 11, + "Type": "Button", + "Label": "SPD INC" + }, + { + "Id": 12, + "Type": "Button", + "Label": "SPD PUSH" + }, + { + "Id": 13, + "Type": "Button", + "Label": "SPD PULL" + }, + { + "Id": 14, + "Type": "Button", + "Label": "HDG DEC" + }, + { + "Id": 15, + "Type": "Button", + "Label": "HDG INC" + }, + { + "Id": 16, + "Type": "Button", + "Label": "HDG PUSH" + }, + { + "Id": 17, + "Type": "Button", + "Label": "HDG PULL" + }, + { + "Id": 18, + "Type": "Button", + "Label": "ALT DEC" + }, + { + "Id": 19, + "Type": "Button", + "Label": "ALT INC" + }, + { + "Id": 20, + "Type": "Button", + "Label": "ALT PUSH" + }, + { + "Id": 21, + "Type": "Button", + "Label": "ALT PULL" + }, + { + "Id": 22, + "Type": "Button", + "Label": "VS DEC" + }, + { + "Id": 23, + "Type": "Button", + "Label": "VS INC" + }, + { + "Id": 24, + "Type": "Button", + "Label": "VS PUSH" + }, + { + "Id": 25, + "Type": "Button", + "Label": "VS PULL" + }, + { + "Id": 26, + "Type": "Button", + "Label": "ALT 100" + }, + { + "Id": 27, + "Type": "Button", + "Label": "ALT 1000" + }, + { + "Id": 28, + "Type": "Button", + "Label": "FD Button" + }, + { + "Id": 29, + "Type": "Button", + "Label": "T.O CONFIG Button" + }, + { + "Id": 65, + "Type": "Button", + "Label": "FD Right Button" + }, + { + "Id": 66, + "Type": "Button", + "Label": "LS Right Button" + }, + { + "Id": 67, + "Type": "Button", + "Label": "CSTR Right Button" + }, + { + "Id": 68, + "Type": "Button", + "Label": "WPT Right Button" + }, + { + "Id": 69, + "Type": "Button", + "Label": "VORD Right Button" + }, + { + "Id": 70, + "Type": "Button", + "Label": "NDB Right Button" + }, + { + "Id": 71, + "Type": "Button", + "Label": "ARPT Right Button" + }, + { + "Id": 72, + "Type": "Button", + "Label": "BARO Right PUSH" + }, + { + "Id": 73, + "Type": "Button", + "Label": "BARO Right PULL" + }, + { + "Id": 74, + "Type": "Button", + "Label": "BARO Right DEC" + }, + { + "Id": 75, + "Type": "Button", + "Label": "BARO Right INC" + }, + { + "Id": 76, + "Type": "Button", + "Label": "inHg Right" + }, + { + "Id": 77, + "Type": "Button", + "Label": "hPa Right" + }, + { + "Id": 78, + "Type": "Button", + "Label": "ND LS Right" + }, + { + "Id": 79, + "Type": "Button", + "Label": "ND VOR Right" + }, + { + "Id": 80, + "Type": "Button", + "Label": "ND NAV Right" + }, + { + "Id": 81, + "Type": "Button", + "Label": "ND ARC Right" + }, + { + "Id": 82, + "Type": "Button", + "Label": "ND PLAN Right" + }, + { + "Id": 83, + "Type": "Button", + "Label": "RANGE 10 Right" + }, + { + "Id": 84, + "Type": "Button", + "Label": "RANGE 20 Right" + }, + { + "Id": 85, + "Type": "Button", + "Label": "RANGE 40 Right" + }, + { + "Id": 86, + "Type": "Button", + "Label": "RANGE 80 Right" + }, + { + "Id": 87, + "Type": "Button", + "Label": "RANGE 160 Right" + }, + { + "Id": 88, + "Type": "Button", + "Label": "RANGE 320 Right" + }, + { + "Id": 89, + "Type": "Button", + "Label": "NAV1 ADF Right" + }, + { + "Id": 90, + "Type": "Button", + "Label": "NAV1 OFF Right" + }, + { + "Id": 91, + "Type": "Button", + "Label": "NAV1 VOR Right" + }, + { + "Id": 92, + "Type": "Button", + "Label": "NAV2 ADF Right" + }, + { + "Id": 93, + "Type": "Button", + "Label": "NAV2 OFF Right" + }, + { + "Id": 94, + "Type": "Button", + "Label": "NAV2 VOR Right" + } + ] +} diff --git a/MobiFlight/Joysticks/JoystickManager.cs b/MobiFlight/Joysticks/JoystickManager.cs index 21780c3a..9f9c7780 100644 --- a/MobiFlight/Joysticks/JoystickManager.cs +++ b/MobiFlight/Joysticks/JoystickManager.cs @@ -176,7 +176,7 @@ public async void Connect() // statically set this to Octavi until we might support (Octavi|IFR1) or similar js = new Octavi(diJoystick, GetDefinitionByInstanceName("Octavi")); } - else if (vendorId == 0x4098 && productId == 0xBB10) + else if (vendorId == 0x4098 && (productId == 0xBB10 || productId == 0xBC1D || productId == 0xBC1E || productId == 0xBA01)) { var joystickDef = GetDefinitionByProductId(vendorId, productId); js = new WinwingFcu(diJoystick, joystickDef, productId); diff --git a/MobiFlight/Joysticks/WinwingFcu/WinwingFcu.cs b/MobiFlight/Joysticks/WinwingFcu/WinwingFcu.cs index 983bc78b..c0113c5b 100644 --- a/MobiFlight/Joysticks/WinwingFcu/WinwingFcu.cs +++ b/MobiFlight/Joysticks/WinwingFcu/WinwingFcu.cs @@ -28,11 +28,16 @@ internal class WinwingFcu : Joystick private const int ALT_INC = 19; private const int VS_DEC = 22; private const int VS_INC = 23; + private const int BAROL_DEC = 42; + private const int BAROL_INC = 43; + private const int BAROR_DEC = 74; + private const int BAROR_INC = 75; private const uint BUTTONS_REPORT = 1; private Dictionary ButtonsToTrigger = new Dictionary(); private Dictionary EncoderButtonsToTrigger = new Dictionary(); - private List EncoderIncDecButtons = new List { SPD_DEC, SPD_INC, HDG_DEC, HDG_INC, ALT_DEC, ALT_INC, VS_DEC, VS_INC }; + private List EncoderIncDecButtons + = new List { SPD_DEC, SPD_INC, HDG_DEC, HDG_INC, ALT_DEC, ALT_INC, VS_DEC, VS_INC, BAROL_DEC, BAROL_INC, BAROR_DEC, BAROR_INC }; private JoystickDefinition Definition; private volatile bool DoInitialize = true; @@ -44,8 +49,7 @@ internal class WinwingFcu : Joystick private List LcdDevices = new List(); private List> LedDevices = new List>(); - - + public WinwingFcu(SharpDX.DirectInput.Joystick joystick, JoystickDefinition def, int productId) : base(joystick, def) { Definition = def; @@ -217,6 +221,10 @@ private void InputReportReceived(HidBuffer hidBuffer) CheckForEncoderTrigger(altIncrement, ALT_DEC, ALT_INC); int vsIncrement = CurrentReport.VsEncoderValue - PreviousReport.VsEncoderValue; CheckForEncoderTrigger(vsIncrement, VS_DEC, VS_INC); + int baroLeftIncrement = CurrentReport.BaroLeftEncoderValue - PreviousReport.BaroLeftEncoderValue; + CheckForEncoderTrigger(baroLeftIncrement, BAROL_DEC, BAROL_INC); + int baroRightIncrement = CurrentReport.BaroRightEncoderValue - PreviousReport.BaroRightEncoderValue; + CheckForEncoderTrigger(baroRightIncrement, BAROR_DEC, BAROR_INC); CurrentReport.CopyTo(PreviousReport); } } diff --git a/MobiFlight/Joysticks/WinwingFcu/WinwingFcuReport.cs b/MobiFlight/Joysticks/WinwingFcu/WinwingFcuReport.cs index 6c411946..b295ed73 100644 --- a/MobiFlight/Joysticks/WinwingFcu/WinwingFcuReport.cs +++ b/MobiFlight/Joysticks/WinwingFcu/WinwingFcuReport.cs @@ -12,6 +12,8 @@ internal class WinwingFcuReport public ushort HdgEncoderValue { get; set; } public ushort AltEncoderValue { get; set; } public ushort VsEncoderValue { get; set; } + public ushort BaroLeftEncoderValue { get; set; } + public ushort BaroRightEncoderValue { get; set; } private const uint BUTTONS_REPORT = 1; private const uint DEVICE_REPORT = 2; @@ -27,6 +29,8 @@ public void CopyTo(WinwingFcuReport targetReport) targetReport.AltEncoderValue = this.AltEncoderValue; targetReport.HdgEncoderValue = this.HdgEncoderValue; targetReport.VsEncoderValue = this.VsEncoderValue; + targetReport.BaroLeftEncoderValue = this.BaroLeftEncoderValue; + targetReport.BaroRightEncoderValue = this.BaroRightEncoderValue; } public void ParseReport(HidBuffer hidBuffer) @@ -46,6 +50,8 @@ public void ParseReport(HidBuffer hidBuffer) HdgEncoderValue = (ushort)(data[30] | (data[31] << 8)); AltEncoderValue = (ushort)(data[32] | (data[33] << 8)); VsEncoderValue = (ushort)(data[34] | (data[35] << 8)); + BaroLeftEncoderValue = (ushort)(data[36] | (data[37] << 8)); + BaroRightEncoderValue = (ushort)(data[38] | (data[39] << 8)); } else // old firmware { @@ -58,16 +64,28 @@ public void ParseReport(HidBuffer hidBuffer) else if (ReportId == DEVICE_REPORT) { // Is firmware report - if (data[5] == 0x02 && data[4] == 0x05 && data[0] == 0x10) + if (data[5] == 0x02 && data[4] == 0x05) { - LogFirmware(data, "WINWING FCU"); - if (data[9] == 1 && data[8] < 0x16) + if (data[0] == 0x10 && data[1] == 0xcb) { - IsFirmwareGreaterOrEqual_1_16 = false; + LogFirmware(data, "WINWING FCU"); + if (data[9] == 1 && data[8] < 0x16) + { + IsFirmwareGreaterOrEqual_1_16 = false; + } + } + else if (data[0] == 0x0d && data[1] == 0xcf) + { + LogFirmware(data, "WINWING EFIS-L"); + } + else if (data[0] == 0x0e && data[1] == 0xcf) + { + LogFirmware(data, "WINWING EFIS-R"); } } } } + private void LogFirmware(byte[] data, string device) { Log.Instance.log($"{device} Firmware: v{data[9].ToString("X2")}.{data[8].ToString("X2")}", LogSeverity.Debug); diff --git a/MobiFlightConnector.csproj b/MobiFlightConnector.csproj index 710ef4e2..a34a950b 100644 --- a/MobiFlightConnector.csproj +++ b/MobiFlightConnector.csproj @@ -1227,6 +1227,15 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/lib/MobiFlightWwFcu.dll b/lib/MobiFlightWwFcu.dll index 53cd8027..395f43ca 100644 Binary files a/lib/MobiFlightWwFcu.dll and b/lib/MobiFlightWwFcu.dll differ