Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test hid stuff #1771

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions Joysticks/fsbgns530.joystick.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"$schema": "./mfjoystick.schema.json",
"InstanceName": "FlightSimBuilder 530",
"VendorId": 1240,
"ProductId": 59094,
"Inputs": [
{
"Id": 1,
"Type": "Button",
"Label": "Left - Knob Outer - Left"
},
{
"Id": 2,
"Type": "Button",
"Label": "Left - Knob Outer - Right"
},
{
"Id": 3,
"Type": "Button",
"Label": "Left - Knob Inner - Left"
},
{
"Id": 4,
"Type": "Button",
"Label": "Left - Knob Inner - Right"
},
{
"Id": 5,
"Type": "Button",
"Label": "Left - Knob Inner - Push"
},
{
"Id": 7,
"Type": "Button",
"Label": "Right - Knob Outer - Left"
},
{
"Id": 8,
"Type": "Button",
"Label": "Right - Knob Outer - Right"
},
{
"Id": 9,
"Type": "Button",
"Label": "Right - Knob Inner - Left"
},
{
"Id": 10,
"Type": "Button",
"Label": "Right - Knob Inner - Right"
},
{
"Id": 11,
"Type": "Button",
"Label": "Right - Knob Inner - Push"
},
{
"Id": 12,
"Type": "Button",
"Label": "UNUSED"
},
{
"Id": 13,
"Type": "Button",
"Label": "C <->"
},
{
"Id": 14,
"Type": "Button",
"Label": ".C"
},
{
"Id": 15,
"Type": "Button",
"Label": "V <->"
},
{
"Id": 16,
"Type": "Button",
"Label": ".V"
},
{
"Id": 17,
"Type": "Button",
"Label": "UNUSED"
},
{
"Id": 18,
"Type": "Button",
"Label": "UNUSED"
},
{
"Id": 19,
"Type": "Button",
"Label": "CDI"
},
{
"Id": 20,
"Type": "Button",
"Label": "OBS"
},
{
"Id": 21,
"Type": "Button",
"Label": "MSG"
},
{
"Id": 22,
"Type": "Button",
"Label": "FPL"
},
{
"Id": 23,
"Type": "Button",
"Label": "VNAV"
},
{
"Id": 24,
"Type": "Button",
"Label": "PROC"
},
{
"Id": 25,
"Type": "Button",
"Label": "RNG UP"
},
{
"Id": 26,
"Type": "Button",
"Label": "RNG DOWN"
},
{
"Id": 27,
"Type": "Button",
"Label": "Direct To"
},
{
"Id": 28,
"Type": "Button",
"Label": "MENU"
},
{
"Id": 29,
"Type": "Button",
"Label": "CLR"
},
{
"Id": 30,
"Type": "Button",
"Label": "ENT"
}
],
"Outputs": [
]
}
178 changes: 178 additions & 0 deletions Joysticks/saitek.multipanel.joystick.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
{
"$schema": "./mfjoystick.schema.json",
"InstanceName": "Pro Flight Multi Panel",
"VendorId": 1699,
"ProductId": 3334,
"Inputs": [
{
"Id": 0,
"Type": "Button",
"Label": "Position Switch - ALT"
},
{
"Id": 1,
"Type": "Button",
"Label": "Position Switch - VS"
},
{
"Id": 2,
"Type": "Button",
"Label": "Position Switch - IAS"
},
{
"Id": 3,
"Type": "Button",
"Label": "Position Switch - HDG"
},
{
"Id": 4,
"Type": "Button",
"Label": "Position Switch - CRS"
},
{
"Id": 5,
"Type": "Button",
"Label": "Encoder Right"
},
{
"Id": 6,
"Type": "Button",
"Label": "Encoder Left"
},
{
"Id": 7,
"Type": "Button",
"Label": "AP Button"
},
{
"Id": 8,
"Type": "Button",
"Label": "HDG Button"
},
{
"Id": 9,
"Type": "Button",
"Label": "NAV Button"
},
{
"Id": 10,
"Type": "Button",
"Label": "IAS Button"
},
{
"Id": 11,
"Type": "Button",
"Label": "ALT Button"
},
{
"Id": 12,
"Type": "Button",
"Label": "VS Button"
},
{
"Id": 13,
"Type": "Button",
"Label": "APR Button"
},
{
"Id": 14,
"Type": "Button",
"Label": "REV Button"
},
{
"Id": 15,
"Type": "Button",
"Label": "Auto Throttle ARM"
},
{
"Id": 16,
"Type": "Button",
"Label": "Flaps UP"
},
{
"Id": 17,
"Type": "Button",
"Label": "Flaps DN"
},
{
"Id": 18,
"Type": "Button",
"Label": "Pitch Trim DN"
},
{
"Id": 19,
"Type": "Button",
"Label": "Pitch Trim UP"
}
],
"Outputs": [
{
"Label": "AP Mode - On/Off",
"Type": "Output",
"Id": "AP.autopilot",
"Byte": 11,
"Bit": 0
},
{
"Label": "AP Mode - HDG",
"Type": "Output",
"Id": "AP.hdg",
"Byte": 11,
"Bit": 1
},
{
"Label": "AP Mode - NAV",
"Id": "AP.nav",
"Type": "Output",
"Byte": 11,
"Bit": 2
},
{
"Label": "AP Mode - IAS",
"Id": "AP.ias",
"Type": "Output",
"Byte": 11,
"Bit": 3
},
{
"Label": "AP Mode - ALT",
"Id": "AP.alt",
"Type": "Output",
"Byte": 11,
"Bit": 4
},
{
"Label": "AP Mode - VS",
"Id": "AP.vs",
"Type": "Output",
"Byte": 11,
"Bit": 5
},
{
"Label": "AP Mode - APR",
"Id": "AP.apr",
"Type": "Output",
"Byte": 11,
"Bit": 6
},
{
"Label": "AP Mode - REV",
"Id": "AP.rev",
"Type": "Output",
"Byte": 11,
"Bit": 7
},
{
"Label": "Line 1",
"Id": "CUSTOM.line1",
"Byte": 1,
"Type": "Custom"
},
{
"Label": "Line 2",
"Id": "CUSTOM.line2",
"Byte": 6,
"Type": "Custom"
}
]
}
2 changes: 1 addition & 1 deletion MobiFlight/CustomDevices/CustomDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public class CustomDevice : IMigrateable
/// <summary>
/// List of MessageTypes supported by the device.
/// </summary>
public List<MessageType> MessageTypes = new List<MessageType>();
public List<MessageType> MessageTypes { get; set; } = new List<MessageType>();

/// <summary>
/// Base path for custom firmware
Expand Down
9 changes: 9 additions & 0 deletions MobiFlight/CustomDevices/IMessageTypeProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using System.Collections.Generic;

namespace MobiFlight.CustomDevices
{
public interface IMessageTypeProvider
{
List<MessageType> MessageTypes { get; }
}
}
Loading