Release version is now the trunk again
This commit is contained in:
commit
b0bb11f55d
@ -5,7 +5,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
BorderIcons = [biSystemMenu]
|
BorderIcons = [biSystemMenu]
|
||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Configure button'
|
Caption = 'Configure button'
|
||||||
ClientHeight = 484
|
ClientHeight = 561
|
||||||
ClientWidth = 692
|
ClientWidth = 692
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Charset = DEFAULT_CHARSET
|
Font.Charset = DEFAULT_CHARSET
|
||||||
@ -31,7 +31,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
object pnlButtons: TPanel
|
object pnlButtons: TPanel
|
||||||
AlignWithMargins = True
|
AlignWithMargins = True
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 441
|
Top = 518
|
||||||
Width = 692
|
Width = 692
|
||||||
Height = 43
|
Height = 43
|
||||||
Margins.Left = 0
|
Margins.Left = 0
|
||||||
@ -41,6 +41,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Align = alBottom
|
Align = alBottom
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
|
ExplicitTop = 441
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
692
|
692
|
||||||
43)
|
43)
|
||||||
@ -80,7 +81,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Left = 8
|
Left = 8
|
||||||
Top = 60
|
Top = 60
|
||||||
Width = 257
|
Width = 257
|
||||||
Height = 373
|
Height = 450
|
||||||
Margins.Left = 8
|
Margins.Left = 8
|
||||||
Margins.Top = 8
|
Margins.Top = 8
|
||||||
Margins.Right = 0
|
Margins.Right = 0
|
||||||
@ -103,6 +104,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
OnGetText = vstFunctionsGetText
|
OnGetText = vstFunctionsGetText
|
||||||
OnPaintText = vstFunctionsPaintText
|
OnPaintText = vstFunctionsPaintText
|
||||||
OnIncrementalSearch = vstFunctionsIncrementalSearch
|
OnIncrementalSearch = vstFunctionsIncrementalSearch
|
||||||
|
ExplicitHeight = 373
|
||||||
Columns = <
|
Columns = <
|
||||||
item
|
item
|
||||||
Position = 0
|
Position = 0
|
||||||
@ -115,7 +117,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Left = 273
|
Left = 273
|
||||||
Top = 60
|
Top = 60
|
||||||
Width = 411
|
Width = 411
|
||||||
Height = 373
|
Height = 450
|
||||||
Margins.Left = 8
|
Margins.Left = 8
|
||||||
Margins.Top = 8
|
Margins.Top = 8
|
||||||
Margins.Right = 8
|
Margins.Right = 8
|
||||||
@ -123,6 +125,7 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Align = alClient
|
Align = alClient
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
ExplicitHeight = 373
|
||||||
object pnlName: TPanel
|
object pnlName: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
@ -190,10 +193,11 @@ object ButtonFunctionForm: TButtonFunctionForm
|
|||||||
Left = 0
|
Left = 0
|
||||||
Top = 97
|
Top = 97
|
||||||
Width = 411
|
Width = 411
|
||||||
Height = 276
|
Height = 353
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderStyle = bsNone
|
BorderStyle = bsNone
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
|
ExplicitHeight = 276
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object pnlHeader: TPanel
|
object pnlHeader: TPanel
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
object MainForm: TMainForm
|
object MainForm: TMainForm
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 0
|
Top = 0
|
||||||
ActiveControl = cbProfileMenu
|
ActiveControl = cmbProfiles
|
||||||
BorderIcons = [biSystemMenu, biMinimize]
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
Caption = 'G940 LED Control'
|
Caption = 'G940 LED Control'
|
||||||
@ -29,7 +29,7 @@ object MainForm: TMainForm
|
|||||||
Margins.Top = 8
|
Margins.Top = 8
|
||||||
Margins.Right = 8
|
Margins.Right = 8
|
||||||
Margins.Bottom = 8
|
Margins.Bottom = 8
|
||||||
ActivePage = tsConfiguration
|
ActivePage = tsButtons
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object tsButtons: TTabSheet
|
object tsButtons: TTabSheet
|
||||||
@ -418,6 +418,10 @@ object MainForm: TMainForm
|
|||||||
object tsAbout: TTabSheet
|
object tsAbout: TTabSheet
|
||||||
Caption = 'About'
|
Caption = 'About'
|
||||||
ImageIndex = 1
|
ImageIndex = 1
|
||||||
|
ExplicitLeft = 0
|
||||||
|
ExplicitTop = 0
|
||||||
|
ExplicitWidth = 0
|
||||||
|
ExplicitHeight = 0
|
||||||
object lblVersionCaption: TLabel
|
object lblVersionCaption: TLabel
|
||||||
Left = 16
|
Left = 16
|
||||||
Top = 67
|
Top = 67
|
||||||
|
@ -222,8 +222,9 @@ const
|
|||||||
DefaultProfileName = 'Default';
|
DefaultProfileName = 'Default';
|
||||||
ProfilePostfixModified = ' (modified)';
|
ProfilePostfixModified = ' (modified)';
|
||||||
|
|
||||||
FilenameProfiles = 'G940LEDControl\Profiles.xml';
|
UserDataPath = 'G940LEDControl\';
|
||||||
FilenameSettings = 'G940LEDControl\Settings.xml';
|
FilenameProfiles = UserDataPath + 'Profiles.xml';
|
||||||
|
FilenameSettings = UserDataPath + 'Settings.xml';
|
||||||
|
|
||||||
TextStateSearching = 'Searching...';
|
TextStateSearching = 'Searching...';
|
||||||
TextStateNotFound = 'Not found';
|
TextStateNotFound = 'Not found';
|
||||||
@ -291,6 +292,8 @@ begin
|
|||||||
|
|
||||||
FindLEDControls;
|
FindLEDControls;
|
||||||
|
|
||||||
|
ForceDirectories(App.UserPath + UserDataPath);
|
||||||
|
|
||||||
FProfilesFilename := App.UserPath + FilenameProfiles;
|
FProfilesFilename := App.UserPath + FilenameProfiles;
|
||||||
LoadProfiles;
|
LoadProfiles;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<FrameworkType>VCL</FrameworkType>
|
<FrameworkType>VCL</FrameworkType>
|
||||||
<ProjectVersion>13.4</ProjectVersion>
|
<ProjectVersion>13.4</ProjectVersion>
|
||||||
<Base>True</Base>
|
<Base>True</Base>
|
||||||
<Config Condition="'$(Config)'==''">Release</Config>
|
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||||
<TargetedPlatforms>1</TargetedPlatforms>
|
<TargetedPlatforms>1</TargetedPlatforms>
|
||||||
<AppType>Application</AppType>
|
<AppType>Application</AppType>
|
||||||
@ -49,18 +49,17 @@
|
|||||||
<Base>true</Base>
|
<Base>true</Base>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Base)'!=''">
|
<PropertyGroup Condition="'$(Base)'!=''">
|
||||||
|
<VerInfo_Release>7</VerInfo_Release>
|
||||||
<DCC_UsePackage>rtl;dbrtl;$(DCC_UsePackage)</DCC_UsePackage>
|
<DCC_UsePackage>rtl;dbrtl;$(DCC_UsePackage)</DCC_UsePackage>
|
||||||
<DCC_DcuOutput>Lib</DCC_DcuOutput>
|
<DCC_DcuOutput>Lib</DCC_DcuOutput>
|
||||||
<VerInfo_MajorVer>0</VerInfo_MajorVer>
|
|
||||||
<DCC_ExeOutput>Bin</DCC_ExeOutput>
|
<DCC_ExeOutput>Bin</DCC_ExeOutput>
|
||||||
<DCC_UnitSearchPath>..\Shared;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
<DCC_UnitSearchPath>..\Shared;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
<VerInfo_MinorVer>2</VerInfo_MinorVer>
|
|
||||||
<Manifest_File>None</Manifest_File>
|
<Manifest_File>None</Manifest_File>
|
||||||
<Icon_MainIcon>G940LEDControl_Icon.ico</Icon_MainIcon>
|
<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>
|
<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=0.2.0.0;InternalName=;LegalCopyright=© 2011 X²Software;LegalTrademarks=;OriginalFilename=G940LEDControl.exe;ProductName=G940 LED Control;ProductVersion=0.2;Comments=</VerInfo_Keys>
|
<VerInfo_Keys>CompanyName=X²Software;FileDescription=G940 LED Control;FileVersion=1.0.7.0;InternalName=;LegalCopyright=© 2011 - 2015 X²Software;LegalTrademarks=;OriginalFilename=G940LEDControl.exe;ProductName=G940 LED Control;ProductVersion=1.0;Comments=</VerInfo_Keys>
|
||||||
<VerInfo_Locale>1043</VerInfo_Locale>
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||||
<Icon_MainIcon>G940LEDControl_Icon.ico</Icon_MainIcon>
|
<Icon_MainIcon>G940LEDControl_Icon.ico</Icon_MainIcon>
|
||||||
@ -71,7 +70,6 @@
|
|||||||
<DCC_UNIT_PLATFORM>false</DCC_UNIT_PLATFORM>
|
<DCC_UNIT_PLATFORM>false</DCC_UNIT_PLATFORM>
|
||||||
<DCC_SYMBOL_PLATFORM>false</DCC_SYMBOL_PLATFORM>
|
<DCC_SYMBOL_PLATFORM>false</DCC_SYMBOL_PLATFORM>
|
||||||
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
<DCC_Namespace>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>
|
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||||
@ -82,11 +80,6 @@
|
|||||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||||
<VerInfo_Release>5</VerInfo_Release>
|
|
||||||
<VerInfo_MajorVer>1</VerInfo_MajorVer>
|
|
||||||
<VerInfo_MinorVer>0</VerInfo_MinorVer>
|
|
||||||
<VerInfo_Keys>CompanyName=X²Software;FileDescription=G940 LED Control;FileVersion=1.0.5.0;InternalName=;LegalCopyright=© 2011 X²Software;LegalTrademarks=;OriginalFilename=G940LEDControl.exe;ProductName=G940 LED Control;ProductVersion=1.0;Comments=</VerInfo_Keys>
|
|
||||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
|
||||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||||
@ -103,8 +96,7 @@
|
|||||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||||
<VerInfo_IncludeVerInfo>false</VerInfo_IncludeVerInfo>
|
<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=0.2.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=0.2;Comments=</VerInfo_Keys>
|
||||||
<Manifest_File>F:\Components\X2Utils\Resources\VistaManAsInvoker.manifest</Manifest_File>
|
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<DelphiCompile Include="$(MainSource)">
|
<DelphiCompile Include="$(MainSource)">
|
||||||
@ -201,7 +193,7 @@
|
|||||||
<VersionInfoKeys Name="Comments"/>
|
<VersionInfoKeys Name="Comments"/>
|
||||||
</VersionInfoKeys>
|
</VersionInfoKeys>
|
||||||
<Excluded_Packages>
|
<Excluded_Packages>
|
||||||
<Excluded_Packages Name="D:\Program Files\Developer Express.VCL\Library\Delphi16\dclcxPivotGridOLAPD16.bpl">ExpressPivotGrid 2 OLAP by Developer Express Inc.</Excluded_Packages>
|
<Excluded_Packages Name="F:\Components\bin\DXE2\win32\JvBDEDesign160.bpl">JVCL BDE Components</Excluded_Packages>
|
||||||
</Excluded_Packages>
|
</Excluded_Packages>
|
||||||
</Delphi.Personality>
|
</Delphi.Personality>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
|
Binary file not shown.
@ -67,6 +67,21 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ Instruments }
|
||||||
|
TFSXPitotOnOffFunction = class(TCustomFSXOnOffFunction)
|
||||||
|
protected
|
||||||
|
function GetCategoryName: string; override;
|
||||||
|
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TFSXPitotWarningFunction = class(TCustomFSXFunction)
|
||||||
|
protected
|
||||||
|
function GetCategoryName: string; override;
|
||||||
|
procedure RegisterStates; override;
|
||||||
|
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ Engines }
|
{ Engines }
|
||||||
TFSXEngineAntiIceFunction = class(TCustomFSXFunction)
|
TFSXEngineAntiIceFunction = class(TCustomFSXFunction)
|
||||||
protected
|
protected
|
||||||
@ -82,6 +97,13 @@ type
|
|||||||
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TFSXThrottleFunction = class(TCustomFSXFunction)
|
||||||
|
protected
|
||||||
|
function GetCategoryName: string; override;
|
||||||
|
procedure RegisterStates; override;
|
||||||
|
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ Control surfaces }
|
{ Control surfaces }
|
||||||
TFSXFlapsFunction = class(TCustomFSXFunction)
|
TFSXFlapsFunction = class(TCustomFSXFunction)
|
||||||
@ -199,6 +221,28 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ Fuel }
|
||||||
|
TFSXFuelFunction = class(TCustomFSXFunction)
|
||||||
|
protected
|
||||||
|
procedure RegisterStates; override;
|
||||||
|
function GetCategoryName: string; override;
|
||||||
|
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ ATC }
|
||||||
|
TFSXATCVisibilityFunction = class(TCustomMultiStateLEDFunction)
|
||||||
|
protected
|
||||||
|
procedure RegisterStates; override;
|
||||||
|
|
||||||
|
function GetCategoryName: string; override;
|
||||||
|
function GetDisplayName: string; override;
|
||||||
|
function GetUID: string; override;
|
||||||
|
|
||||||
|
function GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses
|
uses
|
||||||
FSXLEDFunctionWorker,
|
FSXLEDFunctionWorker,
|
||||||
@ -329,6 +373,48 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXPitotOnOffFunction }
|
||||||
|
function TFSXPitotOnOffFunction.GetCategoryName: string;
|
||||||
|
begin
|
||||||
|
Result := FSXCategoryInstruments;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFSXPitotOnOffFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
|
||||||
|
begin
|
||||||
|
Result := TFSXPitotOnOffFunctionWorker;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXPitotWarningFunction }
|
||||||
|
function TFSXPitotWarningFunction.GetCategoryName: string;
|
||||||
|
begin
|
||||||
|
Result := FSXCategoryInstruments;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TFSXPitotWarningFunction.RegisterStates;
|
||||||
|
begin
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOffIceNone, FSXStateDisplayNamePitotOffIceNone, lcRed));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOffIce25to50, FSXStateDisplayNamePitotOffIce25to50, lcFlashingAmberNormal));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOffIce50to75, FSXStateDisplayNamePitotOffIce50to75, lcFlashingAmberFast));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOffIce75to100, FSXStateDisplayNamePitotOffIce75to100, lcFlashingAmberFast));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOffIceFull, FSXStateDisplayNamePitotOffIceFull, lcFlashingRedFast));
|
||||||
|
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOnIceFull, FSXStateDisplayNamePitotOnIceFull, lcFlashingRedNormal));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOnIce75to100, FSXStateDisplayNamePitotOnIce75to100, lcAmber));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOnIce50to75, FSXStateDisplayNamePitotOnIce50to75, lcAmber));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOnIce25to50, FSXStateDisplayNamePitotOnIce25to50, lcAmber));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDPitotOnIceNone, FSXStateDisplayNamePitotOnIceNone, lcGreen));
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFSXPitotWarningFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
|
||||||
|
begin
|
||||||
|
Result := TFSXPitotWarningFunctionWorker;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TFSXEngineAntiIceFunction }
|
{ TFSXEngineAntiIceFunction }
|
||||||
function TFSXEngineAntiIceFunction.GetCategoryName: string;
|
function TFSXEngineAntiIceFunction.GetCategoryName: string;
|
||||||
begin
|
begin
|
||||||
@ -375,6 +461,29 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXThrottleFunction }
|
||||||
|
function TFSXThrottleFunction.GetCategoryName: string;
|
||||||
|
begin
|
||||||
|
Result := FSXCategoryEngines;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TFSXThrottleFunction.RegisterStates;
|
||||||
|
begin
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDThrottleNoEngines, FSXStateDisplayNameThrottleNoThrottles, lcOff));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDThrottleOff, FSXStateDisplayNameThrottleOff, lcGreen));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDThrottlePartial, FSXStateDisplayNameThrottlePartial, lcAmber));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDThrottleFull, FSXStateDisplayNameThrottleFull, lcRed));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDThrottleReverse, FSXStateDisplayNameThrottleReverse, lcFlashingAmberNormal));
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFSXThrottleFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
|
||||||
|
begin
|
||||||
|
Result := TFSXThrottleFunctionWorker;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TFSXFlapsFunction }
|
{ TFSXFlapsFunction }
|
||||||
function TFSXFlapsFunction.GetCategoryName: string;
|
function TFSXFlapsFunction.GetCategoryName: string;
|
||||||
begin
|
begin
|
||||||
@ -580,4 +689,64 @@ begin
|
|||||||
Result := TFSXAvionicsMasterFunctionWorker;
|
Result := TFSXAvionicsMasterFunctionWorker;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXFuelFunction }
|
||||||
|
procedure TFSXFuelFunction.RegisterStates;
|
||||||
|
begin
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuelNotAvailable, FSXStateDisplayNameFuelNotAvailable, lcOff));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuelEmpty, FSXStateDisplayNameFuelEmpty, lcFlashingRedFast));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuel0to1, FSXStateDisplayNameFuel0to1, lcFlashingRedNormal));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuel1to2, FSXStateDisplayNameFuel1to2, lcFlashingRedNormal));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuel2to5, FSXStateDisplayNameFuel2to5, lcRed));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuel5to10, FSXStateDisplayNameFuel5to10, lcAmber));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuel10to20, FSXStateDisplayNameFuel10to20, lcAmber));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuel20to50, FSXStateDisplayNameFuel20to50, lcGreen));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuel50to75, FSXStateDisplayNameFuel50to75, lcGreen));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDFuel75to100, FSXStateDisplayNameFuel75to100, lcGreen));
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFSXFuelFunction.GetCategoryName: string;
|
||||||
|
begin
|
||||||
|
Result := FSXCategorySystems;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFSXFuelFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
|
||||||
|
begin
|
||||||
|
Result := TFSXFuelFunctionWorker;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXATCFunction }
|
||||||
|
procedure TFSXATCVisibilityFunction.RegisterStates;
|
||||||
|
begin
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDATCHidden, FSXStateDisplayNameATCHidden, lcGreen));
|
||||||
|
RegisterState(TLEDState.Create(FSXStateUIDATCVisible, FSXStateDisplayNameATCVisible, lcFlashingAmberNormal));
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFSXATCVisibilityFunction.GetCategoryName: string;
|
||||||
|
begin
|
||||||
|
Result := FSXCategoryATC;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFSXATCVisibilityFunction.GetDisplayName: string;
|
||||||
|
begin
|
||||||
|
Result := FSXFunctionDisplayNameATCVisibility;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFSXATCVisibilityFunction.GetUID: string;
|
||||||
|
begin
|
||||||
|
Result := FSXFunctionUIDATCVisibility;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
function TFSXATCVisibilityFunction.GetWorkerClass: TCustomLEDMultiStateFunctionWorkerClass;
|
||||||
|
begin
|
||||||
|
Result := TFSXATCVisibilityFunctionWorker;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -136,9 +136,14 @@ begin
|
|||||||
RegisterFunction(TFSXPressDumpSwitchFunction.Create( Self, FSXFunctionDisplayNamePressDumpSwitch, FSXFunctionUIDPressDumpSwitch));
|
RegisterFunction(TFSXPressDumpSwitchFunction.Create( Self, FSXFunctionDisplayNamePressDumpSwitch, FSXFunctionUIDPressDumpSwitch));
|
||||||
RegisterFunction(TFSXTailHookFunction.Create( Self, FSXFunctionDisplayNameTailHook, FSXFunctionUIDTailHook));
|
RegisterFunction(TFSXTailHookFunction.Create( Self, FSXFunctionDisplayNameTailHook, FSXFunctionUIDTailHook));
|
||||||
|
|
||||||
|
{ Instruments }
|
||||||
|
RegisterFunction(TFSXPitotOnOffFunction.Create( Self, FSXFunctionDisplayNamePitotOnOff, FSXFunctionUIDPitotOnOff));
|
||||||
|
RegisterFunction(TFSXPitotWarningFunction.Create( Self, FSXFunctionDisplayNamePitotWarning, FSXFunctionUIDPitotWarning));
|
||||||
|
|
||||||
{ Engines }
|
{ Engines }
|
||||||
RegisterFunction(TFSXEngineAntiIceFunction.Create( Self, FSXFunctionDisplayNameEngineAntiIce, FSXFunctionUIDEngineAntiIce));
|
RegisterFunction(TFSXEngineAntiIceFunction.Create( Self, FSXFunctionDisplayNameEngineAntiIce, FSXFunctionUIDEngineAntiIce));
|
||||||
RegisterFunction(TFSXEngineFunction.Create( Self, FSXFunctionDisplayNameEngine, FSXFunctionUIDEngine));
|
RegisterFunction(TFSXEngineFunction.Create( Self, FSXFunctionDisplayNameEngine, FSXFunctionUIDEngine));
|
||||||
|
RegisterFunction(TFSXThrottleFunction.Create( Self, FSXFunctionDisplayNameThrottle, FSXFunctionUIDThrottle));
|
||||||
|
|
||||||
{ Control surfaces }
|
{ Control surfaces }
|
||||||
RegisterFunction(TFSXFlapsFunction.Create( Self, FSXFunctionDisplayNameFlaps, FSXFunctionUIDFlaps));
|
RegisterFunction(TFSXFlapsFunction.Create( Self, FSXFunctionDisplayNameFlaps, FSXFunctionUIDFlaps));
|
||||||
@ -164,6 +169,12 @@ begin
|
|||||||
|
|
||||||
{ Radios }
|
{ Radios }
|
||||||
RegisterFunction(TFSXAvionicsMasterFunction.Create( Self, FSXFunctionDisplayNameAvionicsMaster, FSXFunctionUIDAvionicsMaster));
|
RegisterFunction(TFSXAvionicsMasterFunction.Create( Self, FSXFunctionDisplayNameAvionicsMaster, FSXFunctionUIDAvionicsMaster));
|
||||||
|
|
||||||
|
{ Fuel }
|
||||||
|
RegisterFunction(TFSXFuelFunction.Create( Self, FSXFunctionDisplayNameFuel, FSXFunctionUIDFuel));
|
||||||
|
|
||||||
|
{ ATC }
|
||||||
|
RegisterFunction(TFSXATCVisibilityFunction.Create(FSXProviderUID));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,22 +2,30 @@ unit FSXLEDFunctionWorker;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
uses
|
uses
|
||||||
|
OtlTaskControl,
|
||||||
|
|
||||||
FSXLEDFunctionProvider,
|
FSXLEDFunctionProvider,
|
||||||
FSXSimConnectIntf;
|
FSXSimConnectIntf,
|
||||||
|
LEDFunction,
|
||||||
|
LEDFunctionIntf;
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
{ Systems }
|
TCustomFSXOnOffFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||||
TFSXBatteryMasterFunctionWorker = class(TCustomFSXFunctionWorker)
|
|
||||||
protected
|
protected
|
||||||
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
|
||||||
procedure HandleData(AData: Pointer); override;
|
procedure HandleData(AData: Pointer); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TFSXDeIceFunctionWorker = class(TCustomFSXFunctionWorker)
|
|
||||||
|
{ Systems }
|
||||||
|
TFSXBatteryMasterFunctionWorker = class(TCustomFSXOnOffFunctionWorker)
|
||||||
|
protected
|
||||||
|
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TFSXDeIceFunctionWorker = class(TCustomFSXOnOffFunctionWorker)
|
||||||
protected
|
protected
|
||||||
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||||
procedure HandleData(AData: Pointer); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TFSXExitDoorFunctionWorker = class(TCustomFSXFunctionWorker)
|
TFSXExitDoorFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||||
@ -32,16 +40,14 @@ type
|
|||||||
procedure HandleData(AData: Pointer); override;
|
procedure HandleData(AData: Pointer); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TFSXParkingBrakeFunctionWorker = class(TCustomFSXFunctionWorker)
|
TFSXParkingBrakeFunctionWorker = class(TCustomFSXOnOffFunctionWorker)
|
||||||
protected
|
protected
|
||||||
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||||
procedure HandleData(AData: Pointer); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TFSXPressDumpSwitchFunctionWorker = class(TCustomFSXFunctionWorker)
|
TFSXPressDumpSwitchFunctionWorker = class(TCustomFSXOnOffFunctionWorker)
|
||||||
protected
|
protected
|
||||||
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||||
procedure HandleData(AData: Pointer); override;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TFSXTailHookFunctionWorker = class(TCustomFSXFunctionWorker)
|
TFSXTailHookFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||||
@ -51,6 +57,19 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ Instruments }
|
||||||
|
TFSXPitotOnOffFunctionWorker = class(TCustomFSXOnOffFunctionWorker)
|
||||||
|
protected
|
||||||
|
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TFSXPitotWarningFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||||
|
protected
|
||||||
|
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||||
|
procedure HandleData(AData: Pointer); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ Engines }
|
{ Engines }
|
||||||
TFSXEngineAntiIceFunctionWorker = class(TCustomFSXFunctionWorker)
|
TFSXEngineAntiIceFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||||
protected
|
protected
|
||||||
@ -64,6 +83,12 @@ type
|
|||||||
procedure HandleData(AData: Pointer); override;
|
procedure HandleData(AData: Pointer); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
TFSXThrottleFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||||
|
protected
|
||||||
|
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||||
|
procedure HandleData(AData: Pointer); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ Control surfaces }
|
{ Control surfaces }
|
||||||
TFSXFlapsFunctionWorker = class(TCustomFSXFunctionWorker)
|
TFSXFlapsFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||||
@ -158,23 +183,54 @@ type
|
|||||||
|
|
||||||
|
|
||||||
{ Radios }
|
{ Radios }
|
||||||
TFSXAvionicsMasterFunctionWorker = class(TCustomFSXFunctionWorker)
|
TFSXAvionicsMasterFunctionWorker = class(TCustomFSXOnOffFunctionWorker)
|
||||||
|
protected
|
||||||
|
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ Fuel }
|
||||||
|
TFSXFuelFunctionWorker = class(TCustomFSXFunctionWorker)
|
||||||
protected
|
protected
|
||||||
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
procedure RegisterVariables(ADefinition: IFSXSimConnectDefinition); override;
|
||||||
procedure HandleData(AData: Pointer); override;
|
procedure HandleData(AData: Pointer); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ ATC }
|
||||||
|
TFSXATCVisibilityFunctionWorker = class(TCustomLEDMultiStateFunctionWorker)
|
||||||
|
private
|
||||||
|
FMonitorTask: IOmniTaskControl;
|
||||||
|
public
|
||||||
|
constructor Create(const AProviderUID: string; const AFunctionUID: string; AStates: ILEDMultiStateFunction; ASettings: ILEDFunctionWorkerSettings; const APreviousState: string = ''); override;
|
||||||
|
destructor Destroy; override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
uses
|
uses
|
||||||
System.Math,
|
System.Math,
|
||||||
|
System.StrUtils,
|
||||||
System.SysUtils,
|
System.SysUtils,
|
||||||
|
Winapi.Windows,
|
||||||
|
|
||||||
|
OtlTask,
|
||||||
|
|
||||||
FSXResources,
|
FSXResources,
|
||||||
LEDStateIntf,
|
LEDStateIntf,
|
||||||
SimConnect;
|
SimConnect;
|
||||||
|
|
||||||
|
|
||||||
|
{ TCustomFSXOnOffFunctionWorker }
|
||||||
|
procedure TCustomFSXOnOffFunctionWorker.HandleData(AData: Pointer);
|
||||||
|
begin
|
||||||
|
if PCardinal(AData)^ <> 0 then
|
||||||
|
SetCurrentState(FSXStateUIDOn)
|
||||||
|
else
|
||||||
|
SetCurrentState(FSXStateUIDOff);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TFSXBatteryMasterFunctionWorker }
|
{ TFSXBatteryMasterFunctionWorker }
|
||||||
procedure TFSXBatteryMasterFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
procedure TFSXBatteryMasterFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
begin
|
begin
|
||||||
@ -182,15 +238,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFSXBatteryMasterFunctionWorker.HandleData(AData: Pointer);
|
|
||||||
begin
|
|
||||||
if PCardinal(AData)^ <> 0 then
|
|
||||||
SetCurrentState(FSXStateUIDOn)
|
|
||||||
else
|
|
||||||
SetCurrentState(FSXStateUIDOff);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
{ TFSXDeIceFunctionWorker }
|
{ TFSXDeIceFunctionWorker }
|
||||||
procedure TFSXDeIceFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
procedure TFSXDeIceFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
begin
|
begin
|
||||||
@ -198,15 +245,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFSXDeIceFunctionWorker.HandleData(AData: Pointer);
|
|
||||||
begin
|
|
||||||
if PCardinal(AData)^ <> 0 then
|
|
||||||
SetCurrentState(FSXStateUIDOn)
|
|
||||||
else
|
|
||||||
SetCurrentState(FSXStateUIDOff);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
{ TFSXExitDoorFunctionWorker }
|
{ TFSXExitDoorFunctionWorker }
|
||||||
procedure TFSXExitDoorFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
procedure TFSXExitDoorFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
begin
|
begin
|
||||||
@ -275,15 +313,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFSXParkingBrakeFunctionWorker.HandleData(AData: Pointer);
|
|
||||||
begin
|
|
||||||
if PCardinal(AData)^ <> 0 then
|
|
||||||
SetCurrentState(FSXStateUIDOn)
|
|
||||||
else
|
|
||||||
SetCurrentState(FSXStateUIDOff);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
{ TFSXPressDumpSwitchFunctionWorker }
|
{ TFSXPressDumpSwitchFunctionWorker }
|
||||||
procedure TFSXPressDumpSwitchFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
procedure TFSXPressDumpSwitchFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
begin
|
begin
|
||||||
@ -291,15 +320,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFSXPressDumpSwitchFunctionWorker.HandleData(AData: Pointer);
|
|
||||||
begin
|
|
||||||
if PCardinal(AData)^ <> 0 then
|
|
||||||
SetCurrentState(FSXStateUIDOn)
|
|
||||||
else
|
|
||||||
SetCurrentState(FSXStateUIDOff);
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
{ TFSXTailHookFunctionWorker }
|
{ TFSXTailHookFunctionWorker }
|
||||||
procedure TFSXTailHookFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
procedure TFSXTailHookFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
begin
|
begin
|
||||||
@ -317,6 +337,47 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXPitotOnOffFunctionWorker }
|
||||||
|
procedure TFSXPitotOnOffFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
|
begin
|
||||||
|
ADefinition.AddVariable('PITOT HEAT', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXPitotWarningFunctionWorker }
|
||||||
|
procedure TFSXPitotWarningFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
|
begin
|
||||||
|
ADefinition.AddVariable('PITOT HEAT', FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
|
||||||
|
ADefinition.AddVariable('PITOT ICE PCT', FSX_UNIT_PERCENT, SIMCONNECT_DATAType_FLOAT64);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TFSXPitotWarningFunctionWorker.HandleData(AData: Pointer);
|
||||||
|
type
|
||||||
|
PPitotData = ^TPitotData;
|
||||||
|
TPitotData = packed record
|
||||||
|
HeatActive: Cardinal;
|
||||||
|
IcePercentage: Double;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
pitotData: PPitotData;
|
||||||
|
heatActive: Boolean;
|
||||||
|
|
||||||
|
begin
|
||||||
|
pitotData := AData;
|
||||||
|
heatActive := (pitotData^.HeatActive <> 0);
|
||||||
|
|
||||||
|
case Trunc(pitotData^.IcePercentage) of
|
||||||
|
25..49: SetCurrentState(IfThen(heatActive, FSXStateUIDPitotOnIce25to50, FSXStateUIDPitotOffIce25to50));
|
||||||
|
50..74: SetCurrentState(IfThen(heatActive, FSXStateUIDPitotOnIce50to75, FSXStateUIDPitotOffIce50to75));
|
||||||
|
75..99: SetCurrentState(IfThen(heatActive, FSXStateUIDPitotOnIce75to100, FSXStateUIDPitotOffIce75to100));
|
||||||
|
100: SetCurrentState(IfThen(heatActive, FSXStateUIDPitotOnIceFull, FSXStateUIDPitotOffIceFull));
|
||||||
|
else SetCurrentState(IfThen(heatActive, FSXStateUIDPitotOnIceNone, FSXStateUIDPitotOffIceNone));
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TFSXEngineAntiIceFunctionWorker }
|
{ TFSXEngineAntiIceFunctionWorker }
|
||||||
procedure TFSXEngineAntiIceFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
procedure TFSXEngineAntiIceFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
var
|
var
|
||||||
@ -447,6 +508,64 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXThrottleFunctionWorker }
|
||||||
|
procedure TFSXThrottleFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
|
var
|
||||||
|
engineIndex: Integer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
ADefinition.AddVariable('NUMBER OF ENGINES', FSX_UNIT_NUMBER, SIMCONNECT_DATAType_INT32);
|
||||||
|
|
||||||
|
for engineIndex := 1 to FSX_MAX_ENGINES do
|
||||||
|
ADefinition.AddVariable(Format('GENERAL ENG THROTTLE LEVER POSITION:%d', [engineIndex]), FSX_UNIT_PERCENT, SIMCONNECT_DATAType_FLOAT64);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TFSXThrottleFunctionWorker.HandleData(AData: Pointer);
|
||||||
|
type
|
||||||
|
PThrottleData = ^TThrottleData;
|
||||||
|
TThrottleData = packed record
|
||||||
|
NumberOfEngines: Integer;
|
||||||
|
Position: array[1..FSX_MAX_ENGINES] of Double;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
throttleData: PThrottleData;
|
||||||
|
reverse: Boolean;
|
||||||
|
totalPosition: Double;
|
||||||
|
engineIndex: Integer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
throttleData := AData;
|
||||||
|
|
||||||
|
if throttleData^.NumberOfEngines > 0 then
|
||||||
|
begin
|
||||||
|
reverse := False;
|
||||||
|
totalPosition := 0;
|
||||||
|
|
||||||
|
for engineIndex := 1 to throttleData^.NumberOfEngines do
|
||||||
|
begin
|
||||||
|
if throttleData^.Position[engineIndex] < 0 then
|
||||||
|
begin
|
||||||
|
reverse := True;
|
||||||
|
break;
|
||||||
|
end else
|
||||||
|
totalPosition := totalPosition + throttleData^.Position[engineIndex];
|
||||||
|
end;
|
||||||
|
|
||||||
|
if reverse then
|
||||||
|
SetCurrentState(FSXStateUIDThrottleReverse)
|
||||||
|
else
|
||||||
|
case Trunc(totalPosition / throttleData^.NumberOfEngines) of
|
||||||
|
0..5: SetCurrentState(FSXStateUIDThrottleOff);
|
||||||
|
95..100: SetCurrentState(FSXStateUIDThrottleFull);
|
||||||
|
else SetCurrentState(FSXStateUIDThrottlePartial);
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
SetCurrentState(FSXStateUIDThrottleNoEngines);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TFSXFlapsFunctionWorker }
|
{ TFSXFlapsFunctionWorker }
|
||||||
procedure TFSXFlapsFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
procedure TFSXFlapsFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
begin
|
begin
|
||||||
@ -510,7 +629,7 @@ var
|
|||||||
spoilersData: PSpoilersData;
|
spoilersData: PSpoilersData;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
SpoilersData := AData;
|
spoilersData := AData;
|
||||||
|
|
||||||
if SpoilersData^.SpoilersAvailable <> 0 then
|
if SpoilersData^.SpoilersAvailable <> 0 then
|
||||||
begin
|
begin
|
||||||
@ -643,12 +762,130 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TFSXAvionicsMasterFunctionWorker.HandleData(AData: Pointer);
|
{ TFSXFuelFunctionWorker }
|
||||||
|
procedure TFSXFuelFunctionWorker.RegisterVariables(ADefinition: IFSXSimConnectDefinition);
|
||||||
begin
|
begin
|
||||||
if PCardinal(AData)^ <> 0 then
|
ADefinition.AddVariable('FUEL TOTAL CAPACITY', FSX_UNIT_NUMBER, SIMCONNECT_DATAType_FLOAT64);
|
||||||
SetCurrentState(FSXStateUIDOn)
|
ADefinition.AddVariable('FUEL TOTAL QUANTITY', FSX_UNIT_NUMBER, SIMCONNECT_DATAType_FLOAT64);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TFSXFuelFunctionWorker.HandleData(AData: Pointer);
|
||||||
|
type
|
||||||
|
PFuelData = ^TFuelData;
|
||||||
|
TFuelData = packed record
|
||||||
|
TotalCapacity: Double;
|
||||||
|
TotalQuantity: Double;
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
fuelData: PFuelData;
|
||||||
|
percentage: Integer;
|
||||||
|
|
||||||
|
begin
|
||||||
|
fuelData := AData;
|
||||||
|
|
||||||
|
if fuelData^.TotalCapacity > 0 then
|
||||||
|
begin
|
||||||
|
percentage := Ceil(fuelData^.TotalQuantity / fuelData^.TotalCapacity * 100);
|
||||||
|
case percentage of
|
||||||
|
0: SetCurrentState(FSXStateUIDFuelEmpty);
|
||||||
|
1: SetCurrentState(FSXStateUIDFuel0to1);
|
||||||
|
2: SetCurrentState(FSXStateUIDFuel1to2);
|
||||||
|
3..5: SetCurrentState(FSXStateUIDFuel2to5);
|
||||||
|
6..10: SetCurrentState(FSXStateUIDFuel5to10);
|
||||||
|
11..20: SetCurrentState(FSXStateUIDFuel10to20);
|
||||||
|
21..50: SetCurrentState(FSXStateUIDFuel20to50);
|
||||||
|
51..75: SetCurrentState(FSXStateUIDFuel50to75);
|
||||||
else
|
else
|
||||||
SetCurrentState(FSXStateUIDOff);
|
SetCurrentState(FSXStateUIDFuel75to100);
|
||||||
|
end;
|
||||||
|
end else
|
||||||
|
SetCurrentState(FSXStateUIDFuelNotAvailable);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
type
|
||||||
|
TFSXATCVisibilityStateChanged = reference to procedure(AVisible: Boolean);
|
||||||
|
|
||||||
|
TFSXATCVisibilityTask = class(TOmniWorker)
|
||||||
|
private
|
||||||
|
FOnStateChanged: TFSXATCVisibilityStateChanged;
|
||||||
|
FVisible: Boolean;
|
||||||
|
public
|
||||||
|
constructor Create(AOnStateChanged: TFSXATCVisibilityStateChanged);
|
||||||
|
procedure Run;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXATCVisibilityFunctionWorker }
|
||||||
|
constructor TFSXATCVisibilityFunctionWorker.Create(const AProviderUID, AFunctionUID: string; AStates: ILEDMultiStateFunction; ASettings: ILEDFunctionWorkerSettings; const APreviousState: string);
|
||||||
|
begin
|
||||||
|
inherited Create(AProviderUID, AFunctionUID, AStates, ASettings, APreviousState);
|
||||||
|
|
||||||
|
FMonitorTask := CreateTask(TFSXATCVisibilityTask.Create(
|
||||||
|
procedure(AVisible: Boolean)
|
||||||
|
begin
|
||||||
|
if AVisible then
|
||||||
|
SetCurrentState(FSXStateUIDATCVisible)
|
||||||
|
else
|
||||||
|
SetCurrentState(FSXStateUIDATCHidden);
|
||||||
|
end))
|
||||||
|
.SetTimer(1, MSecsPerSec, @TFSXATCVisibilityTask.Run)
|
||||||
|
.Run;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
destructor TFSXATCVisibilityFunctionWorker.Destroy;
|
||||||
|
begin
|
||||||
|
FMonitorTask.Terminate;
|
||||||
|
FMonitorTask := nil;
|
||||||
|
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TFSXATCVisibilityTask }
|
||||||
|
constructor TFSXATCVisibilityTask.Create(AOnStateChanged: TFSXATCVisibilityStateChanged);
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
|
||||||
|
FOnStateChanged := AOnStateChanged;
|
||||||
|
FVisible := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
procedure TFSXATCVisibilityTask.Run;
|
||||||
|
const
|
||||||
|
ClassNameMainWindow = 'FS98MAIN';
|
||||||
|
ClassNameChildWindow = 'FS98CHILD';
|
||||||
|
ClassNameFloatWindow = 'FS98FLOAT';
|
||||||
|
WindowTitleATC = 'ATC Menu';
|
||||||
|
|
||||||
|
var
|
||||||
|
visible: Boolean;
|
||||||
|
mainWindow: THandle;
|
||||||
|
atcWindow: THandle;
|
||||||
|
|
||||||
|
begin
|
||||||
|
{ Docked }
|
||||||
|
atcWindow := 0;
|
||||||
|
mainWindow := FindWindow(ClassNameMainWindow, nil);
|
||||||
|
if mainWindow <> 0 then
|
||||||
|
atcWindow := FindWindowEx(mainWindow, 0, ClassNameChildWindow, WindowTitleATC);
|
||||||
|
|
||||||
|
{ Undocked }
|
||||||
|
if atcWindow = 0 then
|
||||||
|
atcWindow := FindWindow(ClassNameFloatWindow, WindowTitleATC);
|
||||||
|
|
||||||
|
|
||||||
|
visible := (atcWindow <> 0) and IsWindowVisible(atcWindow);
|
||||||
|
|
||||||
|
if visible <> FVisible then
|
||||||
|
begin
|
||||||
|
FVisible := visible;
|
||||||
|
FOnStateChanged(visible);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -12,6 +12,8 @@ const
|
|||||||
FSXCategoryLights = FSXCategory + ' - Lights';
|
FSXCategoryLights = FSXCategory + ' - Lights';
|
||||||
FSXCategoryAutoPilot = FSXCategory + ' - Autopilot';
|
FSXCategoryAutoPilot = FSXCategory + ' - Autopilot';
|
||||||
FSXCategoryRadios = FSXCategory + ' - Radios';
|
FSXCategoryRadios = FSXCategory + ' - Radios';
|
||||||
|
FSXCategoryATC = FSXCategory + ' - ATC';
|
||||||
|
FSXCategoryInstruments = FSXCategory + ' - Instruments';
|
||||||
|
|
||||||
FSXStateUIDOn = 'on';
|
FSXStateUIDOn = 'on';
|
||||||
FSXStateUIDOff = 'off';
|
FSXStateUIDOff = 'off';
|
||||||
@ -40,6 +42,22 @@ const
|
|||||||
FSXStateDisplayNameEngineOnFire = 'On fire';
|
FSXStateDisplayNameEngineOnFire = 'On fire';
|
||||||
|
|
||||||
|
|
||||||
|
FSXFunctionUIDThrottle = 'throttle';
|
||||||
|
FSXFunctionDisplayNameThrottle = 'Throttle';
|
||||||
|
|
||||||
|
FSXStateUIDThrottleNoEngines = 'noEngines';
|
||||||
|
FSXStateUIDThrottleOff = 'off';
|
||||||
|
FSXStateUIDThrottlePartial = 'partial';
|
||||||
|
FSXStateUIDThrottleFull = 'full';
|
||||||
|
FSXStateUIDThrottleReverse = 'reverse';
|
||||||
|
|
||||||
|
FSXStateDisplayNameThrottleNoThrottles = 'No engines';
|
||||||
|
FSXStateDisplayNameThrottleOff = 'Off';
|
||||||
|
FSXStateDisplayNameThrottlePartial = 'Partial';
|
||||||
|
FSXStateDisplayNameThrottleFull = 'Full';
|
||||||
|
FSXStateDisplayNameThrottleReverse = 'Reversed';
|
||||||
|
|
||||||
|
|
||||||
FSXFunctionUIDGear = 'gear';
|
FSXFunctionUIDGear = 'gear';
|
||||||
FSXFunctionDisplayNameGear = 'Landing gear';
|
FSXFunctionDisplayNameGear = 'Landing gear';
|
||||||
|
|
||||||
@ -194,6 +212,71 @@ const
|
|||||||
FSXFunctionDisplayNameAutoPilotNav = 'Autopilot nav';
|
FSXFunctionDisplayNameAutoPilotNav = 'Autopilot nav';
|
||||||
|
|
||||||
|
|
||||||
|
FSXFunctionUIDFuel = 'fuelLevel';
|
||||||
|
FSXFunctionDisplayNameFuel = 'Fuel Level';
|
||||||
|
|
||||||
|
FSXStateUIDFuelNotAvailable = 'notAvailable';
|
||||||
|
FSXStateUIDFuelEmpty = 'empty';
|
||||||
|
FSXStateUIDFuel0to1 = '0To1';
|
||||||
|
FSXStateUIDFuel1to2 = '1To2';
|
||||||
|
FSXStateUIDFuel2to5 = '2To5';
|
||||||
|
FSXStateUIDFuel5to10 = '5To10';
|
||||||
|
FSXStateUIDFuel10to20 = '10To20';
|
||||||
|
FSXStateUIDFuel20to50 = '20To50';
|
||||||
|
FSXStateUIDFuel50to75 = '50To75';
|
||||||
|
FSXStateUIDFuel75to100 = '75To100';
|
||||||
|
|
||||||
|
FSXStateDisplayNameFuelNotAvailable = 'Not available';
|
||||||
|
FSXStateDisplayNameFuelEmpty = 'Empty';
|
||||||
|
FSXStateDisplayNameFuel0to1 = '< 1%';
|
||||||
|
FSXStateDisplayNameFuel1to2 = '< 2%';
|
||||||
|
FSXStateDisplayNameFuel2to5 = '< 5%';
|
||||||
|
FSXStateDisplayNameFuel5to10 = '< 10%';
|
||||||
|
FSXStateDisplayNameFuel10to20 = '< 20%';
|
||||||
|
FSXStateDisplayNameFuel20to50 = '< 50%';
|
||||||
|
FSXStateDisplayNameFuel50to75 = '< 75%';
|
||||||
|
FSXStateDisplayNameFuel75to100 = '75% - Full';
|
||||||
|
|
||||||
|
|
||||||
|
FSXFunctionUIDATCVisibility = 'atcVisiblity';
|
||||||
|
FSXFunctionDisplayNameATCVisibility = 'ATC Visibility (experimental)';
|
||||||
|
|
||||||
|
FSXStateUIDATCHidden = 'hidden';
|
||||||
|
FSXStateUIDATCVisible = 'visible';
|
||||||
|
|
||||||
|
FSXStateDisplayNameATCHidden = 'Hidden';
|
||||||
|
FSXStateDisplayNameATCVisible = 'Visible';
|
||||||
|
|
||||||
|
|
||||||
|
FSXFunctionUIDPitotOnOff = 'pitotOnOff';
|
||||||
|
FSXFunctionDisplayNamePitotOnOff = 'Pitot heat (on / off only)';
|
||||||
|
|
||||||
|
|
||||||
|
FSXFunctionUIDPitotWarning = 'pitotWarning';
|
||||||
|
FSXFunctionDisplayNamePitotWarning = 'Pitot heat (including warnings)';
|
||||||
|
|
||||||
|
FSXStateUIDPitotOffIceNone = 'off0';
|
||||||
|
FSXStateUIDPitotOffIce25to50 = 'off25To50';
|
||||||
|
FSXStateUIDPitotOffIce50to75 = 'off50To75';
|
||||||
|
FSXStateUIDPitotOffIce75to100 = 'off75To100';
|
||||||
|
FSXStateUIDPitotOffIceFull = 'off100';
|
||||||
|
FSXStateUIDPitotOnIceNone = 'on0';
|
||||||
|
FSXStateUIDPitotOnIce25to50 = 'on25To50';
|
||||||
|
FSXStateUIDPitotOnIce50to75 = 'on50To75';
|
||||||
|
FSXStateUIDPitotOnIce75to100 = 'on75To100';
|
||||||
|
FSXStateUIDPitotOnIceFull = 'on100';
|
||||||
|
|
||||||
|
FSXStateDisplayNamePitotOffIceNone = 'Heat off - No ice';
|
||||||
|
FSXStateDisplayNamePitotOffIce25to50 = 'Heat off - > 25% iced';
|
||||||
|
FSXStateDisplayNamePitotOffIce50to75 = 'Heat off - > 50% iced';
|
||||||
|
FSXStateDisplayNamePitotOffIce75to100 = 'Heat off - > 75% iced';
|
||||||
|
FSXStateDisplayNamePitotOffIceFull = 'Heat off - Fully iced';
|
||||||
|
FSXStateDisplayNamePitotOnIceNone = 'Heat on - No ice';
|
||||||
|
FSXStateDisplayNamePitotOnIce25to50 = 'Heat on - > 25% iced';
|
||||||
|
FSXStateDisplayNamePitotOnIce50to75 = 'Heat on - > 50% iced';
|
||||||
|
FSXStateDisplayNamePitotOnIce75to100 = 'Heat on - > 75% iced';
|
||||||
|
FSXStateDisplayNamePitotOnIceFull = 'Heat on - Fully iced';
|
||||||
|
|
||||||
|
|
||||||
FSXMenuProfiles = 'G940 Profile';
|
FSXMenuProfiles = 'G940 Profile';
|
||||||
FSXMenuProfileFormat = 'G940: %s';
|
FSXMenuProfileFormat = 'G940: %s';
|
||||||
|
41
Setup/G940LEDControl.iss
Normal file
41
Setup/G940LEDControl.iss
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#define AppName "G940 LED Control"
|
||||||
|
#define AppExeName "G940LEDControl.exe"
|
||||||
|
#define AppVersion GetFileVersion("..\G940LEDControl\Bin\" + AppExeName)
|
||||||
|
#define AppPublisher "X²Software"
|
||||||
|
#define AppURL "http://g940.x2software.net/"
|
||||||
|
|
||||||
|
[Setup]
|
||||||
|
AppId={{704baf93-d22e-471b-bdcf-d21d82d73398}
|
||||||
|
AppName={#AppName}
|
||||||
|
AppVersion={#AppVersion}
|
||||||
|
AppPublisher={#AppPublisher}
|
||||||
|
AppPublisherURL={#AppURL}
|
||||||
|
AppSupportURL={#AppURL}
|
||||||
|
AppUpdatesURL={#AppURL}
|
||||||
|
DefaultDirName={pf}\{#AppName}
|
||||||
|
DefaultGroupName={#AppName}
|
||||||
|
AllowNoIcons=yes
|
||||||
|
;LicenseFile=..\license.txt
|
||||||
|
OutputDir=output
|
||||||
|
OutputBaseFilename=G940LEDControlSetup-{#AppVersion}
|
||||||
|
Compression=lzma
|
||||||
|
SolidCompression=yes
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "..\G940LEDControl\Bin\{#AppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
|
Source: "..\G940LEDControl\Bin\LogiJoystickDLL.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
|
Source: "..\G940LEDControl\Bin\SimConnect.dll"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExeName}"
|
||||||
|
Name: "{commondesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#AppName}}"; Flags: nowait postinstall skipifsilent
|
||||||
|
|
Loading…
Reference in New Issue
Block a user