nocscienceat.WinWingMcdu 1.0.0

dotnet add package nocscienceat.WinWingMcdu --version 1.0.0
                    
NuGet\Install-Package nocscienceat.WinWingMcdu -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nocscienceat.WinWingMcdu" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nocscienceat.WinWingMcdu" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="nocscienceat.WinWingMcdu" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nocscienceat.WinWingMcdu --version 1.0.0
                    
#r "nuget: nocscienceat.WinWingMcdu, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nocscienceat.WinWingMcdu@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nocscienceat.WinWingMcdu&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=nocscienceat.WinWingMcdu&version=1.0.0
                    
Install as a Cake Tool

nocscienceat.WinWingMcdu

WinWing MCDU panel driver for X-Plane, built on the nocscienceat.XPlanePanel / nocscienceat.XPlaneWebConnector framework.

Drives the WinWing MCDU hardware (Captain, First Officer, Observer) via USB HID � reads 74 key presses, renders the 14�24 color character LCD display with dual font sizes, and controls 9 LED annunciators plus backlight brightness. All display content and button commands bridge to X-Plane via the ToLiss AirbusFBW plugin datarefs and commands.

Features

  • Full keyboard � all 74 keys (LSK, page, numeric, alpha, special) with begin/end command pairs for hold-timing support (e.g. CLR long-press)
  • Color LCD display � 14 lines � 24 characters, 9 colors, large/small font, per-character color from overlapping ToLiss dataref layers
  • Symbol decoding � brackets, arrows, and box characters with per-symbol color mapping
  • Captain/FO auto-detection � automatically switches between MCDU1 and MCDU2 datarefs based on the connected device PID
  • Dual MCDU support � register a second handler instance with panelName: "MCDU2" for simultaneous Captain + First Officer operation
  • USB disconnect/reconnect � automatic recovery with display restore from cached dataref state
  • Teleport detection � re-initializes the display after aircraft reloads
  • Display throttling � coalesces rapid dataref updates to prevent display controller overflow
  • Dataref pre-caching � resolves all dataref IDs in parallel before subscribing for fast initial page display

Installation

dotnet add package nocscienceat.WinWingMcdu

Usage

Basic Setup

using nocscienceat.WinWingMcdu.Panels;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using nocscienceat.XPlanePanel;

var builder = Host.CreateApplicationBuilder(args);

builder.Configuration
    .SetBasePath(Directory.GetCurrentDirectory())
    .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
    .AddEnvironmentVariables("XP_");

builder.Services.AddXPlaneWebConnector(builder.Configuration);
builder.Services.AddXPlanePanel();

// Captain MCDU (auto-detect or force PID via config)
builder.Services.AddSingleton<IPanelHandler, McduPanelHandler>();

// Optional: First Officer MCDU
// builder.Services.AddSingleton<IPanelHandler>(sp =>
//     new McduPanelHandler(
//         sp.GetRequiredService<IXPlaneWebConnector>(),
//         sp.GetRequiredService<IConfiguration>(),
//         sp.GetRequiredService<ILogger<McduPanelHandler>>(),
//         panelName: "MCDU2"));

builder.Logging.ClearProviders();
builder.Logging.AddConsole();

var host = builder.Build();
await host.RunAsync();

Configuration

{
  "Panels": {
    "MCDU": {
      "Enabled": true
    },
    "MCDU2": {
      "Enabled": false,
      "ProductId": 47934
    }
  }
}
Setting Type Default Description
Enabled bool false Enable/disable this MCDU instance
VendorId int 0x4098 (16536) USB Vendor ID for WinWing devices
ProductId int 0 USB Product ID. 0 = auto-detect. 48182 = Captain, 47934 = FO
DefaultBrightness int 180 Initial LCD/key backlight brightness (0�255)

Supported Devices

Device VID PID Dataref prefix
MCDU Captain 0x4098 0xBB36 (48182) MCDU1
MCDU First Officer 0x4098 0xBB3E (47934) MCDU2
MCDU Observer 0x4098 0xBB3A (47930) MCDU1

Architecture

  • McduPanelHandler � main panel handler with lifecycle, reconnect, and display throttling
  • McduPanelHandlerRegDataRefCommand.cs � dataref/command registration and button dispatch table
  • McduPanelHandlerWireDataRefCommand.cs � subscription wiring, pre-caching, and teleport detection
  • McduDisplayComposer � merges per-color ToLiss dataref layers into a single display page
  • McduPage � 14�24 character model with dirty tracking and wire-format encoding
  • WinWingMcduHidDevice � USB HID I/O (read loop, write channel, LED control, display protocol)

Protocol Documentation

See docs/MCDU-Protocol-Analysis.md for the full USB HID protocol specification.

License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.

Attribution

This project is a C# port derived from XSchenFly by memo5@gmx.at, originally released under the GPL-3.0 license. Hardware protocol derived from reverse engineering by memo5@gmx.at.

C# port and modifications by Klemens Urban (klemens.urban@outlook.com, https://github.com/klemensurban).

Dependencies

This project depends on the nocscienceat.XPlanePanel framework and the nocscienceat.XPlaneWebConnector, which are licensed separately under the MIT License by Klemens Urban.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 160 4/3/2026