1
0
mirror of synced 2024-11-16 15:33:50 +00:00

Implemented warning and error states

Improved error handling
Delphi XE2 compatibility
This commit is contained in:
Mark van Renswoude 2012-01-08 20:07:38 +00:00
parent 2af968faef
commit e5463b9e27
13 changed files with 880 additions and 956 deletions

View File

@ -118,7 +118,6 @@ object MainForm: TMainForm
Font.Height = -11 Font.Height = -11
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
Font.Style = [] Font.Style = []
ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
ParentFont = False ParentFont = False
TabOrder = 0 TabOrder = 0
@ -134,7 +133,6 @@ object MainForm: TMainForm
Style = csDropDownList Style = csDropDownList
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
DropDownCount = 20 DropDownCount = 20
ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
TabOrder = 1 TabOrder = 1
Text = 'Parking brake' Text = 'Parking brake'
@ -149,7 +147,6 @@ object MainForm: TMainForm
Style = csDropDownList Style = csDropDownList
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
DropDownCount = 20 DropDownCount = 20
ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
TabOrder = 2 TabOrder = 2
Text = 'Landing lights' Text = 'Landing lights'
@ -164,7 +161,6 @@ object MainForm: TMainForm
Style = csDropDownList Style = csDropDownList
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
DropDownCount = 20 DropDownCount = 20
ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
TabOrder = 3 TabOrder = 3
Text = 'Landing gear' Text = 'Landing gear'
@ -179,7 +175,6 @@ object MainForm: TMainForm
Style = csDropDownList Style = csDropDownList
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
DropDownCount = 20 DropDownCount = 20
ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
TabOrder = 4 TabOrder = 4
Text = '<Not assigned>' Text = '<Not assigned>'
@ -194,7 +189,6 @@ object MainForm: TMainForm
Style = csDropDownList Style = csDropDownList
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
DropDownCount = 20 DropDownCount = 20
ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
TabOrder = 5 TabOrder = 5
Text = '<Not assigned>' Text = '<Not assigned>'
@ -209,7 +203,6 @@ object MainForm: TMainForm
Style = csDropDownList Style = csDropDownList
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
DropDownCount = 20 DropDownCount = 20
ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
TabOrder = 6 TabOrder = 6
Text = 'Instrument lights' Text = 'Instrument lights'
@ -224,7 +217,6 @@ object MainForm: TMainForm
Style = csDropDownList Style = csDropDownList
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
DropDownCount = 20 DropDownCount = 20
ItemHeight = 13
ItemIndex = 0 ItemIndex = 0
TabOrder = 7 TabOrder = 7
Text = '<Not assigned>' Text = '<Not assigned>'
@ -297,188 +289,188 @@ object MainForm: TMainForm
Height = 64 Height = 64
AutoSize = True AutoSize = True
Picture.Data = { Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000004000 0954506E67496D61676589504E470D0A1A0A0000000D49484452000000400000
0000400806000000AA6971DE0000001974455874536F6674776172650041646F 00400806000000AA6971DE0000001974455874536F6674776172650041646F62
626520496D616765526561647971C9653C000016424944415478DAED5B097454 6520496D616765526561647971C9653C000016424944415478DAED5B09745465
6596BEB5A4925452492A5B5565237B422A1B842D203620A233CD32EA8C23DD6D 96BEB5A4925452492A5B5565237B422A1B842D203620A233CD32EA8C23DD6D6B
6BAB38CCA0D29E565BB6695A5C41A0C1BD955D96398D0B22626B1F1515B12181 AB38CCA0D29E565BB6695A5C41A0C1BD955D96398D0B22626B1F1515B121812C
2C908DAC55D993CA5AD9AA2A5573BFBFF26241E3B4A860E6D87FCE3BAFB6B7DC 908DAC55D993CA5AD9AA2A5573BFBFF26241E3B4A860E6D87FCE3BAFB6B7DCEF
EFFFEEBDDFBDFF8BCCE572251251276F72FA710D276F5A1903A01D01E0C73804 FFEEBDDFBDFF8BCCE572251251276F72FA710D276F5A1903A01D01E0C7380400
0061FCA2ED87BE931F6884FD03801F000095D56AD5DBEDF6009BCDE6373C3CEC 61FCA2ED87BE931F6884FD03801F000095D56AD5DBEDF6009BCDE6373C3CECCD
CDAFB179F1A6181C1854A9FDD4D69494943F0F0E0E6A9B9B9B93F9774AFE4EEE AFB179F1A6181C1854A9FDD4D69494943F0F0E0E6A9B9B9B93F9774AFE4EEE74
743A8937194E2297CB9D0A85C2A1542A6D5E5E5E761F1F9FDEB0B0B07A7EEF18 3A8937194E2297CB9D0A85C2A1542A6D5E5E5E761F1F9FDEB0B0B07A7EEF18B3
B300B4B6B61ADFF8D3C16D1D1D1DE90EC7B0920D53381C0EF9D0D0909C8DA5FE 00B4B6B61ADFF8D3C16D1D1D1DE90EC7B0920D53381C0EF9D0D0909C8DA5FEFE
FE7EEAEAEAC2DE71DFFDF7AD292D29FDF7828282F49E9E1E396FD4D7DF47B621 7EEAEAEAC2DE71DFFDF7AD292D29FDF7828282F49E9E1E396FD4D7DF47B6211B
1BF131C4C091D3E574D96D76676868A833332B7378CE7573FE7CFBEDB7DFC6C0 F131C4C091D3E574D96D76676868A833332B7378CE7573FE7CFBEDB7DFC6C0D8
D8C61C00ED6DED098FFDFEB1BF984CA6581F6F1F72F11F06661506F17D505F5F C61C00ED6DED098FFDFEB1BF984CA6581F6F1F72F11F06661506F17D505F5F1F
1F353535512783306DEA54F1596F6F2F3163686060801828F15B6683D8982D14 353535512783306DEA54F1596F6F2F3163686060801828F15B6683D8982D1417
171F4773E7CEA5F0F070EAE7DFDC7DCF5D130D06C399310500A8FEE8238F7E78 1F4773E7CEA5F0F070EAE7DFDC7DCF5D130D06C399310500A8FEE8238F7E78FC
FCF8F15C3F3F3F61984C26137B00803DCF1A7577775375753585EB7414151929 F8F15C3F3F3F61984C26137B00803DCF1A7577775375753585EB741415192900
0081D1D860B09875B71BE09C949E9E4E1919198239CC2A8A8D8BA5DB7EB6F8E1 81D1D860B09875B71BE09C949E9E4E1919198239CC2A8A8D8BA5DB7EB6F8E149
493939CF8E2900DE39F4CEFD2B57ACDC0AE361288CF71CECCFE2B39A9A1A31E3 3939CF8E2900DE39F4CEFD2B57ACDC0AE361288CF71CECCFE2B39A9A1A31E3E3
E3C68D1B3512332EB1447A8DCF636262C4CC9796968A0DAF333233282030E0FC C68D1B3512332EB1447A8DCF636262C4CC9796968A0DAF333233282030E0FC2D
2DB7DC325BA3D1348C0900F88695BF7E60F9F1FCFCD353008064ACB461001450 B7DC325BA3D1348C0900F88695BF7E60F9F1FCFCD353008064ACB461001450BF
BFACBC8CB45A2D2527258B59C78C63F3A43DDE0380D4D454CA9934897C7C7D68 ACBC8CB45A2D2527258B59C78C63F3A43DDE0380D4D454CA9934897C7C7D68FB
FB6BDBE8D65B6FA5B884381CE75ABC787136BB44D19800A0B7B747F75F4B9795 6BDBE8D65B6FA5B884381CE75ABC787136BB44D19800A0B7B747F75F4B979570
70700BF6F5F51500C0600C4F269CCA3B4595559594919E41498949170020190F 700BF6F5F51500C0600C4F269CCA3B4595559594919E41498949170020190F20
20603C3ECBC9C911B1019F7FF4F14774F34D37D3D4695369F69CD90F2425253D 603C3ECBC9C911B1019F7FF4F14774F34D37D3D4695369F69CD90F2425253DCF
CFA7748D09001A1A1A8CCBEF5F9ECF37EFCD83384D11A7AD5157C01E061D3B76 A7748D09001A1A1A8CCBEF5F9ECF37EFCD83384D11A7AD5157C01E061D3B768C
8C6A4C35343967F2280012ED3D37F83B8E9F316306718AA4BADA3AAA33D751CE 6A4C35343967F2280012ED3D37F83B8E9F316306718AA4BADA3AAA33D751CEC4
C41C321AD368C97FDC3B272222E2E36F787B571E80A2A2A2EB1F79E8910F70D3 1C321AD368C97FDC3B272222E2E36F787B571E80A2A2A2EB1F79E8910F70D300
00007B80800D6C50A954C2D88F3FF998EA1BEA39FA4FA3F8B878425AF47401C9 007B80800D6C50A954C2D88F3FF998EA1BEA39FA4FA3F8B878425AF47401C90D
0DF0398E4B4B4B63838D545656466016B24A5FAF951EFCCD83F35252533F1C33 F0398E4B4B4B63838D545656466016B24A5FAF951EFCCD83F35252533F1C3300
007CFED967B7AE5CB1EA7FD46AB530569A7D0908EC01C0B14F8F51635323CD98 7CFED967B7AE5CB1EA7FD46AB530569A7D0908EC01C0B14F8F51635323CD983E
3E8362A262687068F082E007E3A50088E358F40800CE9E3DCB2039E991471FA1 8362A262687068F082E007E3A50088E358F40800CE9E3DCB2039E991471FA1A6
A6C6C6F6DCE9D37374BA70D39801E0C30F3EB86BD5CAD5DBFCFDFD85B19E0C90 C6C6F6DCE9D37374BA70D39801E0C30F3EB86BD5CAD5DBFCFDFD85B19E0C905E
5EC3A8CF8F7F4EED1DED3463DA74D285EB69C83674010092F801587ABD9E58FC C3A8CF8F7F4EED1DED3463DA74D285EB69C83674010092F801587ABD9E58FC50
505D5D1D353636D21D77FC92162C5A4401019A0FF9BB791767991F1480B7DE7C 5D5D1D353636D21D77FC92162C5A4401019A0FF9BB791767991F1480B7DE7CF3
F3A1B5BFFBFD06002031C0D305F01EB37DF2E449B19F3471120506068E467C4F A1B5BFFBFD06002031C0D305F01EB37DF2E449B19F3471120506068E467C4FE3
E3A52D2424443080330BC7042B6D7D6EAB0051A7D79FCBCDCDCDE1CB0E8D1900 A52D2424443080330BC7042B6D7D6EAB0051A7D79FCBCDCDCDE1CB0E8D190076
76EDDCB5EEA9279F5ACD79799401921B481B025BF9F9722183A74E9E2A7C5A8A EDDCB5EEA9279F5ACD79799401921B481B025BF9F9722183A74E9E2A7C5A8AFA
FA608104060413400300ACFD292F2F8FDADA5A69DE0D375050509073F9F2E54B 608104060413400300ACFD292F2F8FDADA5A69DE0D375050509073F9F2E54BB3
B3B2B35EBD8CDBBBF200BCF4E24BEBD73FB3FE61CCAAA7EF63F304A0BAA69A7A B2B35EBD8CDBBBF200BCF4E24BEBD73FB3FE61CCAAA7EF63F304A0BAA69A7AAD
ADBD8201F8CE53F8783200BFC7ECB3C1545E5E4E26CE0009F189347FE1828655 BD8201F8CE53F8783200BFC7ECB3C1545E5E4E26CE0009F189347FE1828655AB
AB56A630407D630A802D7FD8B265C3FA0D0F80019E867B02009D5FC10C4030CB 56A630407D630A802D7FD8B265C3FA0D0F80019E867B02009D5FC10C4030CBCE
CECA16E9F162C325198CEF38CD0937816A940223CF7CE1A6CD9B263300F63105 CA16E9F162C325198CEF38CD0937816A940223CF7CE1A6CD9B263300F63105C0
C0E64D9BB63EFDD433F70300180B0A7BC6007C86D456535BC3CA88282D354D50 E64D9BB63EFDD433F70300180B0A7BC6007C86D456535BC3CA88282D354D50DD
DD53F74B00482E00A98C8DD1A0B0F030FAE2F8173471C28477376CDCB0E0326F 53F74B00482E00A98C8DD1A0B0F030FAE2F8173471C28477376CDCB0E0326FEF
EFCA03F0C273CF3FFD5B1EC1C121C26849FC486048002005028044A6B3542449 CA03F0C273CF3FFD5B1EC1C121C26849FC486048002005028044A6B35424499B
9BE77B9C030C08E1F379FB780B006A590CCDBDEEBA5797DDBFECDE3107C0892F E77B9C030C08E1F379FB780B006A590CCDBDEEBA5797DDBFECDE3107C0892F4E
4EDCB86CD9B29D0DF50D3A501D0623C849AA102080C22DAD2DE2754C748C384E DCB86CD9B29D0DF50D3A501D0623C849AA102080C22DAD2DE2754C748C384E18
18EE74A1E6170048ACC0315CEE8A18A0F6558B7489E397FEE7D2DF2E5CB470FD EE74A1E6170048ACC0315CEE8A18A0F6558B7489E397FEE7D2DF2E5CB470FD98
98030083357B585161E1A453274F5DC39A7F527151714E7D7D43080CF6E5683E 030083357B585161E1A453274F5DC39A7F527151714E7D7D43080CF6E5683ECC
CCC6593A2DACDE5D141A1C3ACA1430028A1EC64BA0E03BE800082B1457A80A2B C6593A2DACDE5D141A1C3ACA1430028A1EC64BA0E03BE800082B1457A80A2B2B
2B2B69D57FAFBAF99A19D7BC352601B8787475751A8A8A8AB3563EBA6273FEE9 2B69D57FAFBAF99A19D7BC352601B8787475751A8A8A8AB3563EBA6273FEE9FC
FC541F6604040E0CD40669C58CE2B55C8178E1454EC7B0384E124F3A9D8E8283 541F6604040E0CD40669C58CE2B55C8178E1454EC7B0384E124F3A9D8E828383
83C566369B893546CBC1370F66325B1CBD3DBDDECCB06EFEAE7FCC0280515559 C566369B893546CBC1370F66325B1CBD3DBDDECCB06EFEAE7FCC0280515559F5
F5935FDDF9AB3D2525E7A255EC0E3DBD3D62D693129284F19DDD9D28A4C4ECC7 935FDDF9AB3D2525E7A255EC0E3DBD3D62D693129284F19DDD9D28A4C4ECC7C6
C68C6323355C32378A78A1D5060F474545F5474545D6C4C5C79F0C0D0DB35A7B 8C6323355C32378A78A1D5060F474545F5474545D6C4C5C79F0C0D0DB35A7B7B
7B354DCD4DC96C7C09EB864206AB2C3323B3F417BFFC4533DC6D4C01F0C1FB1F 354DCD4DC96C7C09EB864206AB2C3323B3F417BFFC4533DC6D4C01F0C1FB1F3C
3C5C5C5CFCC4C1837FF2AAA8382F440D00C08CC7C5C489C2A6974BDDE6966652 5C5C5CFCC4C1837FF2AAA8382F440D00C08CC7C5C489C2A6974BDDE6966652F1
F18CCF9E3D9B6EBCE146AAAEAEA2F3E72BE102676EBAE9A617144A45F7F1CF8F 8CCF9E3D9B6EBCE146AAAEAEA2F3E72BE102676EBAE9A617144A45F7F1CF8FFF
FF339AA9D7CEBAF6DD59B3661D429394D9A432D599346FBFF5B67F557555F7DA 339AA9D7CEBAF6DD59B3661D429394D9A432D599346FBFF5B67F557555F7DAB5
B56BBBF506FDA5CAE3AB0B80B5D71AF0EEE1773773D172170C7EE38D3778961B 6BBBF506FDA5CAE3AB0B80B5D71AF0EEE1773773D172170C7EE38D3778961B85
8544C67BCC5474543433C045DD3D5D34C0B31DCC2E71EDAC9F882AB1ABB35368 44C67BCC5474543433C045DD3D5D34C0B31DCC2E71EDAC9F882AB1ABB3536806
068E2936DE0F984C260D8B28D9BC79F3F6C425C415707D50C7E9B19CB3441DBB 8E2936DE0F984C260D8B28D9BC79F3F6C425C415707D50C7E9B19CB3441DBB8A
8A15D73C72E4880F03E1DCB869A33D2020E06210AE1E001CF4528F1C3EBCDD6E 15D73C72E4880F03E1DCB869A33D2020E06210AE1E001CF4528F1C3EBCDD6EB7
B7E56A3401A299B165EB16B2B47790973703D0D3C381CD9722F411C20598D388 E56A3401A299B165EB16B2B47790973703D0D3C381CD9722F411C20598D38889
89E2F5D2A54B29392599BABABBA8AFAF9FAC3DBDD4C9604008E1B8969616B147 E2F5D2A54B29392599BABABBA8AFAF9FAC3DBDD4C9604008E1B8969616B14796
9660306D5AADB6695A6EEEB165F72D5B131E1E66DAB963A7A2BAAA4AF6D8E3EB 60306D5AADB6695A6EEEB165F72D5B131E1E66DAB963A7A2BAAA4AF6D8E3EB2E
2E6E995F1D00CE9C39F34F1FFDE5A3577D7D7D220F1D3A44164B07F50FF48986 6E995F1D00CE9C39F34F1FFDE5A3577D7D7D220F1D3A44164B07F50FF4898686
8652E1C5D457A073441AF673C85C180D790C46801D6969E3897D9E1C6CA028A0 52E1C5D457A073441AF673C85C180D790C46801D6969E3897D9E1C6CA028A038
38304225221E801152E75800D2DD4336BB8302028368E1A2F9C50F3FFC9B397C 304225221E801152E75800D2DD4336BB8302028368E1A2F9C50F3FFC9B397C8E
8EF67B97DCAB5C72EF12E79429539C571580A3EF1D7D282F2FFFF1E8C848EFBD F67B97DCAB5C72EF12E79429539C571580A3EF1D7D282F2FFFF1E8C848EFBDFB
FBF6B21FD7607D80121212841126B349A442748071D3C15AED280032B94C748A F6B21FD7607D80121212841126B349A442748071D3C15AED280032B94C748A7B
7B7ABA19086F217E50554203C4C6C68A521800201B203B747676513F33242C3C 7ABA19086F217E50554203C4C6C68A521800201B203B747676513F33242C3C9C
9C8CE9E9AC39E434F7FAEB56DC70C3BCA7BF3CF1A59C63856CE6B53387AF0A00 8CE9E9AC39E434F7FAEB56DC70C3BCA7BF3CF1A59C63856CE6B53387AF0A006C
6C80EF81FD07B6D6D6D4DE83EECDE1C3EF504949A9C8DFA02CD45C9BA55D1867 80EF81FD07B6D6D6D4DE83EECDE1C3EF504949A9C8DFA02CD45C9BA55D1867B7
B7D90500A121A104C90C60F01EB466FD2798A00DD48A2A108C409A8C8E8E1620 D90500A121A104C90C60F01EB466FD2798A00DD48A2A108C409A8C8E8E1620E1
E177A816C10CBB7D98821840B4CBA572392252FFD9E6CD1B67738681E123CAE2 77A816C10CBB7D98821840B4CBA572392252FFD9E6CD1B67738681E123CAE20A
0A03D0D4D814BD7DDBF6DD7CA3B392921239729FA78307DF10378616166E4E5A 03D0D4D814BD7DDBF6DD7CA3B392921239729FA78307DF10378616166E4E5A1F
1FC00643C18AB0D030A1FC60100C03A5E53239F9F9FB89DC8F59067828845252 C00643C18AB0D030A1FC60100C03A5E53239F9F9FB89DC8F5906782884525252
5204EDE146D87B31438238601AD38D02C892921271DD88088365E7AEED690C7C 04EDE146D87B31438238601AD38D02C892921271DD88088365E7AEED690C7CEB
EB256EF5FB07A0A8B068D26BAFBEF63AA7A394969656BEF170D6EAB5C24850B5 256EF5FB07A0A8B068D26BAFBEF63AA7A394969656BEF170D6EAB5C24850B5A8
A8A848F8B3541461762D160B718416F4961641F07BA9318AEFB081F230184080 A848F8B3541461762D160B718416F4961641F07BA9318AEFB081F2301840800D
0D7ECCA66176171F1F35A919502C92A05384365955559588117E6A5FE7CBAFBC 7ECCA66176171F1F35A919502C92A05384365955559588117E6A5FE7CBAFBC38
38333129E98B2B0EC091778FDC79F8D0E18D757575C1C8E9A02BA42AFC147255 333129E98B2B0EC091778FDC79F8D0E18D757575C1C8E9A02BA42AFC147255EA
EA00C3F8D14ACF394C1D1C140D1106CEF9AAD122C94D6937103016511F1523C0 00C3F8D14ACF394C1D1C140D1106CEF9AAD122C94D6937103016511F1523C002
022BB014C63A803541041B1D46E9C6740A0D0B15006375498087E33986ACF9DD 2BB014C63A803541041B1D46E9C6740A0D0B15006375498087E33986ACF9DDEA
EA658B7FB6F8C52B0600FBB072DBF66DBFFBFCD867ABD38C4621642A2A2AC4CD 658B7FB6F8C52B0600FBB072DBF66DBFFBFCD867ABD38C4621642A2A2AC4CD77
77777531BDDBC8DA67E51B97896006E1834A0E6B84608190BD6CB054F6820991 777531BDDBC8DA67E51B97896006E1834A0E6B84608190BD6CB054F682099191
9191D4D6D636BA6CC699843A3A3BF8782FD2EB0C5C04D9983DBE149F104F9372 91D4D6D636BA6CC699843A3A3BF8782FD2EB0C5C04D9983DBE149F104F937272
72845B15161609A0058B46E434D619391BECDEB8F1D93BAE0800EDEDED219B36 845B15161609A0058B46E434D619391BECDEB8F1D93BAE0800EDEDED219B366F
6FFDE3F9CACA9B53929349E3A7E674C61BFB29C6F98A4A3A95970711C411DA4A FDE3F9CACA9B53929349E3A7E674C61BFB29C6F98A4A3A95970711C411DA4A03
03FD0334281A9EEEFA5E21773747008A00865D0200A0629400C0AA11661E8085 FD0334281A9EEEFA5E21773747008A00865D0200A0629400C0AA11661E8085B3
B34BC1405FB53FC5C7C7D3848913D8CDC2A8A0A0902ACACF8B0029DA69E822F3 4BC1405FB53FC5C7C7D3848913D8CDC2A8A0A0902ACACF8B0029DA69E822F3B1
B1880F29A9C927DE7CF3E0357C1DE745B7FFDD00282F2BCFDCF487AD2FFBD9AC 880F29A9C927DE7CF3E0357C1DE745B7FFDD00282F2BCFDCF487AD2FFBD9ACB9
B9B18670B2ABD82755BEA440DB8B8D191AB4513DEBF9C484586A696C26B3A9DE B18670B2ABD82755BEA440DB8B8D191AB4513DEBF9C484586A696C26B3A9DEBD
BDE2CB22C7CAE96AA0DF2A80E9636086871D9CE7DDA52F673F31EB5084727E03 E2CB22C7CAE96AA0DF2A80E9636086871D9CE7DDA52F673F31EB5084727E03F1
F10377822BD8386304040452744C344D9C982300013BCEB3A40630A3EB8960D3 0377822BD8386304040452744C344D9C982300013BCEB3A40630A3EB8960D348
48B7880596E5C87B87D338905E1C0843BF35002C6C166EDFB9FB95DCE8507D46 B7880596E5C87B87D338905E1C0843BF35002C6C166EDFB9FB95DCE8507D4643
4315B59C2D25E39C9994A78BA3B25E0745A9B9D61FE8A5E68E6EB2D858DAF6BB 15B59C2D25E39C9994A78BA3B25E0745A9B9D61FE8A5E68E6EB2D858DAF6BBFB
FBFCC8E17E7E6AE1FB2E50B4A34300D5D9D5C972D84A8303FD0290418E1B76D1 FCC8E17E7E6AE1FB2E50B4A34300D5D9D5C972D84A8303FD0290418E1B76D113
13441F5029D2A39CD982A2289A8BA38939D93CF37A2A3853C099A59C8D1F1C5D 441F5029D2A39CD982A2289A8BA38939D93CF37A2A3853C099A59C8D1F1C5D37
37947A8938BF6364696DEDDA350FDEF2AFB7BCC40CF3EC18877C2B0076EED87D 947A8938BF6364696DEDDA350FDEF2AFB7BCC40CF3EC18877C2B0076EED87DDF
DFE1770E6D08090FF7991D1D4EC98D55A460BAB61B22E81355281902FD28ADCB E1770E6D08090FF7991D1D4EC98D55A460BAB61B22E81355281902FD28ADCB44
4475A74F5138DF6C6F5C2A1DADED6661E3A43E2B1A1F2ABE59A63DFB306656C1 75A74F5138DF6C6F5C2A1DADED6661E3A43E2B1A1F2ABE59A63DFB306656C12E
2ED0DAD62ED82013DD1F6941D4C686D99815288D95423019583F4C98908DF446 D0DAD62ED82013DD1F6941D4C686D99815288D95423019583F4C98908DF446A7
A7617C6919477BB74B499DE4610030D245827B216DD6D7D701FC73D3A7E77EF2 617C6919477BB74B499DE4610030D245827B216DD6D7D701FC73D3A7E77EF2E8
E88A15EB5887B45C36009C977DB76E79EEC9BF9EFAF4D7FE61323143319111E4 8A15EB5887B45C36009C977DB76E79EEC9BF9EFAF4D7FE61323143319111E44F
4F6114E8E5478D5DECE3EC65330C8194DAD7448A965AEAF7F1A72F65A154452A 6114E8E5478D5DECE3EC65330C8194DAD7448A965AEAF7F1A72F65A154452A76
7611339536549292293E292D894C6715E492F9927CA88F382F507BDFA060035C 11339536549292293E292D894C6715E492F9927CA88F382F507BDFA060035C40
40EA09628F3259C96EA5D7EB84F18608CC7C11950AE3072F584116C78C000070 EA09628F3259C96EA5D7EB84F18608CC7C11950AE3072F584116C78C000070BD
BDB9CEE86756595874B5715AC66F76EFDEBDE4E7B7FFFCB5CB7281FAFAFA8867 B9CEE86756595874B5715AC66F76EFDEBDE4E7B7FFFCB5CB7281FAFAFA88679E
9E5AFFC7D696869FC6E57851514B2959070768667A1AF5D7710A5386D2B0AC85 5AFFC7D696869FC6E57851514B2959070768667A1AF5D7710A5386D2B0AC857A
7A07BA48ABD65094269C111BA6762E5CCE5B06B8E0B19336A1971A0699013217 07BA48ABD65094269C111BA6762E5CCE5B06B8E0B19336A1971A069901321769
690682C96689A0047687487339595ADB2922369A4AD421F469451D29C82D9220 0682C96689A0047687487339595ADB2922369A4AD421F469451D29C82D9220DB
DBA0FDE1EBD913B2C860D071B42FA6D212B7F152E7D8F3010AEC11447D38A09A A0FDE1EBD913B2C860D071B42FA6D212B7F152E7D8F3010AEC11447D38A09A1B
1B4C42318E144A22083FBB71C3EABBEFBEFB896F0C00FB59CE9AD56B5E6A696E 4C42318E144A22083FBB71C3EABBEFBEFB896F0C00FB59CE9AD56B5E6A696E9D
9D3C79CA44F20DE9259B5737073BCE02B52E9EFD78D2EA07C9642FA573D566CA 3C79CA44F20DE9259B5737073BCE02B52E9EFD78D2EA07C9642FA573D566CACD
CD8EA7005B1C59DBC2C8EEECE2A8DF4676A6B28F8F8AB5A882DFDBA8ADD94172 8EA7005B1C59DBC2C8EEECE2A8DF4676A6B28F8F8AB5A882DFDBA8ADD941722F
2F352D8E09A294CA52EA31379226399E0EC8FCA96C5046410C0CA2BF7C641D60 352D8E09A294CA52EA31379226399E0EC8FCA96C5046410C0CA2BF7C641D6002
021B1F1169A0C282223A77AE74D478CF45130900B5DA4FA44B93B97674995D48 1B1F1169A0C282223A77AE74D478CF45130900B5DA4FA44B93B97674995D4868
68FE6D7656E6D9EDDBB72FE2345BFD8D006061B3E0F9E75ED8C1371282A52BBD FE6D7656E6D9EDDBB72FE2345BFD8D006061B3E0F9E75ED8C1371282A52BBDDE
DE400A414939A97DBD69D825E79CEE4B6A6D2F39FD2D6493338D3B5C34D81CCA 400A414939A97DBD69D825E79CEE4B6A6D2F39FD2D6493338D3B5C34D81CCA2A
2ACC8F9C41662A305793BF9F17658F4BA28E8A403EDE9F025D7DA41876B7F07D CC8F9C41662A305793BF9F17658F4BA28E8A403EDE9F025D7DA41876B7F07D38
38038429896A7AFAA8D2A1A2F15C3B984D26D11182E0C9CECEA4C8E8482A2E3C 038429896A7AFAA8D2A1A2F15C3B984D26D11182E0C9CECEA4C8E8482A2E3CCB
CB2AEFDCE88C7ACE3A06F61A4EA11048B575B51C108784B4F6E5F48999CFCCCE 2AEFDCE88C7ACE3A06F61A4EA11048B575B51C108784B4F6E5F48999CFCCCE2A
2ADEB56BC702B6A1EEEF6701E61E2375F78EED3BD673DA090E0A0A142206BE28 DEB56BC702B6A1EEEF6701E61E2375F78EED3BD673DA090E0A0A142206BE2817
176B8F6E55C7DE3A5A5DA854729E6525CF869C733E5F58C36245D74E168785A3 6B8F6E55C7DE3A5A5DA854729E6525CF869C733E5F58C36245D74E168785A33E
3E0BA67A5FF2B2479351ADA098F66A1AE8B050045785653EA1F476593D691830 0BA67A5FF2B2479351ADA098F66A1AE8B050045785653EA1F476593D69183023
23D7FD90BC260600B2163E1F1D13C50AAF98CE9D2D11C67B2E984A6D736C0876 D7FD90BC260600B2163E1F1D13C50AAF98CE9D2D11C67B2E984A6D736C087610
105426531DC727DB081BD4420D721D726EF79EDDF30D0643AD87955FAF030EBF 5426531DC727DB081BD4420D721D726EF79EDDF30D0643AD87955FAF030EBF73
73F8AE279F78F2153EA912911485147232F233E804FDCDF5BD0832022F178D04 F8AE279F78F2153EA912911485147232F233E804FDCDF5BD0832022F178D0423
23690183C4C28582B587028FEEB1DF5BDA988E0E17FD4B948612384BF80F7692 690183C4C28582B587028FEEB1DF5BDA988E0E17FD4B948612384BF80F769245
451940EF0FFA51A9C39B92B97002EDEBCD6691F3B398F6E3C645D3D9E2B3545C 1940EF0FFA51A9C39B92B97002EDEBCD6691F3B398F6E3C645D3D9E2B3545C7C
7C4EE801CF4553C970188A3A0303C0391C765C9AFC35FED4C62A34DD682CDEBD 4EE801CF4553C970188A3A0303C0391C765C9AFC35FED4C62A34DD682CDEBD77
77CF02835E5F7791999706802FE2BFE49E25F92C2E9259E9D100073B342B908B CF02835E5F7791999706802FE2BFE49E25F92C2E9259E9D100073B342B908B47
47D7F9C5D29652F4F1509C88A00335A7F61592177F0EBB8306850FBA7BFC2CE1 D7F9C5D29652F4F1509C88A00335A7F61592177F0EBB8306850FBA7BFC2CE1C5
C5EFB55E0A0A241B05CB1CD431E4A06A363E44AFA7D6A666045B0A64AD808037 EFB55E0A0A241B05CB1CD431E4A06A363E44AFA7D6A666045B0A64AD8080372E
2E3686835DA9A03E84130CF37C68C20DBC4B300520C078B176C0E8070469A891 3686835DA9A03E84130CF37C68C20DBC4B300520C078B176C0E8070469A891C1
C14C4B1B5FBC67CF1EA6FDDF187F6900CC6673F2334F3DF3DAE9D3A76762D101 4C4B1B5FBC67CF1EA6FDDF187F6900CC6673F2334F3DF3DAE9D3A76762D1014F
4F6041B448E908C602844056631035FE7EFEC27091CF47567CC018374BDCD216 6041B448E908C602844056631035FE7EFEC27091CF47567CC018374BDCD2169F
9FE146A5A035C4C0D8F97C03C2979D94CA121A52B7818DD770D5979595211E78 E146A5A035C4C0D8F97C03C2979D94CA121A52B7818DD770D5979595211E782A
2A2B2917FA1EA5318CB7E3385682F071F783922EAE0B7442F79B98356E692DA7 2B2917FA1EA5318CB7E3385682F071F783922EAE0B7442F79B98356E692DA790
90E0208E017594323EB578FFFE7D3FE53862FE9A10270008E517ED7877F4BDA3 E0208E017594323EB578FFFE7D3FE53862FE9A10270008E517ED7877F4BDA3F3
F35F79F9951718841818696EA8A7162E3F316B9E6B73D22C6028990578522B40 5F79F9951718841818696EA8A7162E3F316B9E6B73D22C6028990578522B4013
1320000130124BA4AA0EBF517A292F783E00E7828E8066B7D91CD4CD85136A80 20000130124BA4AA0EBF517A292F783E00E7828E8066B7D91CD4CD85136A808C
8CCC7496CEF154CED2B690F57D4FCFC80228723C5F339A75472333C5C6C76281 CC7496CEF154CED2B690F57D4FCFC80228723C5F339A75472333C5C6C76281C4
C4C60CC3DA0018E670DAF9FA01D4C2339F929A5ABC77DFDE057AC32567FE0200 C60CC3DA0018E670DAF9FA01D4C2339F929A5ABC77DFDE057AC32567FE020042
42D8988ECD9B36AF7C7DCFEB2B38C8F881CE30A2ACA24C94B252F92AEA770E84 D8988ECD9B36AF7C7DCFEB2B38C8F881CE30A2ACA24C94B252F92AEA770E842E
2E69B98A68341A4B01092CC1CC8319084AA2CE1F618978308AE308CA598929D8 69B98A68341A4B01092CC1CC8319084AA2CE1F618978308AE308CA598929D8E0
E0DBDE1CA9D38C6994989C40D55535ACEF0B447F4F620DF6B11C0FE2E262E9AF DBDE1CA9D38C6994989C40D55535ACEF0B447F4F620DF6B11C0FE2E262E9AF27
27F3C5B92197516B60383893201EB5B5B6A01D56B86FEFDE053ABDCE4CFFF710 F3C5B92197516B60383893201EB5B5B6A01D56B86FEFDE053ABDCE4CFFF71000
000472D455DF38EFC61A36DA5B4A2BB8281E5B931E6985C1A8D7BD1442A288FF 0472D455DF38EFC61A36DA5B4A2BB8281E5B931E6985C1A8D7BD1442A288FF36
36F07CD6CF73FD6E1414BE29C402188994A809D05050A09B256083B43638CC81 F07CD6CF73FD6E1414BE29C402188994A809D05050A09B256083B43638CC8133
338BA37D567616D5D6D4B2F185D4D5D9258E7757770E5150C1354EB2F11C4D38 8BA37D567616D5D6D4B2F185D4D5D9258E7757770E5150C1354EB2F11C4D38CB
CBF45103670B5C1FEEA1F2F6A2D666186F2CDEC7B4E7C2E7EF19FF15004D8D4D F45103670B5C1FEEA1F2F6A2D666186F2CDEC7B4E7C2E7EF19FF15004D8D4D7E
7E93A74C36A9942A055A5500008B95164E539E03F4C54CCAE55FFD73892700E8 93A74C36A9942A055A5500008B95164E539E03F4C54CCAE55FFD73892700E8B8
B831E9DD8D3799FB33113F1C5F0102AA4A9D20B88D8175055812C1F5FFF8B4F1 31E9DD8D3799FB33113F1C5F0102AA4A9D20B88D8175055812C1F5FFF8B4F14C
4CFB62F1D8AB98F991670273A74F65E002282FAF805D49258AA566369E46DC11 FB62F1D8AB98F991670273A74F65E002282FAF805D49258AA566369E46DC11F7
F7D5DCDC40E9191985FB98F6DFD0F8AF62006F96FDFBF62F3B74E8D06206C388 D5DCDC40E9191985FB98F6DFD0F8AF62006F96FDFBF62F3B74E8D06206C388BE
BEBAB5CFDACDC28703BACCC5741DC69E33421447DA28AE09E4122030447AFA53 BAB5CFDACDC28703BACCC5741DC69E33421447DA28AE09E4122030447AFA5300
00F215349E6F4687E7834F985D1C9B9591254050B3AB208D4A353DCE99956964 F215349E6F4687E7834F985D1C9B9591254050B3AB208D4A353DCE9995696425
25184A79F9057C3D959879F405C14B9C03B46F68AC479EBF5CE34701F0CC020A 184A79F9057C3D959879F405C14B9C03B46F68AC479EBF5CE34701F0CC020A46
46DFC0AED0EDA5F21A90140E8CC7CD707CF0E7AC909E979797CBDB848282829C DFC0AED0EDA5F21A90140E8CC7CD707CF0E7AC909E979797CBDB848282829CCA
CACACAF8EEEE6E2F111047A2BF686B21E77DCDC35A12583012C24617AE130F47 CACAF8EEEE6E2F111047A2BF686B21E77DCDC35A12583012C24617AE130F47DA
DAD978C402E969B07096C053A7E6B0CF9F1631096D310BA7652980C27873BD99 D978C402E969B07096C053A7E6B0CF9F1631096D310BA7652980C27873BD995D
5D23F3CCEB7BF72CE2F35C8EF19704E0B206CF946F4545451A8331F5C48913D3 23F3CCEB7BF72CE2F35C8EF19704E0B206CF946F4545451A8331F5C48913D30A
0A0B0BB31890644B47870F8D640CE93980AF7B744D2C80706035A61947AA3E15 0B0BB31890644B47870F8D640CE93980AF7B744D2C80706035A61947AA3E1547
477BA74871D0135A2DC78C202D07B756D13BC09C2023C078AC29188D6945070E 7BA74871D0135A2DC78C202D07B756D13BC09C2023C078AC29188D6945070EEC
EC9F7F9933FFFD0070F1604AAA6A6B6B13199029A74E9D9ACA0CC92E292931B6 9F7F9933FFFD0070F1604AAA6A6B6B13199029A74E9D9ACA0CC92E292931B6B5
B5B569A4B4E9F960C4C83182092949C9A28891C914A3A9169D5EF4FF9B39ADE1 B569A4B4E9F960C4C83182092949C9A28891C914A3A9169D5EF4FF9B39ADE109
0932B796B08B42A796E56E464646D108EDBFE983915716808B079F5BC1054D4C 32B796B08B42A796E56E464646D108EDBFE983915716808B079F5BC1054D4C7E
7E7EFE140663228332A9A8A86802FBB0167E8E219E08E3E0181511457A76058E 7EFE140663228332A9A8A86802FBB0167E8E219E08E3E0181511457A76058E91
910C8052C8D8C4C44432D5D6B146E816B1C1E1B0899947A648CB3016EDDFBF7F 0C8052C8D8C4C44432D5D6B146E816B1C1E1B0899947A648CB3016EDDFBF7FA1
A15EAFABFB0EB778F597C7990D11881DC5C5C559701B569C13ABABAB0D620D30 5EAFABFB0EB778F597C7990D11881DC5C5C559701B569C13ABABAB0D620D3035
354D640C9D3E42B4C9F937ACE8AA455CD185E9C4E269554D3565A4A71771AA83 4D640C9D3E42B4C9F937ACE8AA455CD185E9C4E269554D3565A4A71771AA83BC
BCFDB633FFC30170F1E8E9E90979FFFDF7E73FBE6EDDCAD696B664A4454E6742 FDB633FFC30170F1E8E9E90979FFFDF7E73FBE6EDDCAD696B664A4454E6742CA
CA82F6434303E277288EA04B8CC674F8FCC2AFD1F6FFFF0090467B5B9B61DD63 82F6434303E277288EA04B8CC674F8FCC2AFD1F6FFFF0090467B5B9B61DD638F
8F6F3A70E0C06D580683DEE8EFEF631DE172477B96BB995999856EDA7FE7991F 6F3A70E0C06D580683DEE8EFEF631DE172477B96BB995999856EDA7FE7991F7B
7B00607040F479F2F12736EEDF7FE04E9E7D753B17488E61BBE8065F7FFDF527 00607040F479F2F12736EEDF7FE04E9E7D753B17488E61BBE8065F7FFDF52777
77EDDAF96FDF21E08D7D00A4C1622B85E3C414CE28B17C7F4E0E861573E7CE3D EDDAF96FDF21E08D7D00A4C1622B85E3C414CE28B17C7F4E0E861573E7CE3DCA
CA19C4FA3D5F6A6C02701547D83FFE79FAC7FEEFF3FF0B43E930A009E1CAF900 19C4FA3D5F6A6C02701547D83FFE79FAC7FEEFF3FF0B43E930A009E1CAF90000
00000049454E44AE426082} 000049454E44AE426082}
Visible = False Visible = False
end end
object imgStateNotFound: TImage object imgStateNotFound: TImage
@ -488,143 +480,143 @@ object MainForm: TMainForm
Height = 64 Height = 64
AutoSize = True AutoSize = True
Picture.Data = { Picture.Data = {
0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000004000 0954506E67496D61676589504E470D0A1A0A0000000D49484452000000400000
0000400806000000AA6971DE0000001974455874536F6674776172650041646F 00400806000000AA6971DE0000001974455874536F6674776172650041646F62
626520496D616765526561647971C9653C000010B74944415478DAED9B096C57 6520496D616765526561647971C9653C000010B74944415478DAED9B096C5755
5516C65F77282D5BA150CA2A4B45A050948285418442214E6140C74463C718B4 16C65F77282D5BA150CA2A4B45A050948285418442214E6140C74463C718B463
63C448C6688C6B8C44258A88041D9851B4A22D33A962D906991123B22450108A C448C6688C6B8C44258A88041D9851B4A22D33A962D906991123B22450108A0A
0AB21611690B48D94A59DAFF7CBF1B4EE759CB48070AFF89DEE4E5F5FFD6FB7D B21611690B48D94A59DAFF7CBF1B4EE759CB48070AFF89DEE4E5F5FFD6FB7DE7
E79CEF9C7BEF6B48201068E9795EA5F7CB6C8D424440A35F3A01D1FAA3E26AF7 9CEF9C7BEF6B48201068E9795EA5F7CB6C8D424440A35F3A01D1FAA3E26AF7E4
E42AB5E85F09B80A04849D387122E6ECD9B35167CE9C89ACAAAA0AD3DFE1DA42 2AB5E85F09B80A04849D387122E6ECD9B35167CE9C89ACAAAA0AD3DFE1DA42D9
D94E9D3A15D6A44993334949493B2B2B2B1B979494C4E93ACE855457577B6CB4 4E9D3A15D6A44993334949493B2B2B2B1B979494C4E93ACE855457577B6CB4D0
D0D0D040585858757878785544444475A3468D4EB76EDDFA987E57072D016565 D0D040585858757878785544444475A3468D4EB76EDDFA987E57072D01656565
65F1F9F9F9637FF8E187F873E7CE85024CFB90D3A74F8708AC575151E1959797 F1F9F9F9637FF8E187F873E7CE85024CFB90D3A74F8708AC575151E1959797B3
B3AF7EF0C107576CDDBAB5F7A64D9BE28F1D3B16A2CD3B79F2A4A77B3CDDE389 AF7EF0C107576CDDBAB5F7A64D9BE28F1D3B16A2CD3B79F2A4A77B3CDDE38938
38C808889840AB56AD02C9C9C981112346ECCCCACACA1731554147C0C183075B C808889840AB56AD02C9C9C981112346ECCCCACACA1731554147C0C183075B3E
3EF7DC737FF8F6DB6F9B474545D51CC7A200523F1CC003070E3812060E1CE88E F7DC737FF8F6DB6F9B474545D51CC7A200523F1CC003070E3812060E1CE88E1D
1D3F7EDC93C778F20C4F44B96B05DA6D1CBBE69A6BBCF4F4742F3E3EDEFD9E38 3F7EDC93C778F20C4F44B96B05DA6D1CBBE69A6BBCF4F4742F3E3EDEFD9E3871
71E29C84848403414500AEFED8638F65AD5EBDBA83DCDB010B0909717B08602F E29C84848403414500AEFED8638F65AD5EBDBA83DCDB010B0909717B08602FAB
AB79478F1EF576EFDEEDB569D3C64B4C4C7484009A0DC0E7ADEE363CA177EFDE 79478F1EF576EFDEEDB569D3C64B4C4C7484009A0DC0E7ADEE363CA177EFDE5E
5E9F3E7D9CE7C8ABBCCE9D3B7B77DC71C7F21B6EB8614D501150505030F08927 9F3E7D9CE7C8ABBCCE9D3B7B77DC71C7F21B6EB8614D501150505030F089279E
9E1803788002DEDF14CFEED89E3D7B9CC53B75EA5403128B9B97D8DF1CEFD8B1 1803788002DEDF14CFEED89E3D7B9CC53B75EA5403128B9B97D8DF1CEFD8B1A3
A3B3BCC2C46DFC0D19CD9A353B7CEBADB7E6C4C6C61E0B0A02D4E1D0C993274F B3BCC2C46DFC0D19CD9A353B7CEBADB7E6C4C6C61E0B0A02D4E1D0C993274FDC
DCB0614322041858DB689082EB6FDBB6CD6BD1A285D7A3470F67752CCEE6777B B0614322041858DB689082EB6FDBB6CD6BD1A285D7A3470F67752CCEE6777B7E
7E43C0B5D75EEBC9D29EC4CF7BEBADB7BCDB6FBFDD8583EE0BC80B662B244A83 43C0B5D75EEBC9D29EC4CF7BEBADB7BCDB6FBFDD8583EE0BC80B662B244A8382
82008957CC030F3C304971DD58CD1100609ADF13D6AF5FEFEDDAB5CBB975F7EE 008957CC030F3C304971DD58CD1100609ADF13D6AF5FEFEDDAB5CBB975F7EEDD
DD7F4480818708C073ECFAEBAF77DAC0F1152B567813264C70BA317CF8F07FE8 7F4480818708C073ECFAEBAF77DAC0F1152B567813264C70BA317CF8F07FE8FE
FE757A64202808D8BF7F7FFC430F3D94ADCE87237E4A539ED2564D28B007D067 757A64202808D8BF7F7FFC430F3D94ADCE87237E4A539ED2564D28B007D0679F
9F7DE61517173BAB1A01E6F6FE8D78E7FEC183077B4A91EE1E09AB23A457AF5E 7DE61517173BAB1A01E6F6FE8D78E7FEC183077B4A91EE1E09AB23A457AF5E5E
5E7676764EBB76EDF65C64F71A9E80A2A2A2AE8F3EFA68169D8600F690C08637 7676764EBB76EDF65C64F71A9E80A2A2A2AE8F3EFA68169D8600F690C0863744
4446463AB09F7EFA2964392BE2CAA4457F085818709CFBAEBBEE3A0798B0C1B3 46463AB09F7EFA2964392BE2CAA4457F085818709CFBAEBBEE3A0798B0C1B310
10523CE2E1871F9EA7F0D81534047CFEF9E7BD2480BF8F8E8E7660CDFA46047B 523CE2E1871F9EA7F0D81534047CFEF9E7BD2480BF8F8E8E7660CDFA46047B08
08C003D081B4B434AF43870EEE985FFC006F02C87D2A7A1C015F7EF9A5234959 C003D081B4B434AF43870EEE985FFC006F02C87D2A7A1C015F7EF9A5234959C6
C6FBFEFBEF2B74FF1C6591A34143C0F2E5CB539E7CF2C9713131310EACDF03EC FBFEFBEF2B74FF1C6591A34143C0F2E5CB539E7CF2C9713131310EACDF03EC6F
6F40AD5AB5CA3B7CF8B023809CCE313F0156FC404CDBB66D3D153FDEDEBD7B01 40AD5AB5CA3B7CF8B023809CCE313F0156FC404CDBB66D3D153FDEDEBD7B01ED
EDDD7DF7DDDED8B163BDA64D9BEED2B979B5B3CC5525E0C30F3F4C7BF6D96747 DD7DF7DDDED8B163BDA64D9BEED2B979B5B3CC5525E0C30F3F4C7BF6D9674741
418079803F04F88D5BAF5BB7CE81239695CA6A14DF0FDEB6B8B838E701CA2C4E 8079803F04F88D5BAF5BB7CE81239695CA6A14DF0FDEB6B8B838E701CA2C4E13
1366CE9CE90813F8B21B6FBCF12F7AEDB9A021E09D77DE19FEE28B2F0E555EAE 66CE9CE90813F8B21B6FBCF12F7AEDB9A021E09D77DE19FEE28B2F0E555EAEF1
F1000B03DB00B17DFB765701A6A6A6BA9836D5C70B8C0CE21CD22080F4575858 000B03DB00B17DFB765701A6A6A6BA9836D5C70B8C0CE21CD22080F457585848
4885E98D1A35CA6BDEBC7940E97671BF7EFD36D4A37B0D4FC01B6FBC31F2A597 85E98D1A35CA6BDEBC7940E97671BF7EFD36D4A37B0D4FC01B6FBC31F2A5975E
5E1A8C55FDB1CFE627800A1011C30338E72F7CFC1EC0F5585F80BD6FBEF9C665 1A8C55FDB1CFE627800A1011C30338E72F7CFC1EC0F5585F80BD6FBEF9C66580
80AE5DBB7A999999C7146AB344D099A02260C68C19635E7EF9E58178801FB89F AE5DBB7A999999C7146AB344D099A02260C68C19635E7EF9E58178801FB89F00
006A783C0080B2A04B8FB5815B19CC39A5391726548D268C7DFBF62D79F5D557 6A783C0080B2A04B8FB5815B19CC39A5391726548D268C7DFBF62D79F5D557FF
FF2A022E7620746508983E7DFA98A953A73A02008B0BFB35806368006530E07A 2A022E7620746508983E7DFA98A953A73A02008B0BFB35806368006530E07AF6
F6ECE95CDD5FF71B01160294CA6C5C8F37AC59B3C64B4949D93E6DDAB4DC7A76 ECE95CDD5FF71B01160294CA6C5C8F37AC59B3C64B4949D93E6DDAB4DC7A76AF
AFE10998356B56BA52D490962D5B3AD056FC181946006ACE39DCD90649B6F97F E10998356B56BA52D490962D5B3AD056FC181946006ACE39DCD90649B6F97FF3
F30C3C80E7A103104036D050788386D08B828E0059A7DBA449937EA722270657 0C3C80E7A103104036D050788386D08B828E0059A7DBA449937EA72227065707
07302267552124E0C2A5A5A5EE6F0639343F78DBF002EED170D76900CFE15EB6 302267552124E0C2A5A5A5EE6F0639343F78DBF002EED170D76900CFE15EB6FB
FBEFBFFF9FE3C68D5B1D7404D0246E4D366FDEDC4EF57E476DEDB66CD992F0DD EFBFFF9FE3C68D5B1D7404D0246E4D366FDEDC4EF57E476DEDB66CD992F0DD77
77DF4503182B028E1A8086C29BA758E3BC91C239EA000A2B065710B673E74EEF DF4503182B028E1A8086C29BA758E3BC91C239EA000A2B065710B673E74EEFA9
A9A79EFADB902143B6062501B5DB9123476245429BC71F7F7CB472792B2C6995 A79EFADB902143B6062501B5DB9123476245429BC71F7F7CB472792B2C69951F
1F96B522C8C412CBD3AC7862BE801060DBB76F9FA71AE3C4071F7CF067DD532D 96B522C8C412CBD3AC7862BE801060DBB76F9FA71AE3C4071F7CF067DD532D61
610CD7F32A75EE6CD0124093D53ADF73CF3DE3BFFEFAEB661448283A56EFD6AD 0CD7F32A75EE6CD0124093D53ADF73CF3DE3BFFEFAEB661448283A56EFD6AD9B
9B034F4DC0D800EB2378145294CAE88586CCD5EDDBB73FABADBC4B972EFBA503 034F4DC0D800EB2378145294CAE88586CCD5EDDBB73FABADBC4B972EFBA50367
67747FA4CEC709FC41D50DA522EB507272F2C1ACACAC13FE19A8A020E0E38F3F 747FA4CEC709FC41D50DA522EB507272F2C1ACACAC13FE19A8A020E0E38F3F1E
1E2C0F189E9F9F1F46FA230C98F3C3E280A5511330DAC3E237DF7CB3377AF468 2C0F189E9F9F1F46FA230C98F3C3E280A5511330DAC3E237DF7CB3377AF46857
572BECD8B1831038307EFCF8F5BABE72F5EAD5DD994CBDE9A69BB60F1B366C1B 2BECD8B1831038307EFCF8F5BABE72F5EAD5DD994CBDE9A69BB60F1B366C1B93
93A4F2A6300963D4471F7D14A92176A52AD1D3D28DBA86C757960059296AF1E2 A4F2A6300963D4471F7D14A92176A52AD1D3D28DBA86C757960059296AF1E2C5
C5A3A5F829585C6EEBAC8C0740009662208407303D76DEDA9EC07983060D2274 A3A5F829585C6EEBAC8C0740009662208407303D76DEDA9EC07983060D22745C
5CCD2072AAB43FAB22288A224A9560914690251A1F948BC0C3CA12E522CE1544 CD2072AAB43FAB22288A224A9560914690251A1F948BC0C3CA12E522CE15444B
4B962C095FB0604140E9B85A6385DA245C3902247AAD047E9CACD5819A000BBF 962C095FB0604140E9B85A6385DA245C3902247AAD047E9CACD5819A000BBFF6
F6DA6B4EFC8C00840D858700CE5BFA93C2BB592248619E10F220833DF79141D8 DA6B4EFC8C00840D858700CE5BFA93C2BB592248619E10F220833DF79141D8A3
A3157A5695483BAE31C15E659F151A581D7DFBEDB743F19E2953A6D49E32BF32 157A5695483BAE31C15E659F151A581D7DFBEDB743F19E2953A6D49E32BF3204
047CF1C517DD3FF9E4934CC567D3828202071ACBE1E25611020062C8EB80E63C 7CF1C517DD3FF9E4934CC567D3828202071ACBE1E25611020062C8EB80E63C1E
1E01398CFD15EFAE32B401147FE3217884CD1CB38724CE51296A8458FAC8238F 01398CFD15EFAE32B401147FE3217884CD1CB38724CE51296A8458FAC8238FE4
E4E81915F7DD775F6876767640630DBF17343C014B972E4D93D20F4F4C4C0CCF E81915F7DD775F6876767640630DBF17343C014B972E4D93D20F4F4C4C0CCFCD
CDCD75715C5656E60A1E3A4A2D4F16C0B2741A973702104500410E4490221143 CD75715C5656E60A1E3A4A2D4F16C0B2741A973702104500410E449022114332
320533C0144F1040368014BC82FB184E33B50659E9E9E9FFCAC8C858B576EDDA 0533C0144F1040368014BC82FB184E33B50659E9E9E9FFCAC8C858B576EDDA10
101657860E1DEAF7828623401D89C8CBCB1B535C5CDC1F0B2E5AB4C893E23B37 1657860E1DEAF7828623401D89C8CBCB1B535C5CDC1F0B2E5AB4C893E23B37C7
C765A9E60E1D3AE4C091F62080313E5E0031FCE61C618027001A022082EBD10A 65A9E60E1D3AE4C091F62080313E5E0031FCE61C618027001A022082EBD10AC0
C0721DA345C0721F0402DE86CB7ACF5EC57F8EC80438C545C37B802CD36CEEDC 721DA345C0721F0402DE86CB7ACF5EC57F8EC80438C545C37B802CD36CEEDCB9
B9E3D5D1CECCEFA1DC527CD731A6B0E89CAD0FB00114AF80007E03C8621D2FC0 E3D5D1CECCEFA1DC527CD731A6B0E89CAD0FB00114AF80007E03C8621D2FC0EA
EAE47EAC0C79784A5252524DA6600F3180679688E74036EF95A6546848FEBA88 E47EAC0C79784A5252524DA6600F3180679688E74036EF95A6546848FEBA883F
3F5947572F3F01547C6FBEF9E604C5762B3A4BC799B80424AE5A5454E4E2D906 5947572F3F01547C6FBEF9E604C5762B3A4BC799B80424AE5A5454E4E2D90645
4558174D90423BA0B608C2F53631CA39365CDE5223DE8037112E841084B22E00 58174D90423BA0B608C2F53631CA39365CDE5223DE8037112E841084B22E0078
78A6C998614623742E307BF6ECB932C4BE0627402ADF6FE1C28519CAC18D1136 A6C998614623742E307BF6ECB932C4BE0627402ADF6FE1C28519CAC18D1136AC
AC42A94A9C52AEDA0C30E0FD233D5675507FAEB741129B110158E29B11236471 42A94A9C52AEDA0C30E0FD233D5675507FAEB741129B110158E29B112364718E
8E38E75AEEB3F941F6108CCE189168C8D34F3FBDE4CE3BEF5CDF6004B0C82997 38E75AEEB3F941F6108CCE189168C8D34F3FBDE4CE3BEF5CDF6004B0C829971F
1FB672E5CAA1740437A6C0A1F37400F7C64D6D1698C207CBB3C70B20827336EC B672E5CAA1740437A6C0A1F37400F7C64D6D1698C207CBB3C70B20827336ECC5
C513581A63B6C796CD94491C51DCCF58001DE07E6690994431F0100D782BA7A9 13581A63B6C796CD94491C51DCCF58001DE07E6690994431F0100D782BA7A928
2833333337BFF2CA2B0B1A84000959F48C193332156F3D894B5C1100B82C8D38 33333337BFF2CA2B0B1A84000959F48C193332156F3D894B5C1100B82C8D3864
64EA8A7826AE112E5BDC30709000182386FB716B23801218CB738E900220EF01 EA8A7826AE112E5BDC30709000182386FB716B23801218CB738E900220EF017C
7C4A4A8AF306859E239D67DB428A4D95AB5FFB5474CDD57B2E6F2124416BA362 4A4A8AF306859E239D67DB428A4D95AB5FFB5474CDD57B2E6F2124416BA362E6
E6B77A46072CE69FF0A0B374944A8F8E12BB0C5C6CC5D714DC88F14F7AD89C81 B77A46072CE69FF0A0B374944A8F8E12BB0C5C6CC5D714DC88F14F7AD89C8179
7906E72D0D021011240B6079C0E31D106D96F72D9FBBDF22B34215E1EB22EFE4 06E72D0D021011240B6079C0E31D106D96F72D9FBBDF22B34215E1EB22EFE465
652340854D524E4E4EA62AB41844C9567588775CDE4675580E006C36DA33F162 2340854D524E4E4EA62AB41844C9567588775CDE4675580E006C36DA33F162C3
C3ADE938318EB58C189E63738290417A840CF6E84AFFFEFD9D376CDAB4C96516 ADE938318EB58C189E63738290417A840CF6E84AFFFEFD9D376CDAB4C965165B
5B4AF32FA89AC6E00DCF3CF3CCB2DB6EBBAD50863977C90428ADA44AEC4629EE 4AF32FA89AC6E00DCF3CF3CCB2DB6EBBAD50863977C90428ADA44AEC4629EEC2
C2496D58CC263B008FDA633152119E41A751661A40F1101A2ECF75FCC6DDFDE5 496D58CC263B008FDA633152119E41A751661A40F1101A2ECF75FCC6DDFDE5AF
AFAD035A2C5B98503F306FC81ECB031EB5B7D9639B4CB5E7701F1E43C125F2CB AD035A2C5B98503F306FC81ECB031EB5B7D9639B4CB5E7701F1E43C125F2CBD2
D2D2D28A350C5FA9FB4FD49B00B96BC4CC993347AC59B3661031C88B0048CC02 D2D28A350C5FA9FB4FD49B00B96BC4CC993347AC59B3661031C88B0048CC0292
92C206C6C9FD8400220839581931C4BA780AC7D00BAEB785118E59EAE36F7361 C206C6C9FD8400220839581931C4BA780AC7D00BAEB785118E59EAE36F7361F6
F6FCB67900621EE537CBDB129A7FF5C808805C368CC3BB300ED7BCFBEEBB0BEF FCB67900621EE537CBDB129A7FF5C808805C368CC3BB300ED7BCFBEEBB0BEFBA
BAEBAE8DF522408399D8A953A7662AB7F7807D80F072549F0E40080089692B5C EBAE8DF522408399D8A953A7662AB7F7807D80F072549F0E40080089692B5CE8
E80416A71E0004D7A0CA3400E1D25C07017490FA002F40CD69361304495C87E5 0416A71E0004D7A0CA3400E1D25C07017490FA002F40CD69361304495C87E5C9
C9009CE79B00DE6FF1EEFF8082BD4DBBA13BF4EBFC40C991316DDAB41513274E 009CE79B00DE6FF1EEFF8082BD4DBBA13BF4EBFC40C991316DDAB41513274E5C
5C79D104C8D5DA2997DE22208903060CA8C9D1EC01640B1500658292995D3C02 79D104C8D5DA2997DE22208903060CA8C9D1EC01640B1500658292995D3C0200
00741252B02C1DB23940EEA3433C8FEB2000902839BA611320B60E606E8FDA13 741252B02C1DB23940EEA3433C8FEB2000902839BA611320B60E606E8FDA135A
5A06DEBF686204D83A247D316DE037D7F6EDDBB74C293B4F9E7BE4A20850AC27 06DEBF686204D83A247D316DE037D7F6EDDBB74C293B4F9E7BE4A20850AC27CD
CD9A356B9C3A12CD4B713FAC89556C5516F0FE3C0EE374048BD3013A62391B0B 9A356B9C3A12CD4B713FAC89556C5516F0FE3C0EE374048BD3013A62391B0B43
4304C0CCC2DC4BA771514285B103314B0641E5D569176A5BB66CF1BEFAEAAB1A 04C0CCC2DC4BA771514285B103314B0641E5D569176A5BB66CF1BEFAEAAB1A8B
8BFAAD4E630F713CDBC0738C7763793DA754FA95270CE53F2B82744E4CF5D758 FAAD4E630F713CDBC0738C7763793DA754FA95270CE53F2B82744E4CF5D7587A
7AA4727A63D4DBD6F6ECEB0E63DE1AA4700DE778B9A54513373A0129589A8E11 A4727A63D4DBD6F6ECEB0E63DE1AA4700DE778B9A54513373A0129589A8E11F3
F3CC000188B5413ACF971F94BC1040598BE549797EF0FE0553FFCC3162C7FB00 CC000188B5413ACF971F94BC1040598BE549797EF0FE0553FFCC3162C7FB006F
6F7A00B1902AB12E9B376F5EAE0FFC7F2740964F79E1851732F5D050536D9BC7 7A00B1902AB12E9B376F5EAE0FFC7F2740964F79E1851732F5D050536D9BC707
0724D6B7C2C508AB9DCBFD9FC1D06CD2028B5A594C27E9305A8178E2F6C42D61 24D6B7C2C508AB9DCBFD9FC1D06CD2028B5A594C27E9305A8178E2F6C42D6105
0578521EE0C92280F72F9A1A709E41E6A1411CD7D8208AEC229D2A15F8BC5AE0 78521EE0C92280F72F9A1A709E41E6A1411CD7D8208AEC229D2A15F8BC5AE02F
2F4C801E1079EFBDF7FE51C5451CB189E58869368B2FFFD2165E6184B037E074 4C801E1079EFBDF7FE51C5451CB189E58869368B2FFFD2165E6184B037E074C4
C4DCD096B5B89E67D80713E47C2C8457502C496C5DAD60E0113B08E03AFF5219 DCD096B5B89E67D80713E47C2C8457502C496C5DAD60E0113B08E03AFF52197F
7F1BF1780ACF07BC8D35A8442153E1E4C04B3C6B83AF9B00B11F27B51FBB71E3 1BF1780ACF07BC8D35A8442153E1E4C04B3C6B83AF9B00B11F27B51FBB71E3C6
C64E749E0ED44E4700E0057414962D9F1B21160AE62116EFFE8F9DF81B62792E 4E749E0ED44E4700E0057414962D9F1B21160AE62116EFFE8F9DF81B62792E29
2911E1033CCF4D4E4EF6BA74E9E2D21C8A6F637EAB0D6CAA9C675A16B12A13F0 11E1033CCF4D4E4EF6BA74E9E2D21C8A6F637EAB0D6CAA9C675A16B12A13F00C
0C8BF12A8553695E5E5E2ED3621790B81F13B074E9D21E73E6CCB9450F6B0648 8BF12A8553695E5E5E2ED3621790B81F13B074E9D21E73E6CCB9450F6B06483A
3A8455CC5DED0566059AADF4E01D10421C9A97D8A8CEBCC4FF7D406D42080FC8 8455CC5DED0566059AADF4E01D10421C9A97D8A8CEBCC4FF7D406D42080FC864
64488B5852DA92EB6D01D45C9F4C409FB897948891006F4632CB03FEFDF7DFAF 488B5852DA92EB6D01D45C9F4C409FB897948891006F4632CB03FEFDF7DFAFCB
CBED7F4A806E3C357DFAF4DFBCF7DE7B43146791000204CBCF58C986AF66598B ED7F4A806E3C357DFAF4DFBCF7DE7B43146791000204CBCF58C986AF66598B3D
3D9AA9B109125E82E5113BC8B0713EC7ECC32823C51649B130E7517FD60518F6 9AA9B109125E82E5113BC8B0713EC7ECC32823C51649B130E7517FD60518F652
52E5418A91C49E90C033F8A28C67D33732058DF3781BA9588257027811F4739F E5418A91C49E90C033F8A28C67D33732058DF3781BA9588257027811F4739FCA
CA38021A497523323232260B74B809132F6568E9CF0A663DFBED1739FFFA9D9F 38021A497523323232260B74B809132F6568E9CF0A663DFBED1739FFFA9D9F14
144B991636749CCD74C4A6B2A8F010470A2C2C8F285A6DCFB3F00ACE932D7826 4B991636749CCD74C4A6B2A8F010470A2C2C8F285A6DCFB3F00ACE932D7826A4
A4D9822AE7791EE0113CDCFE22BF13FA0F01A9A9A97F12C0502C07013C8C12D6 D9822AE7791EE0113CDCFE22BF13FA0F01A9A9A97F12C0502C07013C8C12D6DF
DF20C072BE353F01F6DB7FAC36211CB3D12261435D0131E4790A28629EF7FABF 20C072BE353F01F6DB7FAC36211CB3D12261435D0131E4790A28629EF7FABF09
09644D80F0628E8F3E18780B478EF15BE153929B9B9B57EF8FA4B49DD28D030A 644D80F0628E8F3E18780B478EF15BE153929B9B9B57EF8FA4B49DD28D030A0A
0A0AFA287E5A4B4494BA4F54F215F779E5AE66AF8CD0544ADB54711962845875 0AFA287E5A4B4494BA4F54F215F779E5AE66AF8CD0544ADB5471196284587557
57D78749751DF37FF80440EE45F42001F2FD56E77E34C12638B132E0318EB93D D78749751DF37FF80440EE45F42001F2FD56E77E34C12638B132E0318EB93DC7
C70803DCBE9EE07F2A826AA1623F46EE7A5AE06A1617CDAAE883B2427C616161 0803DCBE9EE07F2A826AA1623F46EE7A5AE06A1617CDAAE883B2427C6161617B
7B6D0972D50485490BA531F7E9A76984C5FA85BED6B2E380B4696C6A0000E161 6D0972D50485490BA531F7E9A76984C5FA85BED6B2E380B4696C6A0000E161F6
F63518C0F96688982784080BD2B20928EF42A845E001E9D7FC7A82AF93807A35 3518C0F96688982784080BD2B20928EF42A845E001E9D7FC7A82AF93807A3559
592A42B57B6B9191B876EDDAF6AAD3DB8A9038A534271458D7BE03B810191000 2A42B57B6B9191B876EDDAF6AAD3DB8A9038A534271458D7BE03B81019100010
1006559666ADBAE337AE4F5AA34CB690B49847FDC9F3F3E7CFBFD898BFBC04D4 06559666ADBAE337AE4F5AA34CB690B49847FDC9F3F3E7CFBFD898BFBC04D46E
6EB24A9844AC2584C86AEDE5216D357069AD6A2CCAD2A6FFC388F3F738402C7D B24A9844AC2584C86AEDE5216D357069AD6A2CCAD2A6FFC388F3F738402C7D61
61654B9D36C2A40CB6FF21B029731BE8283C4AE5F6FF2BF8CB4F40EDA667872A 654B9D36C2A40CB6FF21B029731BE8283C4AE5F6FF2BF8CB4F40EDA667872A3E
3E9BF1A538E1C2C71112B9B68AE1C6C439CDBE0843046D086D3340A4449B5237 9BF1A538E1C2C71112B9B68AE1C6C439CDBE0843046D086D3340A4449B5237A2
A2209034A99847ED2F54E105070175357943ACC8E02B9136848D2ACE84DDBB77 209034A99847ED2F54E105070175357943ACC8E02B9136848D2ACE84DDBB77C7
C76255B20040C90C143C94C080E51C3A818730E57D1E7CEE45E4F9E023A07693 6255B20040C90C143C94C080E51C3A818730E57D1E7CEE45E4F9E023A0769375
75A3972D5BD663CA9429BF519CC751DDA1FCB8386ECF109CC6E088C50EF2BC62 A3972D5BD663CA9429BF519CC751DDA1FCB8386ECF109CC6E088C50EF2BC62FE
FE522D1F3C0458C333444286C0F52614C80636AF6082C7B780E7DDFE522D1F7C 522D1F3C0458C333444286C0F52614C80636AF6082C7B780E7DDFE522D1F7C04
04D0F89F82E79F7F3E4318FBC9FA110C906C497CE4C891FB737272FE7E098217 D0F89F82E79F7F3E4318FBC9FA110C906C497CE4C891FB737272FE7E098217FC
FC045853B1D54A3A9128016CAEFE05248687D3D3D3774800EBF319ECFF2F0157 045853B1D54A3A9128016CAEFE05248687D3D3D3774800EBF319ECFF2F0157B0
B045FFFACFD3BFF47F9FFF371E3422DF2CEB57F80000000049454E44AE426082} 45FFFACFD3BFF47F9FFF371E3422DF2CEB57F80000000049454E44AE426082}
end end
object lblG940Throttle: TLabel object lblG940Throttle: TLabel
Left = 79 Left = 79

View File

@ -74,6 +74,8 @@ type
procedure HandleDeviceStateMessage(ATask: IOmniTaskControl; AMessage: TOmniMessage); procedure HandleDeviceStateMessage(ATask: IOmniTaskControl; AMessage: TOmniMessage);
procedure HandleRunInMainThreadMessage(ATask: IOmniTaskControl; AMessage: TOmniMessage); procedure HandleRunInMainThreadMessage(ATask: IOmniTaskControl; AMessage: TOmniMessage);
procedure HandleProviderKilled(ATask: IOmniTaskControl; AMessage: TOmniMessage);
procedure HandleProviderKilledFSX(ATask: IOmniTaskControl; AMessage: TOmniMessage);
property EventMonitor: TOmniEventMonitor read FEventMonitor; property EventMonitor: TOmniEventMonitor read FEventMonitor;
property StateConsumerTask: IOmniTaskControl read FStateConsumerTask; property StateConsumerTask: IOmniTaskControl read FStateConsumerTask;
@ -83,6 +85,7 @@ type
implementation implementation
uses uses
ComObj, ComObj,
Dialogs,
SysUtils, SysUtils,
Windows, Windows,
@ -131,7 +134,7 @@ procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin begin
if Assigned(StateConsumerTask) then if Assigned(StateConsumerTask) then
begin begin
StateConsumerTask.Terminate; LEDStateConsumer.Finalize(StateConsumerTask);
CanClose := False; CanClose := False;
end; end;
end; end;
@ -199,13 +202,13 @@ end;
procedure TMainForm.InitializeStateProvider(AProviderClass: TLEDStateProviderClass); procedure TMainForm.InitializeStateProvider(AProviderClass: TLEDStateProviderClass);
begin begin
UpdateMapping; UpdateMapping;
TLEDStateConsumer.InitializeStateProvider(StateConsumerTask, AProviderClass); LEDStateConsumer.InitializeStateProvider(StateConsumerTask, AProviderClass);
end; end;
procedure TMainForm.FinalizeStateProvider; procedure TMainForm.FinalizeStateProvider;
begin begin
TLEDStateConsumer.FinalizeStateProvider(StateConsumerTask); LEDStateConsumer.FinalizeStateProvider(StateConsumerTask);
end; end;
@ -214,19 +217,21 @@ begin
if not Assigned(StateConsumerTask) then if not Assigned(StateConsumerTask) then
Exit; Exit;
TLEDStateConsumer.ClearFunctions(StateConsumerTask); LEDStateConsumer.ClearFunctions(StateConsumerTask);
UpdateMappingFSX; UpdateMappingFSX;
end; end;
procedure TMainForm.UpdateMappingFSX; procedure TMainForm.UpdateMappingFSX;
begin begin
TLEDStateConsumer.SetFunction(StateConsumerTask, 1, FUNCTION_FSX_PARKINGBRAKE); LEDStateConsumer.SetFunction(StateConsumerTask, 1, FUNCTION_FSX_PARKINGBRAKE);
TLEDStateConsumer.SetFunction(StateConsumerTask, 2, FUNCTION_FSX_LANDINGLIGHTS); LEDStateConsumer.SetFunction(StateConsumerTask, 2, FUNCTION_FSX_LANDINGLIGHTS);
TLEDStateConsumer.SetFunction(StateConsumerTask, 3, FUNCTION_FSX_GEAR); LEDStateConsumer.SetFunction(StateConsumerTask, 3, FUNCTION_FSX_GEAR);
TLEDStateConsumer.SetFunction(StateConsumerTask, 6, FUNCTION_FSX_INSTRUMENTLIGHTS);
TLEDStateConsumer.SetFunction(StateConsumerTask, 7, FUNCTION_OFF); LEDStateConsumer.SetFunction(StateConsumerTask, 4, FUNCTION_FSX_ENGINE);
LEDStateConsumer.SetFunction(StateConsumerTask, 6, FUNCTION_FSX_INSTRUMENTLIGHTS);
// LEDStateConsumer.SetFunction(StateConsumerTask, 7, FUNCTION_OFF);
end; end;
@ -235,6 +240,7 @@ begin
case msg.MsgID of case msg.MsgID of
MSG_NOTIFY_DEVICESTATE: HandleDeviceStateMessage(task, msg); MSG_NOTIFY_DEVICESTATE: HandleDeviceStateMessage(task, msg);
MSG_RUN_IN_MAINTHREAD: HandleRunInMainThreadMessage(task, msg); MSG_RUN_IN_MAINTHREAD: HandleRunInMainThreadMessage(task, msg);
MSG_PROVIDER_KILLED: HandleProviderKilled(task, msg);
end; end;
end; end;
@ -269,15 +275,32 @@ end;
procedure TMainForm.HandleRunInMainThreadMessage(ATask: IOmniTaskControl; AMessage: TOmniMessage); procedure TMainForm.HandleRunInMainThreadMessage(ATask: IOmniTaskControl; AMessage: TOmniMessage);
var var
waitableObject: TObject; executor: IRunInMainThread;
waitableValue: TOmniWaitableValue;
begin begin
waitableObject := ATask.Param[0].AsObject; executor := (AMessage.MsgData.AsInterface as IRunInMainThread);
waitableValue := (waitableObject as TOmniWaitableValue); executor.Execute;
executor.Signal;
end;
// (waitableValue.Value.AsInterface as IRunInMainThread).Execute;
// waitableValue.Signal; procedure TMainForm.HandleProviderKilled(ATask: IOmniTaskControl; AMessage: TOmniMessage);
begin
HandleProviderKilledFSX(ATask, AMessage);
end;
procedure TMainForm.HandleProviderKilledFSX(ATask: IOmniTaskControl; AMessage: TOmniMessage);
var
msg: string;
begin
btnFSXDisconnect.Enabled := False;
btnFSXConnect.Enabled := True;
msg := AMessage.MsgData;
if Length(msg) > 0 then
ShowMessage(msg);
end; end;

View File

@ -7,7 +7,9 @@ uses
LEDStateConsumer in 'Units\LEDStateConsumer.pas', LEDStateConsumer in 'Units\LEDStateConsumer.pas',
LEDStateProvider in 'Units\LEDStateProvider.pas', LEDStateProvider in 'Units\LEDStateProvider.pas',
LEDFunctionMap in 'Units\LEDFunctionMap.pas', LEDFunctionMap in 'Units\LEDFunctionMap.pas',
G940LEDStateConsumer in 'Units\G940LEDStateConsumer.pas'; G940LEDStateConsumer in 'Units\G940LEDStateConsumer.pas',
LogiJoystickDLL in '..\Shared\LogiJoystickDLL.pas',
SimConnect in '..\Shared\SimConnect.pas';
{$R *.res} {$R *.res}

View File

@ -1,428 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{a2bd627c-a934-4ce8-9963-1f81ae521c4c}</ProjectGuid> <ProjectGuid>{a2bd627c-a934-4ce8-9963-1f81ae521c4c}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<DCC_DCCCompiler>DCC32</DCC_DCCCompiler> <DCC_DCCCompiler>DCC32</DCC_DCCCompiler>
<DCC_DependencyCheckOutputName>Bin\G940LEDControl.exe</DCC_DependencyCheckOutputName> <DCC_DependencyCheckOutputName>Bin\G940LEDControl.exe</DCC_DependencyCheckOutputName>
<MainSource>G940LEDControl.dpr</MainSource> <MainSource>G940LEDControl.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>
<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>G940LEDControl_Icon.ico</Icon_MainIcon>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<Icon_MainIcon>G940LEDControl_Icon.ico</Icon_MainIcon>
<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>
<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> <Version>7.0</Version>
<DCC_DebugInformation>False</DCC_DebugInformation> <DCC_DebugInformation>False</DCC_DebugInformation>
<DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols> <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_Define>RELEASE</DCC_Define> <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition="'$(Cfg_2)'!=''">
<Version>7.0</Version> <Version>7.0</Version>
<DCC_Define>DEBUG</DCC_Define> <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_ExeOutput>Bin</DCC_ExeOutput> <DCC_ExeOutput>Bin</DCC_ExeOutput>
<DCC_DcuOutput>Lib</DCC_DcuOutput> <DCC_DcuOutput>Lib</DCC_DcuOutput>
<DCC_ObjOutput>Lib</DCC_ObjOutput> <DCC_ObjOutput>Lib</DCC_ObjOutput>
<DCC_HppOutput>Lib</DCC_HppOutput> <DCC_HppOutput>Lib</DCC_HppOutput>
<DCC_UnitSearchPath>..\DirectX;..\Shared</DCC_UnitSearchPath> <DCC_UnitSearchPath>..\DirectX;..\Shared;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<DCC_ResourcePath>..\DirectX;..\Shared</DCC_ResourcePath> <DCC_ResourcePath>..\DirectX;..\Shared;$(DCC_ResourcePath)</DCC_ResourcePath>
<DCC_ObjPath>..\DirectX;..\Shared</DCC_ObjPath> <DCC_ObjPath>..\DirectX;..\Shared;$(DCC_ObjPath)</DCC_ObjPath>
<DCC_IncludePath>..\DirectX;..\Shared</DCC_IncludePath> <DCC_IncludePath>..\DirectX;..\Shared;$(DCC_IncludePath)</DCC_IncludePath>
<DCC_SYMBOL_PLATFORM>False</DCC_SYMBOL_PLATFORM> <DCC_SYMBOL_PLATFORM>False</DCC_SYMBOL_PLATFORM>
<DCC_UNIT_PLATFORM>False</DCC_UNIT_PLATFORM> <DCC_UNIT_PLATFORM>False</DCC_UNIT_PLATFORM>
</PropertyGroup> </PropertyGroup>
<ProjectExtensions> <ProjectExtensions>
<Borland.Personality>Delphi.Personality</Borland.Personality> <Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType /> <Borland.ProjectType/>
<BorlandProject> <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">G940LEDControl.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">G940LEDControl.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\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="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 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> </ProjectExtensions>
<Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" /> <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
<ItemGroup> <ItemGroup>
<DelphiCompile Include="G940LEDControl.dpr"> <DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource> <MainSource>MainSource</MainSource>
</DelphiCompile> </DelphiCompile>
<DCCReference Include="Forms\MainFrm.pas"> <DCCReference Include="Forms\MainFrm.pas">
<Form>MainForm</Form> <Form>MainForm</Form>
</DCCReference> </DCCReference>
<DCCReference Include="Units\FSXLEDStateProvider.pas" /> <DCCReference Include="Units\FSXLEDStateProvider.pas"/>
<DCCReference Include="Units\G940LEDStateConsumer.pas" /> <DCCReference Include="Units\LEDStateConsumer.pas"/>
<DCCReference Include="Units\LEDFunctionMap.pas" /> <DCCReference Include="Units\LEDStateProvider.pas"/>
<DCCReference Include="Units\LEDStateConsumer.pas" /> <DCCReference Include="Units\LEDFunctionMap.pas"/>
<DCCReference Include="Units\LEDStateProvider.pas" /> <DCCReference Include="Units\G940LEDStateConsumer.pas"/>
<DCCReference Include="..\Shared\LogiJoystickDLL.pas"/>
<DCCReference Include="..\Shared\SimConnect.pas"/>
<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> </ItemGroup>
</Project> <Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
</Project>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -1,11 +1,10 @@
unit FSXLEDStateProvider; unit FSXLEDStateProvider;
// ToDo check has gear (react to sim start, aircraft change, etc)
interface interface
uses uses
Classes, Classes,
SyncObjs, SyncObjs,
Windows,
LEDFunctionMap, LEDFunctionMap,
LEDStateConsumer, LEDStateConsumer,
@ -18,9 +17,7 @@ const
FUNCTION_FSX_LANDINGLIGHTS = FUNCTION_PROVIDER_OFFSET + 2; FUNCTION_FSX_LANDINGLIGHTS = FUNCTION_PROVIDER_OFFSET + 2;
FUNCTION_FSX_INSTRUMENTLIGHTS = FUNCTION_PROVIDER_OFFSET + 3; FUNCTION_FSX_INSTRUMENTLIGHTS = FUNCTION_PROVIDER_OFFSET + 3;
FUNCTION_FSX_PARKINGBRAKE = FUNCTION_PROVIDER_OFFSET + 4; FUNCTION_FSX_PARKINGBRAKE = FUNCTION_PROVIDER_OFFSET + 4;
FUNCTION_FSX_ENGINE = FUNCTION_PROVIDER_OFFSET + 5;
EXIT_ERROR_INITSIMCONNECT = 1;
EXIT_ERROR_CONNECT = 2;
type type
@ -34,12 +31,12 @@ type
procedure UpdateMap; procedure UpdateMap;
procedure HandleDispatch(AData: PSimConnectRecv); procedure HandleDispatch(AData: PSimConnectRecv);
procedure AddVariable(ADefineID: Cardinal; ADatumName, AUnitsName: string;
ADatumType: SIMCONNECT_DATAType = SIMCONNECT_DATAType_FLOAT64;
AEpsilon: Single = 0; ADatumID: DWORD = SIMCONNECT_UNUSED);
procedure AddDefinition(ADefinition: Cardinal); procedure AddDefinition(ADefinition: Cardinal);
procedure ClearDefinitions; procedure ClearDefinitions;
function GetDataBoolean(var AData: Cardinal): Boolean;
function GetDataDouble(var AData: Cardinal): Double;
property SimConnectHandle: THandle read FSimConnectHandle; property SimConnectHandle: THandle read FSimConnectHandle;
public public
constructor Create(AConsumer: ILEDStateConsumer); override; constructor Create(AConsumer: ILEDStateConsumer); override;
@ -54,31 +51,56 @@ type
implementation implementation
uses uses
ComObj, ComObj,
Math,
SysUtils; SysUtils;
const const
APPNAME = 'G940 LED Control'; APPNAME = 'G940 LED Control';
READY_TIMEOUT = 5000;
MAX_ENGINES = 4;
DEFINITION_GEAR = 1; DEFINITION_GEAR = 1;
DEFINITION_LIGHTS = 2; DEFINITION_LIGHTS = 2;
DEFINITION_INSTRUMENTLIGHTS = 3; DEFINITION_INSTRUMENTLIGHTS = 3;
DEFINITION_PARKINGBRAKE = 4; DEFINITION_PARKINGBRAKE = 4;
DEFINITION_ENGINE = 5;
FSX_VARIABLE_ISGEARRETRACTABLE = 'IS GEAR RETRACTABLE';
FSX_VARIABLE_GEARTOTALPCTEXTENDED = 'GEAR TOTAL PCT EXTENDED'; FSX_VARIABLE_GEARTOTALPCTEXTENDED = 'GEAR TOTAL PCT EXTENDED';
FSX_VARIABLE_LIGHTONSTATES = 'LIGHT ON STATES'; FSX_VARIABLE_LIGHTONSTATES = 'LIGHT ON STATES';
FSX_VARIABLE_PARKINGBRAKE = 'BRAKE PARKING INDICATOR'; FSX_VARIABLE_PARKINGBRAKE = 'BRAKE PARKING INDICATOR';
FSX_VARIABLE_NUMBEROFENGINES = 'NUMBER OF ENGINES';
FSX_VARIABLE_ENGCOMBUSTION = 'GENERAL ENG COMBUSTION:%d';
FSX_VARIABLE_ENGFAILED = 'ENG FAILED:%d';
FSX_VARIABLE_ENGONFIRE = 'ENG ON FIRE:%d';
FSX_UNIT_PERCENT = 'percent'; FSX_UNIT_PERCENT = 'percent';
FSX_UNIT_MASK = 'mask'; FSX_UNIT_MASK = 'mask';
FSX_UNIT_BOOL = 'bool'; FSX_UNIT_BOOL = 'bool';
FSX_UNIT_NUMBER = 'number';
FSX_LIGHTON_LANDING = $0004; FSX_LIGHTON_LANDING = $0004;
FSX_LIGHTON_PANEL = $0020; FSX_LIGHTON_PANEL = $0020;
FSX_LIGHTON_CABIN = $0200; FSX_LIGHTON_CABIN = $0200;
type
TGearData = packed record
IsGearRetractable: Integer;
TotalPctExtended: Double;
end;
PGearData = ^TGearData;
TEngineData = packed record
NumberOfEngines: Integer;
Combustion: array[1..MAX_ENGINES] of Integer;
Failed: array[1..MAX_ENGINES] of Integer;
OnFire: array[1..MAX_ENGINES] of Integer;
end;
PEngineData = ^TEngineData;
{ TFSXLEDStateProvider } { TFSXLEDStateProvider }
constructor TFSXLEDStateProvider.Create(AConsumer: ILEDStateConsumer); constructor TFSXLEDStateProvider.Create(AConsumer: ILEDStateConsumer);
begin begin
@ -99,10 +121,10 @@ end;
procedure TFSXLEDStateProvider.Initialize; procedure TFSXLEDStateProvider.Initialize;
begin begin
if not InitSimConnect then if not InitSimConnect then
raise EInitializeError.Create('SimConnect.dll could not be loaded', EXIT_ERROR_INITSIMCONNECT); raise EInitializeError.Create('SimConnect.dll could not be loaded');
if SimConnect_Open(FSimConnectHandle, APPNAME, 0, 0, 0, 0) <> S_OK then if SimConnect_Open(FSimConnectHandle, APPNAME, 0, 0, 0, 0) <> S_OK then
raise EInitializeError.Create('Connection to Flight Simulator could not be established', EXIT_ERROR_CONNECT); raise EInitializeError.Create('Connection to Flight Simulator could not be established');
UpdateMap; UpdateMap;
end; end;
@ -136,53 +158,50 @@ end;
procedure TFSXLEDStateProvider.UpdateMap; procedure TFSXLEDStateProvider.UpdateMap;
var
engineIndex: Integer;
begin begin
ClearDefinitions; ClearDefinitions;
{ Gear }
if Consumer.FunctionMap.HasFunction(FUNCTION_FSX_GEAR) then if Consumer.FunctionMap.HasFunction(FUNCTION_FSX_GEAR) then
begin begin
SimConnect_AddToDataDefinition(SimConnectHandle, DEFINITION_GEAR, AddVariable(DEFINITION_GEAR, FSX_VARIABLE_ISGEARRETRACTABLE, FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
FSX_VARIABLE_GEARTOTALPCTEXTENDED, AddVariable(DEFINITION_GEAR, FSX_VARIABLE_GEARTOTALPCTEXTENDED, FSX_UNIT_PERCENT);
FSX_UNIT_PERCENT);
SimConnect_RequestDataOnSimObject(SimConnectHandle, DEFINITION_GEAR,
DEFINITION_GEAR,
SIMCONNECT_OBJECT_ID_USER,
SIMCONNECT_PERIOD_SIM_FRAME,
SIMCONNECT_DATA_REQUEST_FLAG_CHANGED);
AddDefinition(DEFINITION_GEAR); AddDefinition(DEFINITION_GEAR);
end; end;
{ Lights }
if Consumer.FunctionMap.HasFunction(FUNCTION_FSX_LANDINGLIGHTS) or if Consumer.FunctionMap.HasFunction(FUNCTION_FSX_LANDINGLIGHTS) or
Consumer.FunctionMap.HasFunction(FUNCTION_FSX_INSTRUMENTLIGHTS) then Consumer.FunctionMap.HasFunction(FUNCTION_FSX_INSTRUMENTLIGHTS) then
begin begin
SimConnect_AddToDataDefinition(SimConnectHandle, DEFINITION_LIGHTS, AddVariable(DEFINITION_LIGHTS, FSX_VARIABLE_LIGHTONSTATES, FSX_UNIT_MASK, SIMCONNECT_DATATYPE_INT32);
FSX_VARIABLE_LIGHTONSTATES,
FSX_UNIT_MASK,
SIMCONNECT_DATATYPE_INT32);
SimConnect_RequestDataOnSimObject(SimConnectHandle, DEFINITION_LIGHTS,
DEFINITION_LIGHTS,
SIMCONNECT_OBJECT_ID_USER,
SIMCONNECT_PERIOD_SIM_FRAME,
SIMCONNECT_DATA_REQUEST_FLAG_CHANGED);
AddDefinition(DEFINITION_LIGHTS); AddDefinition(DEFINITION_LIGHTS);
end; end;
{ Parking brake }
if Consumer.FunctionMap.HasFunction(FUNCTION_FSX_PARKINGBRAKE) then if Consumer.FunctionMap.HasFunction(FUNCTION_FSX_PARKINGBRAKE) then
begin begin
SimConnect_AddToDataDefinition(SimConnectHandle, DEFINITION_PARKINGBRAKE, AddVariable(DEFINITION_PARKINGBRAKE, FSX_VARIABLE_PARKINGBRAKE, FSX_UNIT_BOOL, SIMCONNECT_DATATYPE_INT32);
FSX_VARIABLE_PARKINGBRAKE,
FSX_UNIT_BOOL,
SIMCONNECT_DATATYPE_INT32);
SimConnect_RequestDataOnSimObject(SimConnectHandle, DEFINITION_PARKINGBRAKE,
DEFINITION_PARKINGBRAKE,
SIMCONNECT_OBJECT_ID_USER,
SIMCONNECT_PERIOD_SIM_FRAME,
SIMCONNECT_DATA_REQUEST_FLAG_CHANGED);
AddDefinition(DEFINITION_PARKINGBRAKE); AddDefinition(DEFINITION_PARKINGBRAKE);
end; end;
{ Engine }
if Consumer.FunctionMap.HasFunction(FUNCTION_FSX_ENGINE) then
begin
AddVariable(DEFINITION_ENGINE, FSX_VARIABLE_NUMBEROFENGINES, FSX_UNIT_NUMBER, SIMCONNECT_DATAType_INT32);
for engineIndex := 1 to MAX_ENGINES do
AddVariable(DEFINITION_ENGINE, Format(FSX_VARIABLE_ENGCOMBUSTION, [engineIndex]), FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
for engineIndex := 1 to MAX_ENGINES do
AddVariable(DEFINITION_ENGINE, Format(FSX_VARIABLE_ENGFAILED, [engineIndex]), FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
for engineIndex := 1 to MAX_ENGINES do
AddVariable(DEFINITION_ENGINE, Format(FSX_VARIABLE_ENGONFIRE, [engineIndex]), FSX_UNIT_BOOL, SIMCONNECT_DATAType_INT32);
AddDefinition(DEFINITION_ENGINE);
end;
end; end;
@ -190,6 +209,10 @@ procedure TFSXLEDStateProvider.HandleDispatch(AData: PSimConnectRecv);
var var
simObjectData: PSimConnectRecvSimObjectData; simObjectData: PSimConnectRecvSimObjectData;
states: Cardinal; states: Cardinal;
gearData: PGearData;
engineData: PEngineData;
engineIndex: Integer;
state: TLEDState;
begin begin
case SIMCONNECT_RECV_ID(AData^.dwID) of case SIMCONNECT_RECV_ID(AData^.dwID) of
@ -200,11 +223,17 @@ begin
case simObjectData^.dwRequestID of case simObjectData^.dwRequestID of
DEFINITION_GEAR: DEFINITION_GEAR:
begin begin
case Trunc(GetDataDouble(simObjectData^.dwData) * 100) of gearData := @simObjectData^.dwData;
if gearData^.IsGearRetractable <> 0 then
begin
case Trunc(gearData^.TotalPctExtended * 100) of
0: Consumer.SetStateByFunction(FUNCTION_FSX_GEAR, lsRed); 0: Consumer.SetStateByFunction(FUNCTION_FSX_GEAR, lsRed);
100: Consumer.SetStateByFunction(FUNCTION_FSX_GEAR, lsGreen); 100: Consumer.SetStateByFunction(FUNCTION_FSX_GEAR, lsGreen);
else Consumer.SetStateByFunction(FUNCTION_FSX_GEAR, lsAmber); else Consumer.SetStateByFunction(FUNCTION_FSX_GEAR, lsAmber);
end; end;
end else
Consumer.SetStateByFunction(FUNCTION_FSX_GEAR, lsOff);
end; end;
DEFINITION_LIGHTS: DEFINITION_LIGHTS:
@ -222,10 +251,38 @@ begin
end; end;
DEFINITION_PARKINGBRAKE: DEFINITION_PARKINGBRAKE:
if GetDataBoolean(simObjectData^.dwData) then if simObjectData^.dwData <> 0 then
Consumer.SetStateByFunction(FUNCTION_FSX_PARKINGBRAKE, lsRed) Consumer.SetStateByFunction(FUNCTION_FSX_PARKINGBRAKE, lsRed)
else else
Consumer.SetStateByFunction(FUNCTION_FSX_PARKINGBRAKE, lsGreen); Consumer.SetStateByFunction(FUNCTION_FSX_PARKINGBRAKE, lsGreen);
DEFINITION_ENGINE:
begin
engineData := @simObjectData^.dwData;
if engineData^.NumberOfEngines > 0 then
begin
state := lsGreen;
for engineIndex := 1 to Min(engineData^.NumberOfEngines, MAX_ENGINES) do
begin
if engineData.OnFire[engineIndex] <> 0 then
begin
state := lsError;
break;
end else if engineData.Failed[engineIndex] <> 0 then
state := lsWarning
else if (engineData.Combustion[engineIndex] = 0) and
(state = lsGreen) then
state := lsRed;
end;
Consumer.SetStateByFunction(FUNCTION_FSX_ENGINE, state);
end else
Consumer.SetStateByFunction(FUNCTION_FSX_ENGINE, lsOff);
end;
end; end;
end; end;
@ -238,9 +295,22 @@ end;
procedure TFSXLEDStateProvider.AddDefinition(ADefinition: Cardinal); procedure TFSXLEDStateProvider.AddDefinition(ADefinition: Cardinal);
begin begin
FDefinitions.Add(Pointer(ADefinition)); FDefinitions.Add(Pointer(ADefinition));
SimConnect_RequestDataOnSimObject(SimConnectHandle,
ADefinition,
ADefinition,
SIMCONNECT_OBJECT_ID_USER,
SIMCONNECT_PERIOD_SIM_FRAME,
SIMCONNECT_DATA_REQUEST_FLAG_CHANGED);
end; end;
procedure TFSXLEDStateProvider.AddVariable(ADefineID: Cardinal; ADatumName, AUnitsName: string;
ADatumType: SIMCONNECT_DATAType; AEpsilon: Single;
ADatumID: DWORD);
begin
SimConnect_AddToDataDefinition(SimConnectHandle, ADefineID, AnsiString(ADatumName), AnsiString(AUnitsName), ADatumType, AEpsilon, ADatumID);
end;
procedure TFSXLEDStateProvider.ClearDefinitions; procedure TFSXLEDStateProvider.ClearDefinitions;
var var
definition: Pointer; definition: Pointer;
@ -256,18 +326,6 @@ begin
end; end;
function TFSXLEDStateProvider.GetDataBoolean(var AData: Cardinal): Boolean;
begin
Result := (AData <> 0);
end;
function TFSXLEDStateProvider.GetDataDouble(var AData: Cardinal): Double;
begin
Result := PDouble(@AData)^;
end;
function TFSXLEDStateProvider.GetProcessMessagesInterval: Integer; function TFSXLEDStateProvider.GetProcessMessagesInterval: Integer;
begin begin
Result := 50; Result := 50;

View File

@ -9,12 +9,16 @@ uses
OtlTaskControl, OtlTaskControl,
LEDFunctionMap, LEDFunctionMap,
LEDStateConsumer; LEDStateConsumer,
LEDStateProvider;
const const
MSG_FINDTHROTTLEDEVICE = MSG_CONSUMER_OFFSET + 1; MSG_FINDTHROTTLEDEVICE = MSG_CONSUMER_OFFSET + 1;
MSG_NOTIFY_DEVICESTATE = MSG_CONSUMER_OFFSET + 2; MSG_NOTIFY_DEVICESTATE = MSG_CONSUMER_OFFSET + 2;
MSG_TIMER_BLINK = MSG_CONSUMER_OFFSET + 3;
TIMER_BLINK = TIMER_CONSUMER_OFFSET + 1;
type type
TG940LEDStateConsumer = class(TLEDStateConsumer) TG940LEDStateConsumer = class(TLEDStateConsumer)
@ -24,14 +28,21 @@ type
FRed: Byte; FRed: Byte;
FGreen: Byte; FGreen: Byte;
FBlinkTimerStarted: Boolean;
FBlinkCounter: Integer;
protected protected
procedure MsgFindThrottleDevice(var msg: TOmniMessage); message MSG_FINDTHROTTLEDEVICE; procedure MsgFindThrottleDevice(var msg: TOmniMessage); message MSG_FINDTHROTTLEDEVICE;
procedure MsgTimerBlink(var msg: TOmniMessage); message MSG_TIMER_BLINK;
protected protected
function Initialize: Boolean; override; function Initialize: Boolean; override;
procedure ResetLEDState; override; procedure ResetLEDState; override;
procedure LEDStateChanged(ALEDIndex: Integer; AState: TLEDState); override; procedure LEDStateChanged(ALEDIndex: Integer; AState: TLEDState); override;
procedure Changed; override; procedure Changed; override;
procedure StartBlinkTimer;
procedure StopBlinkTimer;
procedure FindThrottleDevice; procedure FindThrottleDevice;
procedure FoundThrottleDevice(ADeviceGUID: TGUID); procedure FoundThrottleDevice(ADeviceGUID: TGUID);
@ -47,8 +58,8 @@ const
DEVICESTATE_FOUND = 1; DEVICESTATE_FOUND = 1;
DEVICESTATE_NOTFOUND = 2; DEVICESTATE_NOTFOUND = 2;
EXIT_ERROR_LOGIJOYSTICKDLL = 1; EXIT_ERROR_LOGIJOYSTICKDLL = EXIT_CONSUMER_OFFSET + 1;
EXIT_ERROR_DIRECTINPUT = 2; EXIT_ERROR_DIRECTINPUT = EXIT_CONSUMER_OFFSET + 2;
implementation implementation
@ -56,12 +67,18 @@ uses
SysUtils, SysUtils,
Windows, Windows,
OtlCommon,
LogiJoystickDLL; LogiJoystickDLL;
const
BLINK_INTERVAL = 500;
type type
TRunInMainThreadSetLEDs = class(TInterfacedObject, IRunInMainThread) TRunInMainThreadSetLEDs = class(TOmniWaitableValue, IRunInMainThread)
private private
FDevice: IDirectInputDevice8; FDevice: IDirectInputDevice8;
FRed: Byte; FRed: Byte;
@ -160,12 +177,20 @@ begin
lsRed: lsRed:
red := True; red := True;
// ToDo timers voor warning / error
lsWarning: lsWarning:
begin
red := True; red := True;
green := True;
StartBlinkTimer;
end;
lsError: lsError:
begin
red := True; red := True;
StartBlinkTimer;
end;
end; end;
SetBit(FRed, ALEDIndex, red); SetBit(FRed, ALEDIndex, red);
@ -181,7 +206,28 @@ begin
if Assigned(ThrottleDevice) then if Assigned(ThrottleDevice) then
{ Logitech SDK will not change the color outside of the main thread } { Logitech SDK will not change the color outside of the main thread }
RunInMainThread(TRunInMainThreadSetLEDs.Create(ThrottleDevice, FRed, FGreen)); RunInMainThread(TRunInMainThreadSetLEDs.Create(ThrottleDevice, FRed, FGreen), Destroying);
end;
procedure TG940LEDStateConsumer.StartBlinkTimer;
begin
if FBlinkTimerStarted then
exit;
FBlinkCounter := 0;
Task.SetTimer(TIMER_BLINK, BLINK_INTERVAL, MSG_TIMER_BLINK);
FBlinkTimerStarted := True;
end;
procedure TG940LEDStateConsumer.StopBlinkTimer;
begin
if not FBlinkTimerStarted then
exit;
Task.ClearTimer(TIMER_BLINK);
FBlinkTimerStarted := False;
end; end;
@ -219,6 +265,51 @@ begin
end; end;
procedure TG940LEDStateConsumer.MsgTimerBlink(var msg: TOmniMessage);
var
warningState: TLEDState;
errorState: TLEDState;
ledIndex: Integer;
state: TLEDState;
begin
Inc(FBlinkCounter);
if FBlinkCounter > 3 then
FBlinkCounter := 0;
warningState := lsOff;
errorState := lsOff;
{ Error lights blink twice as fast }
if (FBlinkCounter in [0, 1]) then
warningState := lsAmber;
if (FBlinkCounter in [0, 2]) then
errorState := lsRed;
if StateMap.FindFirst([lsWarning, lsError], ledIndex, state) then
begin
BeginUpdate;
try
repeat
case state of
lsWarning:
if StateMap.GetState(ledIndex) <> warningState then
LEDStateChanged(ledIndex, warningState);
lsError:
if StateMap.GetState(ledIndex) <> errorState then
LEDStateChanged(ledIndex, errorState);
end;
until not StateMap.FindNext([lsWarning, lsError], ledIndex, state);
finally
EndUpdate;
end;
end else
StopBlinkTimer;
end;
{ TRunInMainThreadSetLEDs } { TRunInMainThreadSetLEDs }
constructor TRunInMainThreadSetLEDs.Create(ADevice: IDirectInputDevice8; ARed, AGreen: Byte); constructor TRunInMainThreadSetLEDs.Create(ADevice: IDirectInputDevice8; ARed, AGreen: Byte);
begin begin

View File

@ -10,12 +10,12 @@ uses
type type
TLEDState = (lsOff, lsGreen, lsAmber, lsRed, lsWarning, lsError); TLEDState = (lsOff, lsGreen, lsAmber, lsRed, lsWarning, lsError);
TLEDStateSet = set of TLEDState;
TLEDFunctionMap = class(TObject) TLEDFunctionMap = class(TObject)
private private
FFunctions: TX2IIHash; FFunctions: TX2IIHash;
protected
function Find(AFunction: Integer; out ALEDIndex: Integer): Boolean;
public public
constructor Create; constructor Create;
destructor Destroy; override; destructor Destroy; override;
@ -43,6 +43,10 @@ type
function GetState(ALEDIndex: Integer; ADefault: TLEDState = lsGreen): TLEDState; function GetState(ALEDIndex: Integer; ADefault: TLEDState = lsGreen): TLEDState;
function SetState(ALEDIndex: Integer; AState: TLEDState): Boolean; function SetState(ALEDIndex: Integer; AState: TLEDState): Boolean;
function HasStates(AStates: TLEDStateSet): Boolean;
function FindFirst(AStates: TLEDStateSet; out ALEDIndex: Integer; out AState: TLEDState): Boolean;
function FindNext(AStates: TLEDStateSet; out ALEDIndex: Integer; out AState: TLEDState): Boolean;
end; end;
@ -108,18 +112,11 @@ end;
function TLEDFunctionMap.FindFirst(AFunction: Integer; out ALEDIndex: Integer): Boolean; function TLEDFunctionMap.FindFirst(AFunction: Integer; out ALEDIndex: Integer): Boolean;
begin begin
FFunctions.First; FFunctions.First;
Result := Find(AFunction, ALEDIndex); Result := FindNext(AFunction, ALEDIndex);
end; end;
function TLEDFunctionMap.FindNext(AFunction: Integer; out ALEDIndex: Integer): Boolean; function TLEDFunctionMap.FindNext(AFunction: Integer; out ALEDIndex: Integer): Boolean;
begin
Result := Find(AFunction, ALEDIndex);
end;
function TLEDFunctionMap.Find(AFunction: Integer; out ALEDIndex: Integer): Boolean;
begin begin
Result := False; Result := False;
@ -177,4 +174,37 @@ begin
FStates[ALEDIndex] := Ord(AState); FStates[ALEDIndex] := Ord(AState);
end; end;
function TLEDStateMap.HasStates(AStates: TLEDStateSet): Boolean;
var
ledIndex: Integer;
state: TLEDState;
begin
Result := FindFirst(AStates, ledIndex, state);
end;
function TLEDStateMap.FindFirst(AStates: TLEDStateSet; out ALEDIndex: Integer; out AState: TLEDState): Boolean;
begin
FStates.First;
Result := FindNext(AStates, ALEDIndex, AState);
end;
function TLEDStateMap.FindNext(AStates: TLEDStateSet; out ALEDIndex: Integer; out AState: TLEDState): Boolean;
begin
Result := False;
while FStates.Next do
if TLEDState(FStates.CurrentValue) in AStates then
begin
ALEDIndex := FStates.CurrentKey;
AState := TLEDState(FStates.CurrentValue);
Result := True;
break;
end;
end;
end. end.

View File

@ -3,6 +3,7 @@ unit LEDStateConsumer;
interface interface
uses uses
OtlComm, OtlComm,
OtlCommon,
OtlTaskControl, OtlTaskControl,
LEDFunctionMap, LEDFunctionMap,
@ -17,16 +18,18 @@ const
MSG_PROCESS_MESSAGES = 5; MSG_PROCESS_MESSAGES = 5;
MSG_FINALIZE = 6; MSG_FINALIZE = 6;
MSG_RUN_IN_MAINTHREAD = 7; MSG_PROVIDER_KILLED = 7;
MSG_RUN_IN_MAINTHREAD = 8;
MSG_CONSUMER_OFFSET = MSG_RUN_IN_MAINTHREAD; MSG_CONSUMER_OFFSET = MSG_RUN_IN_MAINTHREAD;
TIMER_PROCESSMESSAGES = 1; TIMER_PROCESSMESSAGES = 1;
TIMER_CONSUMER_OFFSET = TIMER_PROCESSMESSAGES;
type type
{ This interface name made me giggle. Because it's true. } { This interface name made me giggle. Because it's true. }
IRunInMainThread = interface IRunInMainThread = interface(IOmniWaitableValue)
['{68B8F2F7-ED40-4078-9D99-503D7AFA068B}'] ['{68B8F2F7-ED40-4078-9D99-503D7AFA068B}']
procedure Execute; procedure Execute;
end; end;
@ -40,6 +43,7 @@ type
FTimerSet: Boolean; FTimerSet: Boolean;
FChanged: Boolean; FChanged: Boolean;
FUpdateCount: Integer; FUpdateCount: Integer;
FDestroying: Boolean;
protected protected
procedure MsgClearFunctions(var msg: TOmniMessage); message MSG_CLEAR_FUNCTIONS; procedure MsgClearFunctions(var msg: TOmniMessage); message MSG_CLEAR_FUNCTIONS;
procedure MsgSetFunction(var msg: TOmniMessage); message MSG_SET_FUNCTION; procedure MsgSetFunction(var msg: TOmniMessage); message MSG_SET_FUNCTION;
@ -53,7 +57,7 @@ type
procedure InitializeProvider(AProviderClass: TLEDStateProviderClass); procedure InitializeProvider(AProviderClass: TLEDStateProviderClass);
procedure FinalizeProvider; procedure FinalizeProvider;
procedure RunInMainThread(AExecutor: IRunInMainThread); procedure RunInMainThread(AExecutor: IRunInMainThread; AWait: Boolean = False);
procedure InitializeLEDState; virtual; procedure InitializeLEDState; virtual;
procedure ResetLEDState; virtual; procedure ResetLEDState; virtual;
procedure LEDStateChanged(ALEDIndex: Integer; AState: TLEDState); virtual; procedure LEDStateChanged(ALEDIndex: Integer; AState: TLEDState); virtual;
@ -63,6 +67,7 @@ type
function GetFunctionMap: TLEDFunctionMap; function GetFunctionMap: TLEDFunctionMap;
procedure SetStateByFunction(AFunction: Integer; AState: TLEDState); procedure SetStateByFunction(AFunction: Integer; AState: TLEDState);
property Destroying: Boolean read FDestroying;
property FunctionMap: TLEDFunctionMap read GetFunctionMap; property FunctionMap: TLEDFunctionMap read GetFunctionMap;
property StateMap: TLEDStateMap read FStateMap; property StateMap: TLEDStateMap read FStateMap;
property Provider: TLEDStateProvider read FProvider; property Provider: TLEDStateProvider read FProvider;
@ -72,22 +77,20 @@ type
procedure BeginUpdate; procedure BeginUpdate;
procedure EndUpdate; procedure EndUpdate;
class procedure ClearFunctions(AConsumer: IOmniTaskControl);
class procedure SetFunction(AConsumer: IOmniTaskControl; ALEDIndex, AFunction: Integer);
class procedure InitializeStateProvider(AConsumer: IOmniTaskControl; AProviderClass: TLEDStateProviderClass);
class procedure FinalizeStateProvider(AConsumer: IOmniTaskControl);
class procedure Finalize(AConsumer: IOmniTaskControl);
end; end;
procedure ClearFunctions(AConsumer: IOmniTaskControl);
procedure SetFunction(AConsumer: IOmniTaskControl; ALEDIndex, AFunction: Integer);
procedure InitializeStateProvider(AConsumer: IOmniTaskControl; AProviderClass: TLEDStateProviderClass);
procedure FinalizeStateProvider(AConsumer: IOmniTaskControl);
procedure Finalize(AConsumer: IOmniTaskControl);
implementation implementation
uses uses
SysUtils, SysUtils,
Windows, Windows;
OtlCommon;
const const
@ -103,8 +106,6 @@ begin
FStateMap := TLEDStateMap.Create; FStateMap := TLEDStateMap.Create;
InitializeLEDState; InitializeLEDState;
end; end;
@ -189,6 +190,12 @@ begin
BeginUpdate; BeginUpdate;
try try
Provider.ProcessMessages; Provider.ProcessMessages;
if Provider.Terminated then
begin
FinalizeProvider;
Task.Comm.Send(MSG_PROVIDER_KILLED, '');
end;
finally finally
EndUpdate; EndUpdate;
end; end;
@ -197,7 +204,9 @@ end;
procedure TLEDStateConsumer.MsgFinalize(var msg: TOmniMessage); procedure TLEDStateConsumer.MsgFinalize(var msg: TOmniMessage);
begin begin
FDestroying := True;
FinalizeProvider; FinalizeProvider;
Task.Terminate;
end; end;
@ -206,7 +215,7 @@ begin
FinalizeProvider; FinalizeProvider;
FProvider := AProviderClass.Create(Self); FProvider := AProviderClass.Create(Self);
// ToDo exception handling try
Provider.Initialize; Provider.Initialize;
if Provider.ProcessMessagesInterval > -1 then if Provider.ProcessMessagesInterval > -1 then
@ -216,6 +225,13 @@ begin
end; end;
InitializeLEDState; InitializeLEDState;
except
on E:Exception do
begin
FProvider := nil;
Task.Comm.Send(MSG_PROVIDER_KILLED, E.Message);
end;
end;
end; end;
@ -239,20 +255,11 @@ begin
end; end;
procedure TLEDStateConsumer.RunInMainThread(AExecutor: IRunInMainThread); procedure TLEDStateConsumer.RunInMainThread(AExecutor: IRunInMainThread; AWait: Boolean);
var
value: TOmniWaitableValue;
begin begin
value := TOmniWaitableValue.Create; Task.Comm.Send(MSG_RUN_IN_MAINTHREAD, AExecutor);
try if AWait then
value.Value.AsInterface := AExecutor; AExecutor.WaitFor(INFINITE);
Task.Comm.Send(MSG_RUN_IN_MAINTHREAD, value);
value.WaitFor(INFINITE);
finally
FreeAndNil(value);
end;
end; end;
@ -312,31 +319,32 @@ begin
end; end;
class procedure TLEDStateConsumer.ClearFunctions(AConsumer: IOmniTaskControl); { Helpers }
procedure ClearFunctions(AConsumer: IOmniTaskControl);
begin begin
AConsumer.Comm.Send(MSG_CLEAR_FUNCTIONS); AConsumer.Comm.Send(MSG_CLEAR_FUNCTIONS);
end; end;
class procedure TLEDStateConsumer.SetFunction(AConsumer: IOmniTaskControl; ALEDIndex, AFunction: Integer); procedure SetFunction(AConsumer: IOmniTaskControl; ALEDIndex, AFunction: Integer);
begin begin
AConsumer.Comm.Send(MSG_SET_FUNCTION, [ALEDIndex, AFunction]); AConsumer.Comm.Send(MSG_SET_FUNCTION, [ALEDIndex, AFunction]);
end; end;
class procedure TLEDStateConsumer.InitializeStateProvider(AConsumer: IOmniTaskControl; AProviderClass: TLEDStateProviderClass); procedure InitializeStateProvider(AConsumer: IOmniTaskControl; AProviderClass: TLEDStateProviderClass);
begin begin
AConsumer.Comm.Send(MSG_INITIALIZE_PROVIDER, Pointer(AProviderClass)); AConsumer.Comm.Send(MSG_INITIALIZE_PROVIDER, Pointer(AProviderClass));
end; end;
class procedure TLEDStateConsumer.FinalizeStateProvider(AConsumer: IOmniTaskControl); procedure FinalizeStateProvider(AConsumer: IOmniTaskControl);
begin begin
AConsumer.Comm.Send(MSG_FINALIZE_PROVIDER); AConsumer.Comm.Send(MSG_FINALIZE_PROVIDER);
end; end;
class procedure TLEDStateConsumer.Finalize(AConsumer: IOmniTaskControl); procedure Finalize(AConsumer: IOmniTaskControl);
begin begin
AConsumer.Comm.Send(MSG_FINALIZE); AConsumer.Comm.Send(MSG_FINALIZE);
end; end;

View File

@ -9,15 +9,7 @@ uses
LEDFunctionMap; LEDFunctionMap;
type type
EInitializeError = class(Exception) EInitializeError = class(Exception);
private
FExitCode: Integer;
public
constructor Create(const Msg: string; ExitCode: Integer = 0);
property ExitCode: Integer read FExitCode write FExitCode;
end;
ILEDStateConsumer = interface ILEDStateConsumer = interface
['{6E630C92-7C5C-4D16-8BED-AE27559FA584}'] ['{6E630C92-7C5C-4D16-8BED-AE27559FA584}']
@ -55,6 +47,13 @@ type
TLEDStateProviderClass = class of TLEDStateProvider; TLEDStateProviderClass = class of TLEDStateProvider;
const
EXIT_SUCCESS = 0;
EXIT_ERROR = 1;
EXIT_CONSUMER_OFFSET = 100;
EXIT_PROVIDER_OFFSET = 200;
implementation implementation
@ -99,13 +98,4 @@ begin
Result := -1; Result := -1;
end; end;
{ EInitializeError }
constructor EInitializeError.Create(const Msg: string; ExitCode: Integer);
begin
inherited Create(Msg);
FExitCode := ExitCode;
end;
end. end.

View File

@ -66,11 +66,11 @@ begin
LogiJoystickDLLHandle := LoadLibrary(LogiJoystickDLLFileName); LogiJoystickDLLHandle := LoadLibrary(LogiJoystickDLLFileName);
if LogiJoystickDLLHandle <> 0 then if LogiJoystickDLLHandle <> 0 then
begin begin
@SetButtonColor := GetProcAddress(LogiJoystickDLLHandle, 'LJ_SetButtonColor'); @SetButtonColor := GetProcAddress(LogiJoystickDLLHandle, 'SetButtonColor');
@SetAllButtonsColor := GetProcAddress(LogiJoystickDLLHandle, 'LJ_SetAllButtonsColor'); @SetAllButtonsColor := GetProcAddress(LogiJoystickDLLHandle, 'SetAllButtonsColor');
@IsButtonColor := GetProcAddress(LogiJoystickDLLHandle, 'LJ_IsButtonColor'); @IsButtonColor := GetProcAddress(LogiJoystickDLLHandle, 'IsButtonColor');
@SetLEDs := GetProcAddress(LogiJoystickDLLHandle, 'LJ_SetLEDs'); @SetLEDs := GetProcAddress(LogiJoystickDLLHandle, 'SetLEDs');
@GetLEDs := GetProcAddress(LogiJoystickDLLHandle, 'LJ_GetLEDs'); @GetLEDs := GetProcAddress(LogiJoystickDLLHandle, 'GetLEDs');
end; end;
end; end;

View File

@ -672,8 +672,8 @@ var
SimConnect_AddToDataDefinition: function( SimConnect_AddToDataDefinition: function(
hSimConnect: THandle; hSimConnect: THandle;
DefineID: SIMCONNECT_DATA_DEFINITION_ID; DefineID: SIMCONNECT_DATA_DEFINITION_ID;
DatumName: string; DatumName: AnsiString;
UnitsName: string; UnitsName: AnsiString;
DatumType: SIMCONNECT_DATAType = SIMCONNECT_DATAType_FLOAT64; DatumType: SIMCONNECT_DATAType = SIMCONNECT_DATAType_FLOAT64;
fEpsilon: Single = 0; fEpsilon: Single = 0;
DatumID: DWORD = SIMCONNECT_UNUSED DatumID: DWORD = SIMCONNECT_UNUSED
@ -685,13 +685,13 @@ var
SimConnect_FlightLoad: function( SimConnect_FlightLoad: function(
hSimConnect: THandle; hSimConnect: THandle;
const szFileName: PChar const szFileName: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_FlightSave: function( SimConnect_FlightSave: function(
hSimConnect: THandle; hSimConnect: THandle;
const szFileName: PChar; const szFileName: PAnsiChar;
const szDescription: PChar; const szDescription: PAnsiChar;
Flags: DWORD Flags: DWORD
): HRESULT; StdCall; ): HRESULT; StdCall;
@ -703,7 +703,7 @@ var
SimConnect_Open: function( SimConnect_Open: function(
var phSimConnect: THandle; var phSimConnect: THandle;
szName: PChar; szName: PAnsiChar;
hWnd: HWnd; hWnd: HWnd;
UserEventWin32: DWORD; UserEventWin32: DWORD;
hEventHandle: THandle; hEventHandle: THandle;
@ -755,14 +755,14 @@ var
SimConnect_MapClientEventToSimEvent: function( SimConnect_MapClientEventToSimEvent: function(
hSimConnect: THandle; hSimConnect: THandle;
EventID: SIMCONNECT_CLIENT_EVENT_ID; EventID: SIMCONNECT_CLIENT_EVENT_ID;
EventName: string = '' EventName: AnsiString = ''
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_MapInputEventToClientEvent: function( SimConnect_MapInputEventToClientEvent: function(
hSimConnect: THandle; hSimConnect: THandle;
GroupID: GroupID:
SIMCONNECT_INPUT_GROUP_ID; SIMCONNECT_INPUT_GROUP_ID;
const szInputDefinition: PChar; const szInputDefinition: PAnsiChar;
DownEventID: SIMCONNECT_CLIENT_EVENT_ID; DownEventID: SIMCONNECT_CLIENT_EVENT_ID;
DownValue: DWORD = 0; DownValue: DWORD = 0;
UpEventID: SIMCONNECT_CLIENT_EVENT_ID = Ord(SIMCONNECT_UNUSED); UpEventID: SIMCONNECT_CLIENT_EVENT_ID = Ord(SIMCONNECT_UNUSED);
@ -780,8 +780,8 @@ var
SimConnect_RetrieveString: function( SimConnect_RetrieveString: function(
pData: PSimConnectRecv; pData: PSimConnectRecv;
cbData: Cardinal; cbData: Cardinal;
pStringV: PChar; pStringV: PAnsiChar;
var pszString: PChar; var pszString: PAnsiChar;
var pcbString: Cardinal var pcbString: Cardinal
): HRESULT; StdCall; ): HRESULT; StdCall;
@ -820,7 +820,7 @@ var
SimConnect_MenuAddItem: function( SimConnect_MenuAddItem: function(
hSimConnect: THandle; hSimConnect: THandle;
const szMenuItem: PChar; const szMenuItem: PAnsiChar;
MenuEventID: SIMCONNECT_CLIENT_EVENT_ID; MenuEventID: SIMCONNECT_CLIENT_EVENT_ID;
dwData: Cardinal dwData: Cardinal
): HRESULT; StdCall; ): HRESULT; StdCall;
@ -828,9 +828,9 @@ var
SimConnect_RequestReservedKey: function( SimConnect_RequestReservedKey: function(
hSimConnect: THandle; hSimConnect: THandle;
EventID: SIMCONNECT_CLIENT_EVENT_ID; EventID: SIMCONNECT_CLIENT_EVENT_ID;
szKeyChoice1: string; szKeyChoice1: AnsiString;
szKeyChoice2: string; szKeyChoice2: AnsiString;
szKeyChoice3: string szKeyChoice3: AnsiString
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_TransmitClientEvent: function( SimConnect_TransmitClientEvent: function(
@ -852,20 +852,20 @@ var
SimConnect_WeatherRequestObservationAtStation: function( SimConnect_WeatherRequestObservationAtStation: function(
hSimConnect: THandle; hSimConnect: THandle;
RequestID: SIMCONNECT_DATA_REQUEST_ID; RequestID: SIMCONNECT_DATA_REQUEST_ID;
const szICAO: PChar const szICAO: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_AICreateSimulatedObject: function( SimConnect_AICreateSimulatedObject: function(
hSimConnect: THandle; hSimConnect: THandle;
const szContainerTitle: PChar; const szContainerTitle: PAnsiChar;
InitPos: SIMCONNECT_DATA_INITPOSITION; InitPos: SIMCONNECT_DATA_INITPOSITION;
RequestID: SIMCONNECT_DATA_REQUEST_ID RequestID: SIMCONNECT_DATA_REQUEST_ID
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_AICreateNonATCAircraft: function( SimConnect_AICreateNonATCAircraft: function(
hSimConnect: THandle; hSimConnect: THandle;
const szContainerTitle: PChar; const szContainerTitle: PAnsiChar;
const szTailNumber: PChar; const szTailNumber: PAnsiChar;
InitPos: SIMCONNECT_DATA_INITPOSITION; InitPos: SIMCONNECT_DATA_INITPOSITION;
RequestID: SIMCONNECT_DATA_REQUEST_ID RequestID: SIMCONNECT_DATA_REQUEST_ID
): HRESULT; StdCall; ): HRESULT; StdCall;
@ -873,30 +873,30 @@ var
SimConnect_AISetAircraftFlightPlan: function( SimConnect_AISetAircraftFlightPlan: function(
hSimConnect: THandle; hSimConnect: THandle;
ObjectID: SIMCONNECT_OBJECT_ID; ObjectID: SIMCONNECT_OBJECT_ID;
const szFlightPlanPath: PChar; const szFlightPlanPath: PAnsiChar;
RequestID: SIMCONNECT_DATA_REQUEST_ID RequestID: SIMCONNECT_DATA_REQUEST_ID
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_AICreateParkedATCAircraft: function( SimConnect_AICreateParkedATCAircraft: function(
hSimConnect: THandle; hSimConnect: THandle;
const szContainerTitle: PChar; const szContainerTitle: PAnsiChar;
const szTailNumber: PChar; const szTailNumber: PAnsiChar;
const szAirportID: PChar; const szAirportID: PAnsiChar;
RequestID: SIMCONNECT_DATA_REQUEST_ID RequestID: SIMCONNECT_DATA_REQUEST_ID
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_SubscribeToSystemEvent: function( SimConnect_SubscribeToSystemEvent: function(
hSimConnect: THandle; hSimConnect: THandle;
EventID: SIMCONNECT_CLIENT_EVENT_ID; EventID: SIMCONNECT_CLIENT_EVENT_ID;
const SystemEventName: PChar const SystemEventName: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_AICreateEnrouteATCAircraft: function( SimConnect_AICreateEnrouteATCAircraft: function(
hSimConnect: THandle; hSimConnect: THandle;
const szContainerTitle: PChar; const szContainerTitle: PAnsiChar;
const szTailNumber: PChar; const szTailNumber: PAnsiChar;
iFlightNumber: Integer; iFlightNumber: Integer;
const szFlightPlanPath: PChar; const szFlightPlanPath: PAnsiChar;
dFlightPlanPosition: Double; dFlightPlanPosition: Double;
bTouchAndGo: Bool; bTouchAndGo: Bool;
RequestID: SIMCONNECT_DATA_REQUEST_ID RequestID: SIMCONNECT_DATA_REQUEST_ID
@ -905,15 +905,15 @@ var
SimConnect_RequestSystemState: function( SimConnect_RequestSystemState: function(
hSimConnect: THandle; hSimConnect: THandle;
RequestID: SIMCONNECT_DATA_REQUEST_ID; RequestID: SIMCONNECT_DATA_REQUEST_ID;
const szState: PChar const szState: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_SetSystemState: function( SimConnect_SetSystemState: function(
hSimConnect: THandle; hSimConnect: THandle;
const szState: PChar; const szState: PAnsiChar;
dwInteger: Cardinal; dwInteger: Cardinal;
fFloat: Single; fFloat: Single;
const szString: PChar const szString: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_GetLastSentPacketID: function( SimConnect_GetLastSentPacketID: function(
@ -924,7 +924,7 @@ var
SimConnect_MenuAddSubItem: function( SimConnect_MenuAddSubItem: function(
hSimConnect: THandle; hSimConnect: THandle;
MenuEventID: SIMCONNECT_CLIENT_EVENT_ID; MenuEventID: SIMCONNECT_CLIENT_EVENT_ID;
const szMenuItem: PChar; const szMenuItem: PAnsiChar;
SubMenuEventID: SIMCONNECT_CLIENT_EVENT_ID; SubMenuEventID: SIMCONNECT_CLIENT_EVENT_ID;
dwData: Cardinal dwData: Cardinal
): HRESULT; StdCall; ): HRESULT; StdCall;
@ -942,7 +942,7 @@ var
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_FlightPlanLoad: function(hSimConnect: THandle; const szFileName: SimConnect_FlightPlanLoad: function(hSimConnect: THandle; const szFileName:
PChar): HRESULT; StdCall; PAnsiChar): HRESULT; StdCall;
// BEWARE!!!!! // BEWARE!!!!!
// Unlike the C version these must not pass the GUID as a "const" // Unlike the C version these must not pass the GUID as a "const"
@ -989,7 +989,7 @@ var
SimConnect_RemoveInputEvent: function( SimConnect_RemoveInputEvent: function(
hSimConnect: THandle; hSimConnect: THandle;
GroupID: SIMCONNECT_INPUT_GROUP_ID; GroupID: SIMCONNECT_INPUT_GROUP_ID;
const szInputDefinition: PChar const szInputDefinition: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_ClearInputGroup: function( SimConnect_ClearInputGroup: function(
@ -1013,8 +1013,8 @@ var
SimConnect_WeatherCreateStation: function( SimConnect_WeatherCreateStation: function(
hSimConnect: THandle; hSimConnect: THandle;
RequestID: SIMCONNECT_DATA_REQUEST_ID; RequestID: SIMCONNECT_DATA_REQUEST_ID;
const szICAO: PChar; const szICAO: PAnsiChar;
const szName: PChar; const szName: PAnsiChar;
lat: Single; lat: Single;
lon: Single; lon: Single;
alt: Single alt: Single
@ -1023,13 +1023,13 @@ var
SimConnect_WeatherRemoveStation: function( SimConnect_WeatherRemoveStation: function(
hSimConnect: THandle; hSimConnect: THandle;
RequestID: SIMCONNECT_DATA_REQUEST_ID; RequestID: SIMCONNECT_DATA_REQUEST_ID;
const szICAO: PChar const szICAO: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_WeatherSetObservation: function( SimConnect_WeatherSetObservation: function(
hSimConnect: THandle; hSimConnect: THandle;
Seconds: Cardinal; Seconds: Cardinal;
const szMETAR: PChar const szMETAR: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_WeatherSetModeServer: function( SimConnect_WeatherSetModeServer: function(
@ -1040,7 +1040,7 @@ var
SimConnect_WeatherSetModeTheme: function( SimConnect_WeatherSetModeTheme: function(
hSimConnect: THandle; hSimConnect: THandle;
const szThemeName: PChar const szThemeName: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_WeatherSetModeGlobal: function( SimConnect_WeatherSetModeGlobal: function(
@ -1104,16 +1104,16 @@ var
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_InsertString: function( SimConnect_InsertString: function(
pDest: PChar; pDest: PAnsiChar;
cbDest: Cardinal; cbDest: Cardinal;
var ppEnd: Pointer; var ppEnd: Pointer;
var pcbStringV: Cardinal; var pcbStringV: Cardinal;
const pSource: PChar const pSource: PAnsiChar
): HRESULT; StdCall; ): HRESULT; StdCall;
SimConnect_MapClientDataNameToID: function( SimConnect_MapClientDataNameToID: function(
hSimConnect: THandle; hSimConnect: THandle;
const szClientDataName: PChar; const szClientDataName: PAnsiChar;
ClientDataID: SIMCONNECT_CLIENT_DATA_ID ClientDataID: SIMCONNECT_CLIENT_DATA_ID
): HRESULT; StdCall; ): HRESULT; StdCall;
@ -1407,7 +1407,7 @@ function InitSimConnectFromLibrary(Name: string): boolean;
begin begin
Result := False; Result := False;
CloseSimConnect; CloseSimConnect;
ScHandle := LoadLibrary(Pchar(Name)); ScHandle := LoadLibrary(PChar(Name));
if ScHandle <> 0 then if ScHandle <> 0 then
begin begin
LoadProcAddresses; LoadProcAddresses;