Added Auto brake and Spoilers armed functions
Added search functionality for functions Updated version of SimConnect Steam Edition
This commit is contained in:
parent
b648821e7d
commit
7a1e4ed494
Binary file not shown.
@ -40,8 +40,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
||||
Margins.Bottom = 0
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 3
|
||||
ExplicitTop = 441
|
||||
TabOrder = 2
|
||||
DesignSize = (
|
||||
692
|
||||
43)
|
||||
@ -76,42 +75,6 @@ object ButtonFunctionForm: TButtonFunctionForm
|
||||
TabOrder = 1
|
||||
end
|
||||
end
|
||||
object vstFunctions: TVirtualStringTree
|
||||
AlignWithMargins = True
|
||||
Left = 8
|
||||
Top = 60
|
||||
Width = 257
|
||||
Height = 450
|
||||
Margins.Left = 8
|
||||
Margins.Top = 8
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 0
|
||||
Align = alLeft
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Font.Charset = DEFAULT_CHARSET
|
||||
Header.Font.Color = clWindowText
|
||||
Header.Font.Height = -11
|
||||
Header.Font.Name = 'Tahoma'
|
||||
Header.Font.Style = []
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible]
|
||||
IncrementalSearch = isAll
|
||||
TabOrder = 1
|
||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoSort, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toFullRepaintOnResize, toInitOnSave, toWheelPanning, toEditOnClick]
|
||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowTreeLines, toThemeAware, toUseBlendedImages]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
||||
OnFocusChanged = vstFunctionsFocusChanged
|
||||
OnGetText = vstFunctionsGetText
|
||||
OnPaintText = vstFunctionsPaintText
|
||||
OnIncrementalSearch = vstFunctionsIncrementalSearch
|
||||
ExplicitHeight = 373
|
||||
Columns = <
|
||||
item
|
||||
Position = 0
|
||||
Width = 253
|
||||
WideText = 'Available functions'
|
||||
end>
|
||||
end
|
||||
object pnlFunction: TPanel
|
||||
AlignWithMargins = True
|
||||
Left = 273
|
||||
@ -124,8 +87,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
||||
Margins.Bottom = 0
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 2
|
||||
ExplicitHeight = 373
|
||||
TabOrder = 1
|
||||
object pnlName: TPanel
|
||||
Left = 0
|
||||
Top = 0
|
||||
@ -197,7 +159,6 @@ object ButtonFunctionForm: TButtonFunctionForm
|
||||
Align = alClient
|
||||
BorderStyle = bsNone
|
||||
TabOrder = 1
|
||||
ExplicitHeight = 276
|
||||
end
|
||||
end
|
||||
object pnlHeader: TPanel
|
||||
@ -266,4 +227,80 @@ object ButtonFunctionForm: TButtonFunctionForm
|
||||
ParentFont = False
|
||||
end
|
||||
end
|
||||
object pnlFunctions: TPanel
|
||||
AlignWithMargins = True
|
||||
Left = 8
|
||||
Top = 60
|
||||
Width = 257
|
||||
Height = 450
|
||||
Margins.Left = 8
|
||||
Margins.Top = 8
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 0
|
||||
Align = alLeft
|
||||
BevelOuter = bvNone
|
||||
TabOrder = 3
|
||||
ExplicitLeft = 265
|
||||
ExplicitTop = 52
|
||||
ExplicitHeight = 458
|
||||
object vstFunctions: TVirtualStringTree
|
||||
Left = 0
|
||||
Top = 29
|
||||
Width = 257
|
||||
Height = 421
|
||||
Align = alClient
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Font.Charset = DEFAULT_CHARSET
|
||||
Header.Font.Color = clWindowText
|
||||
Header.Font.Height = -11
|
||||
Header.Font.Name = 'Tahoma'
|
||||
Header.Font.Style = []
|
||||
Header.Options = [hoAutoResize, hoColumnResize, hoDrag, hoShowSortGlyphs, hoVisible]
|
||||
IncrementalSearch = isAll
|
||||
TabOrder = 1
|
||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoSort, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||
TreeOptions.MiscOptions = [toAcceptOLEDrop, toFullRepaintOnResize, toInitOnSave, toWheelPanning, toEditOnClick]
|
||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowTreeLines, toThemeAware, toUseBlendedImages]
|
||||
TreeOptions.SelectionOptions = [toFullRowSelect]
|
||||
OnFocusChanged = vstFunctionsFocusChanged
|
||||
OnGetText = vstFunctionsGetText
|
||||
OnPaintText = vstFunctionsPaintText
|
||||
OnIncrementalSearch = vstFunctionsIncrementalSearch
|
||||
ExplicitTop = 8
|
||||
ExplicitHeight = 450
|
||||
Columns = <
|
||||
item
|
||||
Position = 0
|
||||
Width = 253
|
||||
WideText = 'Available functions'
|
||||
end>
|
||||
end
|
||||
object edtSearch: TEdit
|
||||
Tag = 1
|
||||
AlignWithMargins = True
|
||||
Left = 0
|
||||
Top = 0
|
||||
Width = 257
|
||||
Height = 21
|
||||
Margins.Left = 0
|
||||
Margins.Top = 0
|
||||
Margins.Right = 0
|
||||
Margins.Bottom = 8
|
||||
Align = alTop
|
||||
Font.Charset = DEFAULT_CHARSET
|
||||
Font.Color = clGrayText
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
Font.Style = []
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Text = 'Search...'
|
||||
OnChange = edtSearchChange
|
||||
OnEnter = edtSearchEnter
|
||||
OnExit = edtSearchExit
|
||||
ExplicitLeft = 72
|
||||
ExplicitTop = 216
|
||||
ExplicitWidth = 121
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -43,6 +43,8 @@ type
|
||||
lblCurrentFunction: TLabel;
|
||||
lblCurrentCategory: TLabel;
|
||||
bvlFooter: TBevel;
|
||||
pnlFunctions: TPanel;
|
||||
edtSearch: TEdit;
|
||||
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure FormDestroy(Sender: TObject);
|
||||
@ -51,6 +53,9 @@ type
|
||||
procedure vstFunctionsFocusChanged(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex);
|
||||
procedure vstFunctionsIncrementalSearch(Sender: TBaseVirtualTree; Node: PVirtualNode; const SearchText: string; var Result: Integer);
|
||||
procedure btnOKClick(Sender: TObject);
|
||||
procedure edtSearchChange(Sender: TObject);
|
||||
procedure edtSearchEnter(Sender: TObject);
|
||||
procedure edtSearchExit(Sender: TObject);
|
||||
private
|
||||
FProfile: TProfile;
|
||||
FButtonIndex: Integer;
|
||||
@ -64,6 +69,7 @@ type
|
||||
procedure Initialize(AProfile: TProfile; AButtonIndex: Integer);
|
||||
|
||||
procedure LoadFunctions;
|
||||
procedure ApplyFilter(const AFilter: string);
|
||||
procedure SetFunction(AProvider: ILEDFunctionProvider; AFunction: ILEDFunction);
|
||||
|
||||
procedure LoadStates(AProvider: ILEDFunctionProvider; AFunction: ILEDMultiStateFunction);
|
||||
@ -99,6 +105,7 @@ type
|
||||
implementation
|
||||
uses
|
||||
System.Math,
|
||||
System.StrUtils,
|
||||
System.SysUtils,
|
||||
Winapi.Windows,
|
||||
|
||||
@ -232,6 +239,55 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TButtonFunctionForm.ApplyFilter(const AFilter: string);
|
||||
var
|
||||
hasFilter: Boolean;
|
||||
categoryNode: PVirtualNode;
|
||||
functionNode: PVirtualNode;
|
||||
hasVisibleChildren: Boolean;
|
||||
nodeData: PFunctionNodeData;
|
||||
|
||||
begin
|
||||
hasFilter := (Length(AFilter) > 0);
|
||||
|
||||
vstFunctions.BeginUpdate;
|
||||
try
|
||||
categoryNode := vstFunctions.GetFirst;
|
||||
while Assigned(categoryNode) do
|
||||
begin
|
||||
hasVisibleChildren := False;
|
||||
|
||||
functionNode := vstFunctions.GetFirstChild(categoryNode);
|
||||
while Assigned(functionNode) do
|
||||
begin
|
||||
nodeData := vstFunctions.GetNodeData(functionNode);
|
||||
if nodeData^.NodeType = ntFunction then
|
||||
begin
|
||||
if hasFilter and (not ContainsText(nodeData^.LEDFunction.GetDisplayName, AFilter)) then
|
||||
Exclude(functionNode^.States, vsVisible)
|
||||
else
|
||||
Include(functionNode^.States, vsVisible);
|
||||
end;
|
||||
|
||||
if vsVisible in functionNode^.States then
|
||||
hasVisibleChildren := True;
|
||||
|
||||
functionNode := vstFunctions.GetNextSibling(functionNode);
|
||||
end;
|
||||
|
||||
if hasVisibleChildren then
|
||||
Include(categoryNode^.States, vsVisible)
|
||||
else
|
||||
Exclude(categoryNode^.States, vsVisible);
|
||||
|
||||
categoryNode := vstFunctions.GetNextSibling(categoryNode);
|
||||
end;
|
||||
finally
|
||||
vstFunctions.EndUpdate;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TButtonFunctionForm.SetFunction(AProvider: ILEDFunctionProvider; AFunction: ILEDFunction);
|
||||
var
|
||||
multiStateFunction: ILEDMultiStateFunction;
|
||||
@ -476,6 +532,39 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TButtonFunctionForm.edtSearchChange(Sender: TObject);
|
||||
begin
|
||||
if edtSearch.Tag = 1 then
|
||||
ApplyFilter('')
|
||||
else
|
||||
ApplyFilter(Trim(edtSearch.Text));
|
||||
end;
|
||||
|
||||
|
||||
procedure TButtonFunctionForm.edtSearchEnter(Sender: TObject);
|
||||
begin
|
||||
if edtSearch.Tag = 1 then
|
||||
begin
|
||||
edtSearch.Text := '';
|
||||
edtSearch.Font.Color := clWindowText;
|
||||
edtSearch.Tag := 0;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TButtonFunctionForm.edtSearchExit(Sender: TObject);
|
||||
begin
|
||||
if Length(Trim(edtSearch.Text)) = 0 then
|
||||
begin
|
||||
edtSearch.Tag := 1;
|
||||
edtSearch.Text := 'Search...';
|
||||
edtSearch.Font.Color := clGrayText;
|
||||
end else
|
||||
edtSearch.Tag := 0;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ TStateControlInfo }
|
||||
constructor TStateControlInfo.Create(AState: ILEDState; AStateLabel: TLabel; AComboBox: TComboBox);
|
||||
begin
|
||||
|
@ -1,7 +1,7 @@
|
||||
object MainForm: TMainForm
|
||||
Left = 0
|
||||
Top = 0
|
||||
ActiveControl = cbTrayIcon
|
||||
ActiveControl = cmbProfiles
|
||||
BorderIcons = [biSystemMenu, biMinimize]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'G940 LED Control'
|
||||
@ -30,15 +30,11 @@ object MainForm: TMainForm
|
||||
Margins.Top = 8
|
||||
Margins.Right = 8
|
||||
Margins.Bottom = 8
|
||||
ActivePage = tsConfiguration
|
||||
ActivePage = tsButtons
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
object tsButtons: TTabSheet
|
||||
Caption = ' Button assignment '
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 0
|
||||
ExplicitHeight = 0
|
||||
DesignSize = (
|
||||
442
|
||||
452)
|
||||
@ -533,10 +529,6 @@ object MainForm: TMainForm
|
||||
object tsAbout: TTabSheet
|
||||
Caption = 'About'
|
||||
ImageIndex = 1
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 0
|
||||
ExplicitWidth = 0
|
||||
ExplicitHeight = 0
|
||||
object lblVersionCaption: TLabel
|
||||
Left = 16
|
||||
Top = 67
|
||||
|
@ -13,6 +13,7 @@ uses
|
||||
Vcl.StdCtrls,
|
||||
Winapi.Messages,
|
||||
Winapi.Windows,
|
||||
Vcl.AppEvnts,
|
||||
|
||||
OtlComm,
|
||||
OtlEventMonitor,
|
||||
@ -27,7 +28,7 @@ uses
|
||||
LEDStateConsumer,
|
||||
Profile,
|
||||
ProfileManager,
|
||||
Settings, Vcl.AppEvnts;
|
||||
Settings;
|
||||
|
||||
|
||||
const
|
||||
|
@ -8,7 +8,7 @@
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<ProjectVersion>13.4</ProjectVersion>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Release</Config>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
@ -49,8 +49,7 @@
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<VerInfo_Build>1</VerInfo_Build>
|
||||
<VerInfo_Release>1</VerInfo_Release>
|
||||
<VerInfo_Release>2</VerInfo_Release>
|
||||
<VerInfo_MinorVer>1</VerInfo_MinorVer>
|
||||
<DCC_UsePackage>rtl;dbrtl;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<DCC_DcuOutput>Lib</DCC_DcuOutput>
|
||||
@ -60,7 +59,7 @@
|
||||
<Manifest_File>None</Manifest_File>
|
||||
<Icon_MainIcon>G940LEDControl_Icon.ico</Icon_MainIcon>
|
||||
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=X²Software;FileDescription=G940 LED Control;FileVersion=1.1.1.1;InternalName=;LegalCopyright=© 2011 - 2015 X²Software;LegalTrademarks=;OriginalFilename=G940LEDControl.exe;ProductName=G940 LED Control;ProductVersion=1.1;Comments=</VerInfo_Keys>
|
||||
<VerInfo_Keys>CompanyName=X²Software;FileDescription=G940 LED Control;FileVersion=1.1.2.0;InternalName=;LegalCopyright=© 2011 - 2015 X²Software;LegalTrademarks=;OriginalFilename=G940LEDControl.exe;ProductName=G940 LED Control;ProductVersion=1.1;Comments=</VerInfo_Keys>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
@ -98,7 +97,7 @@
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<Debugger_RunParams>/restart</Debugger_RunParams>
|
||||
<VerInfo_IncludeVerInfo>false</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=0.2.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=0.2;Comments=</VerInfo_Keys>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.1.1.1;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=0.2;Comments=</VerInfo_Keys>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
@ -196,7 +195,8 @@
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
</VersionInfoKeys>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="F:\Components\bin\DXE2\win32\JvBDEDesign160.bpl">JVCL BDE Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k160.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp160.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Platforms>
|
||||
|
Binary file not shown.
@ -54,6 +54,13 @@ type
|
||||
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||
end;
|
||||
|
||||
TFSXAutoBrakeFunction = class(TCustomFSXFunction)
|
||||
protected
|
||||
function GetCategoryName: string; override;
|
||||
procedure RegisterStates; override;
|
||||
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||
end;
|
||||
|
||||
TFSXPressDumpSwitchFunction = class(TCustomFSXInvertedOnOffFunction)
|
||||
protected
|
||||
function GetCategoryName: string; override;
|
||||
@ -120,6 +127,13 @@ type
|
||||
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||
end;
|
||||
|
||||
TFSXSpoilersArmedFunction = class(TCustomFSXFunction)
|
||||
protected
|
||||
function GetCategoryName: string; override;
|
||||
procedure RegisterStates; override;
|
||||
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||
end;
|
||||
|
||||
|
||||
{ Lights }
|
||||
TCustomFSXLightFunction = class(TCustomFSXOnOffFunction)
|
||||
@ -346,6 +360,27 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{ TFSXAutoBrakeFunction }
|
||||
function TFSXAutoBrakeFunction.GetCategoryName: string;
|
||||
begin
|
||||
Result := FSXCategorySystems;
|
||||
end;
|
||||
|
||||
procedure TFSXAutoBrakeFunction.RegisterStates;
|
||||
begin
|
||||
RegisterState(TLEDState.Create(FSXStateUIDAutoBrake0, FSXStateDisplayNameAutoBrake0, lcGreen));
|
||||
RegisterState(TLEDState.Create(FSXStateUIDAutoBrake1, FSXStateDisplayNameAutoBrake1, lcAmber));
|
||||
RegisterState(TLEDState.Create(FSXStateUIDAutoBrake2, FSXStateDisplayNameAutoBrake2, lcAmber));
|
||||
RegisterState(TLEDState.Create(FSXStateUIDAutoBrake3, FSXStateDisplayNameAutoBrake3, lcAmber));
|
||||
RegisterState(TLEDState.Create(FSXStateUIDAutoBrake4, FSXStateDisplayNameAutoBrake4, lcRed));
|
||||
end;
|
||||
|
||||
function TFSXAutoBrakeFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
|
||||
begin
|
||||
Result := TFSXAutoBrakeFunctionWorker;
|
||||
end;
|
||||
|
||||
|
||||
{ TFSXPressDumpSwitchFunction }
|
||||
function TFSXPressDumpSwitchFunction.GetCategoryName: string;
|
||||
begin
|
||||
@ -530,6 +565,27 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{ TFSXSpoilersArmedFunction }
|
||||
function TFSXSpoilersArmedFunction.GetCategoryName: string;
|
||||
begin
|
||||
Result := FSXCategoryControlSurfaces;
|
||||
end;
|
||||
|
||||
|
||||
procedure TFSXSpoilersArmedFunction.RegisterStates;
|
||||
begin
|
||||
RegisterState(TLEDState.Create(FSXStateUIDSpoilersNotAvailable, FSXStateDisplayNameSpoilersNotAvailable, lcOff));
|
||||
RegisterState(TLEDState.Create(FSXStateUIDOn, FSXStateDisplayNameOn, lcRed));
|
||||
RegisterState(TLEDState.Create(FSXStateUIDOff, FSXStateDisplayNameOff, lcGreen));
|
||||
end;
|
||||
|
||||
|
||||
function TFSXSpoilersArmedFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
|
||||
begin
|
||||
Result := TFSXSpoilersArmedFunctionWorker;
|
||||
end;
|
||||
|
||||
|
||||
{ TFSXLightFunction }
|
||||
function TCustomFSXLightFunction.GetCategoryName: string;
|
||||
begin
|
||||
|
@ -137,6 +137,7 @@ begin
|
||||
RegisterFunction(TFSXExitDoorFunction.Create( Self, FSXFunctionDisplayNameExitDoor, FSXFunctionUIDExitDoor));
|
||||
RegisterFunction(TFSXGearFunction.Create( Self, FSXFunctionDisplayNameGear, FSXFunctionUIDGear));
|
||||
RegisterFunction(TFSXParkingBrakeFunction.Create( Self, FSXFunctionDisplayNameParkingBrake, FSXFunctionUIDParkingBrake));
|
||||
RegisterFunction(TFSXAutoBrakeFunction.Create( Self, FSXFunctionDisplayNameAutoBrake, FSXFunctionUIDAutoBrake));
|
||||
RegisterFunction(TFSXPressDumpSwitchFunction.Create( Self, FSXFunctionDisplayNamePressDumpSwitch, FSXFunctionUIDPressDumpSwitch));
|
||||
RegisterFunction(TFSXTailHookFunction.Create( Self, FSXFunctionDisplayNameTailHook, FSXFunctionUIDTailHook));
|
||||
|
||||
@ -152,6 +153,7 @@ begin
|
||||
{ Control surfaces }
|
||||
RegisterFunction(TFSXFlapsFunction.Create( Self, FSXFunctionDisplayNameFlaps, FSXFunctionUIDFlaps));
|
||||
RegisterFunction(TFSXSpoilersFunction.Create( Self, FSXFunctionDisplayNameSpoilers, FSXFunctionUIDSpoilers));
|
||||
RegisterFunction(TFSXSpoilersArmedFunction.Create( Self, FSXFunctionDisplayNameSpoilersArmed, FSXFunctionUIDSpoilersArmed));
|
||||
|
||||
{ Lights }
|
||||
RegisterFunction(TFSXBeaconLightsFunction.Create( Self, FSXFunctionDisplayNameBeaconLights, FSXFunctionUIDBeaconLights));
|
||||
|
@ -45,6 +45,12 @@ type
|
||||
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||
end;
|
||||
|
||||
TFSXAutoBrakeFunctionWorker = class(TCustomFSXOnOffFunctionWorker)
|
||||
protected
|
||||
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||
procedure HandleData(AData: Pointer); override;
|
||||
end;
|
||||
|
||||
TFSXPressDumpSwitchFunctionWorker = class(TCustomFSXOnOffFunctionWorker)
|
||||
protected
|
||||
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||
@ -103,6 +109,12 @@ type
|
||||
procedure HandleData(AData: Pointer); override;
|
||||
end;
|
||||
|
||||
TFSXSpoilersArmedFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||
protected
|
||||
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||
procedure HandleData(AData: Pointer); override;
|
||||
end;
|
||||
|
||||
|
||||
{ Lights }
|
||||
TFSXLightStatesFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||
@ -313,6 +325,36 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{ TFSXAutoBrakeFunctionWorker }
|
||||
procedure TFSXAutoBrakeFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||
begin
|
||||
ADefinition.AddVariable('AUTO BRAKE SWITCH CB', FSX_UNIT_NUMBER, SIMCONNECT_DATAType_INT32);
|
||||
end;
|
||||
|
||||
procedure TFSXAutoBrakeFunctionWorker.HandleData(AData: Pointer);
|
||||
type
|
||||
PAutoBrakeData = ^TAutoBrakeData;
|
||||
TAutoBrakeData = packed record
|
||||
Position: Cardinal;
|
||||
end;
|
||||
|
||||
var
|
||||
autoBrakeData: PAutoBrakeData;
|
||||
|
||||
begin
|
||||
autoBrakeData := AData;
|
||||
|
||||
case autoBrakeData^.Position of
|
||||
0: SetCurrentState(FSXStateUIDAutoBrake0);
|
||||
1: SetCurrentState(FSXStateUIDAutoBrake1);
|
||||
2: SetCurrentState(FSXStateUIDAutoBrake2);
|
||||
3: SetCurrentState(FSXStateUIDAutoBrake3);
|
||||
else
|
||||
SetCurrentState(FSXStateUIDAutoBrake4);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
{ TFSXPressDumpSwitchFunctionWorker }
|
||||
procedure TFSXPressDumpSwitchFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||
begin
|
||||
@ -631,7 +673,7 @@ var
|
||||
begin
|
||||
spoilersData := AData;
|
||||
|
||||
if SpoilersData^.SpoilersAvailable <> 0 then
|
||||
if spoilersData^.SpoilersAvailable <> 0 then
|
||||
begin
|
||||
case Trunc(SpoilersData^.SpoilersHandlePercent) of
|
||||
0..5: SetCurrentState(FSXStateUIDSpoilersRetracted);
|
||||
@ -643,6 +685,40 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
{ TFSXSpoilersArmedFunctionWorker }
|
||||
procedure TFSXSpoilersArmedFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||
begin
|
||||
ADefinition.AddVariable('SPOILER AVAILABLE', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
|
||||
ADefinition.AddVariable('SPOILERS ARMED', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
|
||||
end;
|
||||
|
||||
|
||||
procedure TFSXSpoilersArmedFunctionWorker.HandleData(AData: Pointer);
|
||||
type
|
||||
PSpoilersArmedData = ^TSpoilersArmedData;
|
||||
TSpoilersArmedData = packed record
|
||||
SpoilersAvailable: Cardinal;
|
||||
SpoilersArmed: Cardinal;
|
||||
end;
|
||||
|
||||
var
|
||||
spoilersArmedData: PSpoilersArmedData;
|
||||
|
||||
begin
|
||||
spoilersArmedData := AData;
|
||||
|
||||
if spoilersArmedData^.SpoilersAvailable <> 0 then
|
||||
begin
|
||||
if spoilersArmedData^.SpoilersArmed <> 0 then
|
||||
SetCurrentState(FSXStateUIDOn)
|
||||
else
|
||||
SetCurrentState(FSXStateUIDOff);
|
||||
end else
|
||||
SetCurrentState(FSXStateUIDSpoilersNotAvailable);
|
||||
end;
|
||||
|
||||
|
||||
|
||||
{ TFSXLightStatesFunctionWorker }
|
||||
procedure TFSXLightStatesFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||
begin
|
||||
|
@ -278,6 +278,26 @@ const
|
||||
FSXStateDisplayNamePitotOnIceFull = 'Heat on - Fully iced';
|
||||
|
||||
|
||||
FSXFunctionUIDAutoBrake = 'autoBrake';
|
||||
FSXFunctionDisplayNameAutoBrake = 'Auto brake';
|
||||
|
||||
FSXStateUIDAutoBrake0 = '0';
|
||||
FSXStateUIDAutoBrake1 = '1';
|
||||
FSXStateUIDAutoBrake2 = '2';
|
||||
FSXStateUIDAutoBrake3 = '3';
|
||||
FSXStateUIDAutoBrake4 = '4';
|
||||
|
||||
FSXStateDisplayNameAutoBrake0 = 'Off / not available';
|
||||
FSXStateDisplayNameAutoBrake1 = '1';
|
||||
FSXStateDisplayNameAutoBrake2 = '2';
|
||||
FSXStateDisplayNameAutoBrake3 = '3';
|
||||
FSXStateDisplayNameAutoBrake4 = '4';
|
||||
|
||||
|
||||
FSXFunctionUIDSpoilersArmed = 'spoilersArmed';
|
||||
FSXFunctionDisplayNameSpoilersArmed = 'Auto-spoilers armed';
|
||||
|
||||
|
||||
FSXMenuProfiles = 'G940 Profile';
|
||||
FSXMenuProfileFormat = 'G940: %s';
|
||||
FSXMenuProfileFormatCascaded = '%s';
|
||||
|
@ -2,61 +2,147 @@
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{e15b9b2c-c6df-43f5-b397-01c1885281f4}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
|
||||
<DCC_DependencyCheckOutputName>G940Test.exe</DCC_DependencyCheckOutputName>
|
||||
<MainSource>G940Test.dpr</MainSource>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<ProjectVersion>13.4</ProjectVersion>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;System.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<VerInfo_Locale>1043</VerInfo_Locale>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<Icon_MainIcon>G940Test_Icon1.ico</Icon_MainIcon>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<Icon_MainIcon>G940Test_Icon1.ico</Icon_MainIcon>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<Version>7.0</Version>
|
||||
<DCC_DebugInformation>False</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE</DCC_Define>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<Version>7.0</Version>
|
||||
<DCC_Define>DEBUG</DCC_Define>
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_DcuOutput>Lib</DCC_DcuOutput>
|
||||
<DCC_ObjOutput>Lib</DCC_ObjOutput>
|
||||
<DCC_HppOutput>Lib</DCC_HppOutput>
|
||||
<DCC_UnitSearchPath>..\DirectX;..\Shared</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>..\DirectX;..\Shared</DCC_ResourcePath>
|
||||
<DCC_ObjPath>..\DirectX;..\Shared</DCC_ObjPath>
|
||||
<DCC_IncludePath>..\DirectX;..\Shared</DCC_IncludePath>
|
||||
<DCC_UnitSearchPath>..\DirectX;..\Shared;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<DCC_ResourcePath>..\DirectX;..\Shared;$(DCC_ResourcePath)</DCC_ResourcePath>
|
||||
<DCC_ObjPath>..\DirectX;..\Shared;$(DCC_ObjPath)</DCC_ObjPath>
|
||||
<DCC_IncludePath>..\DirectX;..\Shared;$(DCC_IncludePath)</DCC_IncludePath>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality</Borland.Personality>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1043</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">G940Test.dpr</Source></Source><Excluded_Packages>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Delphi.Personality>
|
||||
<Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1043</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
</VersionInfoKeys>
|
||||
<Source>
|
||||
<Source Name="MainSource">G940Test.dpr</Source>
|
||||
</Source>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="P:\algemeen\bin\D2007\wpViewPDF_D2007.bpl">WPViewPDF - PDFViewClass</Excluded_Packages>
|
||||
<Excluded_Packages Name="P:\algemeen\bin\D2007\madExceptVcl_.bpl">madExceptVcl 2.0c - www.madshi.net</Excluded_Packages>
|
||||
<Excluded_Packages Name="D:\Program Files\Developer Express.VCL\Library\Delphi11\dclcxPivotGridOLAPD11.bpl">ExpressPivotGrid 2 OLAP by Developer Express Inc.</Excluded_Packages>
|
||||
</Excluded_Packages></Delphi.Personality></BorlandProject></BorlandProject>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Platforms>
|
||||
<Platform value="Win64">False</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" />
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="G940Test.dpr">
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="Forms\MainFrm.pas">
|
||||
<Form>MainForm</Form>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user