Jump to content
The simFlight Network Forums

GF-T8 assigned for external lights with PMDG AC


Recommended Posts

Hi All,

 

I have encountered another problem with GF-T8 module assigned for external lights for PMDG aircraft.

 

The scenario is like this:

 

I have assigned external lights via FSUIPC, using key press commands. I have followed the instructions to assign the lights correctly (Pete has also been a big help already) and the actual light switched works correctly, no problems. However, when I load for example the T7 at any location and switch lets say nav light on from my GF-T8, the light goes on, but also all the rest of the switches in the Virtual Cockpit changes as well, in otherwords, the switches toggles to on position.

 

The only solution I have found is that I load the AC, switch any T8 switch and then manually click the switches in the VC back in the original position.

 

Im using FSX, Windows 7, with the latest FSUIPC version installed. I recently deleted the FSUIPC ini file and started everything from scracth, but this problem has followed me already a year or two... I do not have anything set up via Goflight own setup wizard, as this was instructed not to be used together with FSUIPC if the assignments are done via FSUIPC.

 

Any solutions or suggestions where to look?

 

Should I start to look into lua programming to get things work properly or....? At least I thought I will start learning LUA to get the leds working correctly with the GF panels..

Thanks in advance

 

Cheers

Thomas

Link to comment
Share on other sites

I have assigned external lights via FSUIPC, using key press commands. I have followed the instructions to assign the lights correctly (Pete has also been a big help already) and the actual light switched works correctly, no problems. However, when I load for example the T7 at any location and switch lets say nav light on from my GF-T8, the light goes on, but also all the rest of the switches in the Virtual Cockpit changes as well, in otherwords, the switches toggles to on position.

 

The only solution I have found is that I load the AC, switch any T8 switch and then manually click the switches in the VC back in the original position.

 

Im using FSX, Windows 7, with the latest FSUIPC version installed. I recently deleted the FSUIPC ini file and started everything from scracth, but this problem has followed me already a year or two... I do not have anything set up via Goflight own setup wizard, as this was instructed not to be used together with FSUIPC if the assignments are done via FSUIPC.

 

FSUIPC only does what you ask it. I've no idea what operates switches in the PMDG 777, I don't have it, but i'd be very surprised if changing one switch operates every single switch in the whole aircraft. If it does there is something very wrong with the 777!

 

Perhaps you only mean all of the light switches, not all the "rest of the switches in the Virtual cockpit" as you said? If so them it will probably be related to how you've programmed the switches. Do two things

 

1. Enable button logging and also event logging (not axis) in FSUIPC's logging page, operate the switch, then turn the logging options back off. Show me the resulting LOG file.

2. Also show me your FSUIPC4.INI file.

 

Both files are in your FS Modules folder You can paste their contents in a message here.

 

Pete

Link to comment
Share on other sites

Hi Pete,

 

Many thanks for your fast reply, it is highly appreciated. Yes, you are right, I meant that all the light switches goes on, instead of all switches in the VC... Sorry, my mistake. Here are the log file info:

 
 
 222504 LogOptions changed, now 60000000 00000001
   222504 [buttons] now profile-specific:
   222504    0=P174,1,K73,11
   222504    1=P174,2,K85,11
   222926 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   225983 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   229010 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   230554 Button changed: bRef=0, Joy=109, Btn=1, Pressed
   230554 [buttons] 18=P109,1,K84,10
   230554 SendKeyToFS(00020054=[ctl+T], KEYDOWN) ctr=0
   230554 Button changed: bRef=0, Joy=109, Btn=0, Pressed
   230554 [buttons] 20=P109,0,K76,10
   230570 SendKeyToFS(00020054=[ctl+T], KEYUP) ctr=2
   230570 SendKeyToFS(0002004C=[ctl+L], KEYDOWN) ctr=4
   230570 Button changed: bRef=0, Joy=109, Btn=3, Pressed
   230570 [buttons] 24=P109,3,K66,10
   230570 SendKeyToFS(0002004C=[ctl+L], KEYUP) ctr=6
   230570 SendKeyToFS(00020042=[ctl+B], KEYDOWN) ctr=8
   230570 Button changed: bRef=0, Joy=109, Btn=4, Pressed
   230570 [buttons] 26=P109,4,K86,10
   230570 SendKeyToFS(00020042=[ctl+B], KEYUP) ctr=10
   230570 SendKeyToFS(00020056=[ctl+V], KEYDOWN) ctr=12
   230570 Button changed: bRef=0, Joy=109, Btn=5, Pressed
   230570 [buttons] 28=P109,5,K83,10
   230570 SendKeyToFS(00020056=[ctl+V], KEYUP) ctr=14
   230570 SendKeyToFS(00020053=[ctl+S], KEYDOWN) ctr=16
   230570 Button changed: bRef=0, Joy=109, Btn=6, Pressed
   230570 [buttons] 30=P109,6,K87,10
   230570 Sending WM_KEYDOWN, Key=17 (Control) (Scan code 29), Ctr=18
   230570 SendKeyToFS(00020053=[ctl+S], KEYUP) ctr=18
   230570 SendKeyToFS(00020057=[ctl+W], KEYDOWN) ctr=19
   230570 Button changed: bRef=0, Joy=109, Btn=7, Pressed
   230570 [buttons] 32=P109,7,K70,10
   230570 SendKeyToFS(00020057=[ctl+W], KEYUP) ctr=21
   230570 SendKeyToFS(00020046=[ctl+F], KEYDOWN) ctr=23
   230570 Button changed: bRef=0, Joy=109, Btn=1, Pressed
   230570 [buttons] 19=U109,1,K84,10
   230570 Button changed: bRef=0, Joy=109, Btn=0, Pressed
   230570 [buttons] 21=U109,0,K76,10
   230570 Button changed: bRef=0, Joy=109, Btn=3, Pressed
   230570 [buttons] 25=U109,3,K66,10
   230570 Button changed: bRef=0, Joy=109, Btn=4, Pressed
   230570 [buttons] 27=U109,4,K86,10
   230570 Button changed: bRef=0, Joy=109, Btn=5, Pressed
   230570 [buttons] 29=U109,5,K83,10
   230570 Button changed: bRef=0, Joy=109, Btn=6, Pressed
   230570 [buttons] 31=U109,6,K87,10
   230570 Button changed: bRef=0, Joy=109, Btn=7, Pressed
   230570 [buttons] 33=U109,7,K70,10
   230570 JoystickValues PCnum=0, dwCount=1, data[2]={0000006d 000000fb}
   230570 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2
   230570 .. Key not programmed -- passed on to FS
   230585 Sending WM_KEYDOWN, Key=84 (Scan code 20), Ctr=25
   230601 Sending WM_KEYUP, Key=84 (Scan code 20), Ctr=24
   230617 Sending WM_KEYUP, Key=17 (Control) (Scan code 29), Ctr=23
   230617 Sending WM_KEYDOWN, Key=17 (Control) (Scan code 29), Ctr=23
   230632 Sending WM_KEYDOWN, Key=76 (Scan code 38), Ctr=21
   230648 Sending WM_KEYUP, Key=76 (Scan code 38), Ctr=20
   230663 Sending WM_KEYUP, Key=17 (Control) (Scan code 29), Ctr=19
   230663 Sending WM_KEYDOWN, Key=17 (Control) (Scan code 29), Ctr=19
   230679 Sending WM_KEYDOWN, Key=66 (Scan code 48), Ctr=17
   230695 Sending WM_KEYUP, Key=66 (Scan code 48), Ctr=16
   230710 Sending WM_KEYUP, Key=17 (Control) (Scan code 29), Ctr=15
   230710 Sending WM_KEYDOWN, Key=17 (Control) (Scan code 29), Ctr=15
   230726 Sending WM_KEYDOWN, Key=86 (Scan code 47), Ctr=13
   230741 Sending WM_KEYUP, Key=86 (Scan code 47), Ctr=12
   230757 Sending WM_KEYUP, Key=17 (Control) (Scan code 29), Ctr=11
   230757 Sending WM_KEYDOWN, Key=17 (Control) (Scan code 29), Ctr=11
   230773 Sending WM_KEYDOWN, Key=83 (Scan code 31), Ctr=9
   230788 Sending WM_KEYUP, Key=83 (Scan code 31), Ctr=8
   230804 Sending WM_KEYUP, Key=17 (Control) (Scan code 29), Ctr=7
   230804 Sending WM_KEYDOWN, Key=17 (Control) (Scan code 29), Ctr=7
   230819 Sending WM_KEYDOWN, Key=87 (Scan code 17), Ctr=5
   230835 Sending WM_KEYUP, Key=87 (Scan code 17), Ctr=4
   230851 Sending WM_KEYUP, Key=17 (Control) (Scan code 29), Ctr=3
   230851 Sending WM_KEYDOWN, Key=17 (Control) (Scan code 29), Ctr=3
   230866 Sending WM_KEYDOWN, Key=70 (Scan code 33), Ctr=1
   230960 SendKeyToFS(00020046=[ctl+F], KEYUP) ctr=0
   230960 Sending WM_KEYUP, Key=70 (Scan code 33), Ctr=2
   230960 KEYDOWN: VK=84, Waiting=0, Repeat=N, Shifts=2
   230960 .. Key not programmed -- passed on to FS
   230960 KEYUP: VK=84, Waiting=0
   230960 KEYUP: VK=17, Waiting=0
   230960 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2
   230960 .. Key not programmed -- passed on to FS
   230960 KEYUP: VK=76, Waiting=0
   230960 *** EVENT: Cntrl= 83632 (0x000146b0), Param= 0 (0x00000000)  <83632>
   230960 KEYUP: VK=17, Waiting=0
   230960 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2
   230960 .. Key not programmed -- passed on to FS
   230960 KEYUP: VK=66, Waiting=0
   230960 *** EVENT: Cntrl= 69748 (0x00011074), Param= 64 (0x00000040)  <69748>
   230960 KEYUP: VK=17, Waiting=0
   230960 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2
   230960 .. Key not programmed -- passed on to FS
   230960 KEYUP: VK=86, Waiting=0
   230960 *** EVENT: Cntrl= 69754 (0x0001107a), Param= 64 (0x00000040)  <69754>
   230975 Sending WM_KEYUP, Key=17 (Control) (Scan code 29), Ctr=1
   230991 KEYUP: VK=17, Waiting=0
   230991 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2
   230991 .. Key not programmed -- passed on to FS
   230991 KEYDOWN: VK=83, Waiting=0, Repeat=N, Shifts=2
   230991 .. Key not programmed -- passed on to FS
   230991 KEYUP: VK=83, Waiting=0
   230991 KEYUP: VK=17, Waiting=0
   230991 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2
   230991 .. Key not programmed -- passed on to FS
   230991 KEYDOWN: VK=87, Waiting=0, Repeat=N, Shifts=2
   230991 .. Key not programmed -- passed on to FS
   230991 KEYUP: VK=87, Waiting=0
   230991 KEYUP: VK=17, Waiting=0
   230991 KEYDOWN: VK=17, Waiting=0, Repeat=N, Shifts=2
   230991 .. Key not programmed -- passed on to FS
   230991 KEYDOWN: VK=70, Waiting=0, Repeat=N, Shifts=2
   230991 .. Key not programmed -- passed on to FS
   230991 KEYUP: VK=70, Waiting=0
   230991 KEYUP: VK=17, Waiting=0
   230991 *** EVENT: Cntrl= 66059 (0x0001020b), Param= 1 (0x00000001) LANDING_LIGHTS_ON
   230991 *** EVENT: Cntrl= 66059 (0x0001020b), Param= 1 (0x00000001) LANDING_LIGHTS_ON
   230991 *** EVENT: Cntrl= 66059 (0x0001020b), Param= 1 (0x00000001) LANDING_LIGHTS_ON
   230991 *** EVENT: Cntrl= 66376 (0x00010348), Param= 1 (0x00000001) TOGGLE_LOGO_LIGHTS
   232052 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   235094 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   238214 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   241271 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   244376 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   247496 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   250616 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   253673 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   256700 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   259836 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   262940 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   266060 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   269102 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   272222 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET
   275264 *** EVENT: Cntrl= 65709 (0x000100ad), Param= 71200 (0x00011620) NAV2_RADIO_SET

   316199 **** No SimConnect events or states being received! Re-connecting now ... ****

 

And here is the ini file content:

 

[General]
UpdatedByVersion=4929
History=TQ4A8LYJZ6Q04T0HUOH2E
InitDelayDevicesToo=No
NewInterceptTextMenu=No
UseSystemTime=No
UseMidMouseBtn=Yes
MouseWheelMove=No
MouseWheelTrim=No
MouseWheelTrimSpeed=1
JoystickTimeout=20
PollGFTQ6=Yes
BlankDisplays=No
FixControlAccel=No
FixMachSpeedBug=No
DeleteVehiclesForAES=Yes
AutoScanDevices=Yes
VisibilityOptions=No
OneCloudLayer=No
CloudTurbulence=No
CloudIcing=No
GenerateCirrus=No
SuppressCloudTurbulence=No
MaxIce=-4
MinIce=-4
UpperWindGusts=No
SuppressWindTurbulence=No
SuppressWindVariance=No
WindTurbulence=No
TurbulenceRate=1.0,5.0
TurbulenceDivisor=20,20,40,40
SuppressAllGusts=No
MaxSurfaceWind=0
WindLimitLevel=200
WindDiscardLevel=400
WindAjustAltitude=No
WindAjustAltitudeBy=2000
SmoothBySimTime=No
WindSmoothing=No
WindSmoothness=2
WindSmoothAirborneOnly=Yes
PressureSmoothness=0
TemperatureSmoothness=0
DisconnTrimForAP=No
ZeroElevForAPAlt=No
ThrottleSyncAll=No
WhiteMessages=No
ShowPMcontrols=No
SpoilerIncrement=512
MagicBattery=No
RudderSpikeRemoval=No
ElevatorSpikeRemoval=No
AileronSpikeRemoval=No
ReversedElevatorTrim=No
ClockSync=No
ClockSyncMins=5
ClearWeatherDynamics=No
OwnWeatherChanges=No
TimeForSelect=4
LoadFlightMenu=No
LoadPlanMenu=No
PauseAfterCrash=No
BrakeReleaseThreshold=75
SaveDataWithFlights=No
ZapSound=firework
ShortAircraftNameOk=Substring
UseProfiles=Yes
EnableMouseLook=No
DelayedMouseLookZoom=No
AxesWrongRange=No
TCASid=Flight
TCASrange=40
AxisCalibration=No
DirectAxesToCalibs=No
ShowMultilineWindow=Yes
SuppressSingleline=No
SuppressMultilineFS=No
AxisIntercepts=No
DontResetAxes=No
InitDelay=0
GetNearestAirports=Yes
OOMcheck=Yes
WeatherReadFactor=2
WeatherRewriteSeconds=1
CustomWeatherModify=No
SimConnectStallTime=1
LuaRerunDelay=66
Console=No
ConsoleWindow=200,200,877,559
FSVersionUsed="Microsoft Flight Simulator X",10.0.61637.0
SimConnectUsed=10.0.61259.0
 
[JoyNames]
AutoAssignLetters=No
0=GoFlight GF-TQ6 Throttle System
0.GUID={03861EA0-B743-11E3-8001-444553540000}
1=Saitek Pro Flight Yoke
1.GUID={41CB8A50-AF57-11E2-8002-444553540000}
2=Saitek Pro Flight Rudder Pedals
2.GUID={41CB8A50-AF57-11E2-8001-444553540000}
 
[buttons]
ButtonRepeat=20,10
1=P1,0,K84,11
2=P174,10,K65,10
3=U174,10,K65,10
4=P174,9,K90,10
5=U174,9,K90,10
6=P174,1,K192,11
7=P174,2,K76,11
8=P174,3,K80,11
9=P174,4,K74,11
10=P174,5,K72,11
11=P174,6,K79,11
12=P174,7,K76,9
13=P174,14,K89,11
14=U174,14,K89,11
15=P174,13,K84,11
16=U174,13,K84,11
17=P174,0,C65752,0
18=P109,1,K84,10
19=U109,1,K84,10
20=P109,0,K76,10
21=U109,0,K76,10
22=P109,2,K88,10
23=U109,2,K88,10
24=P109,3,K66,10
25=U109,3,K66,10
26=P109,4,K86,10
27=U109,4,K86,10
28=P109,5,K83,10
29=U109,5,K83,10
30=P109,6,K87,10
31=U109,6,K87,10
32=P109,7,K70,10
33=U109,7,K70,10
 
[MacroFiles]
1=767
2=B767 Fuel contro
3=B767 rwy lights
4=B767 Taxi light
5=iFly737
6=leveld767
7=MADDOG2
8=PMDG777
 
[LuaFiles]
1=ipcReady
2=linda
 
[AutoSave]
Next=1
Interval=60
Files=10
SaveOnGround=No
AutoSaveEnabled=No
 
[GPSout]
GPSoutEnabled=No
 
[GPSout2]
GPSoutEnabled=No
 
[WideServer]
WideFSenabled=Yes
 
[sounds]
Path=D:\FSX\Sound\
Device1=Primary Sound Driver
Device2=Speakers (Realtek High Definition Audio)
Device3=Realtek Digital Output(Optical) (Realtek High Definition Audio)
Device4=Realtek Digital Output (Realtek High Definition Audio)
 
[Axes]
RangeRepeatRate=10
0=0Z,256,D,9,0,0,0
1=0U,256,D,10,0,0,0
2=1X,256,D,1,0,0,0
3=1Y,256,D,2,0,0,0
4=2X,256,D,7,0,0,0
5=2Y,256,D,8,0,0,0
6=2R,256,D,3,0,0,0
 
[JoystickCalibration]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Aileron=-16380,-512,512,16380
Elevator=-16380,-512,512,16380
Rudder=-16380,-512,512,16380
LeftBrake=-16380,16380/16
RightBrake=-16380,16380/16
 
[VRInsight]
1=com3
 
[Window.LUA display]
Docked=7351, 2828, 3535, 753
 
[Profile.777]
1=PMDG 777-2ZGLR SemAir (Fictional)
2=PMDG 777-FHT SemAir
 
[buttons.777]
0=P174,1,K73,11
1=P174,2,K85,11
 
[Profile.MD11]
1=Semair MD-11F PW4460 Engines
 
[buttons.MD11]
0=P174,1,K73,11
2=P174,2,K79,11
3=P174,3,K85,11
4=P174,4,K89,11
5=R0,2,C65971,0
6=U0,2,C65972,0
7=R0,1,C65976,0
8=U0,1,C65977,0
9=R0,3,C65966,0
10=U0,3,C65967,0
11=P174,14,C66460,0
12=P174,13,C66458,0
 
[Axes.MD11]
0=0Y,256,D,9,0,0,0
1=0Z,256,D,10,0,0,0
2=0U,256,D,11,0,0,0
3=1X,256,D,1,0,0,0
4=1Y,256,D,2,0,0,0
5=2X,256,D,7,0,0,0
6=2Y,256,D,8,0,0,0
7=2R,256,D,3,0,0,0
RangeRepeatRate=10
 
[Axes.777]
RangeRepeatRate=10
0=0Z,256,D,9,0,0,0
1=0U,256,D,10,0,0,0
2=1X,256,D,1,0,0,0
3=1Y,256,D,2,0,0,0
4=2X,256,D,7,0,0,0
5=2Y,256,D,8,0,0,0
6=2R,256,D,3,0,0,0
[Monitor]
Display=1
 
I have noticed that when I end the session (not quitting fsx) and fly again, the switches works perfectly from the beginning.
 
Im sure im doing something wrong, just dont know what. I have started to search info about the lua programming but I do not feel confident yet to start fiddling with it.
I hope im not missing something obvious as I do not want to overload you in anyway with nonsense problems.
 
Thanks in advance
 
Cheers

Thomas
Link to comment
Share on other sites

Many thanks for your fast reply, it is highly appreciated. Yes, you are right, I meant that all the light switches goes on, instead of all switches in the VC... Sorry, my mistake. Here are the log file info:

 

Er ... Where is the light switch operated? You seem to have just assigned buttons to loads of different keystrokes. I don't know what those are assigned to -- not in FSUIPC for sure.

 

You've made the log impossible to resolve by pressing loads of buttons or switches and sending lots of keypresses! Surely all you should do for this test is operate just the one toggle switch?

 

I see nothing there but standard FS controls and assorted key presses. Why do you think FSUIPC is having anything to do with what you are seeing?

 

Earlier you said

 

 I have followed the instructions to assign the lights correctly (Pete has also been a big help already) 

 

But I see nothing there which I would have helped you with.

 

Pete

Link to comment
Share on other sites

Good Morning Pete,

 

That is exactly what happens, when I operated my taxi light switch. For example, I have assigned that taxi light switch to button press ctrl+x and programmed it via FSUIPC for the GF-T8. After initial loading of the aircraft, when I turn any of the light switches programmed in my GF-T8, the above is just what happens. After that the switch works correctly.

 

Im sorry that the information was not enough, but I did as you asked me to do, started the event & button log, operated the switch one time and sent you the information. Obviously something is very wrong if it send all that button presses even only one switch is operated.

 

You have helped me earlier, that was in another post where I had the problems understanding the logic programming the buttons. See link below:

http://forum.simflight.com/topic/76235-fsuipc-4928-strange-behaviour-most-likely-a-conflict/

 

I can try to do this logging thing again, however, might take a day or two. In the meantime, I would appreciate any tips.

Thanks Pete

Cheers

 

Thomas

Link to comment
Share on other sites

That is exactly what happens, when I operated my taxi light switch. For example, I have assigned that taxi light switch to button press ctrl+x and programmed it via FSUIPC for the GF-T8. After initial loading of the aircraft, when I turn any of the light switches programmed in my GF-T8, the above is just what happens. After that the switch works correctly.

 

Okay. The problem was I didn't know that (a) you only operated one switch, and (b) which switch was assigned to the light you mentioned -- after all key presses aren't normally used.

 

This line:

 

   230570 JoystickValues PCnum=0, dwCount=1, data[2]={0000006d 000000fb}

 

shows that on the T8 you do already have the 7 other switches in the ON position. (fb = 11111011, each 1 is a switch in the "ON" position.

 

What happens when there's a change in the switches, any one of them on the unit, is that the GFDev driver from GoFlight sends the state of all 8 switches. Obviously you left them all in the 'On" position (upwards). If you left your lights all off they should surely have all been left in the Off (downward) position?

 

 
You have helped me earlier, that was in another post where I had the problems understanding the logic programming the buttons. See link below:

 

 

 

Ah, sorry. I thought you meant I'd helped you programming the light switches -- there is an offset (0D0C) which has bits to switch on or off every one of the 10 possible lights on default aircraft (and most add-ons). Using that you can actually program distinct On and Off actions. You are probably using toggle controls which obviously don't suit latching switches.

 

Aren't there much better ways to operate PMDG aircraft switches rather than horrible keypresses? Have you checked the User Contributions sub-forum for your aircraft, see what others do?

 

Pete

Link to comment
Share on other sites

Hi Pete,

Aha, I see. I did not realize that. This might be the answer to the problem. Shall check it, I did not realize GFDev logic that it then sends the state of all switches. Yes, you are correct, Im using GF-T8 switches to control PMDG777 external lights, which some are toggle switches and some are push buttons in the overhead, but so far it has worked well, other than the startup problem i posted above - which might now be solved - thanks to you Pete.

 

I have tried multiple searches in relation to the light settings to get most out of it, but have been unable to find an "easy" and straight forward solution. Yes, I know there is Goflight PMDG Interface available, but I have not tried it yet as I always thought that I should be programming everything via FSUIPC in order to avoid any conflicts.

 

Btw, regarding the lua, have I understood correctly, if I write a lua script for the T7 external lights and save it in the module folder (for example PMDG777lights.lua), does the system run it automatically or do i need to assign some keypress or button to run the script? Might be a completely stupid question, but I have read so many documents and forum posts that I find the amount of information overwhelming....

 

Most likely I would need help with the script, but I try to start at least myself in order to learn something... :)

 

Thanks again Pete for your assistance

Cheers

Thomas

Link to comment
Share on other sites

I have tried multiple searches in relation to the light settings to get most out of it, but have been unable to find an "easy" and straight forward solution. Yes, I know there is Goflight PMDG Interface available, but I have not tried it yet as I always thought that I should be programming everything via FSUIPC in order to avoid any conflicts.

 

But my point was, are you sure the aircraft does not respond to the standard FSX light controls, that you have to use keyboard assignments? Where are those keys assigned -- in FS or in PMDG options?

 

 

Btw, regarding the lua, have I understood correctly, if I write a lua script for the T7 external lights and save it in the module folder (for example PMDG777lights.lua), does the system run it automatically or do i need to assign some keypress or button to run the script? Might be a completely stupid question, but I have read so many documents and forum posts that I find the amount of information overwhelming....

 

What 'lua' is this? I never mentioned needing a Lua plug-in, did I?

 

Anyway, if you going to be experimenting with plug-ins for some reason then, yes, whilst developing and testing them it would be best to load them by assigning to a key or button. but when working you simply need to include the "Lua <name>" call in an [Auto.<profile>] section for the relevant profile. The only Lua plug-in loaded automatically without such steps is "ipcReady.lua" which is run once when FS is ready to fly.

 

Of course if you are only using a Lua plug-in to do something when you operate a switch or press a button then you simply assign it to that switch or button. The automatic running is really for continuously running plug-ins doing clever things in the background, or for specific initialisations automatically upon loading an aircraft.

 

If you merely want to see if the offset 0D0C works with your aircraft, enter it as the offset in the Monitor facility (right-hand side of Logging tab) as type "U16" and select "display" or similar below so it shows on screen. See if it changes when switching lights If 0D0C does work then you can assign switches to the Offset Word SetBits and Offset Word ClearBits controls to turn lights on and off. This is what I meant when I mentioned 0D0C before.

 

Pete

Link to comment
Share on other sites

Hi Pete,

 

The keys are programmed via PMDG FMC option within the sim, no controls are assigned in fsx itself, as Im only using FSUIPC for all assignments. If I recall correctly, I tried to somepoint use the lights via normal fs controls, without any succes, but those were the PMDG747 & MD11, so its some time ago....

 

Correct, you did not mention that I would need a lua plug-in, I was just asking additional question as Im thinking taking this a bit further. What Im trying to achieve with lua at this point, is that if I have lets say the taxi light on, the led on the GF-T8 would be on (green) as well.

 

Im sure I dont have the knowledge at the moment to even understand what kind of stuff im able achieve with different lua's but this would be a start, as Im building my home cockpit panel after a panel...

 

Cheerio

Thomas

Link to comment
Share on other sites

The keys are programmed via PMDG FMC option within the sim, no controls are assigned in fsx itself, as Im only using FSUIPC for all assignments.

 

I wasn't referring to assignment of buttons/switches. Just where the keypresses were assigned. FS has default keypresses as well.

 

 If I recall correctly, I tried to somepoint use the lights via normal fs controls, without any succes, but those were the PMDG747 & MD11, so its some time ago....

 

There are, I believe, assignable controls implermented for virtually everything in the 737NGX though. Take a look towards the end of the file "PMDG_NGX_SDK.h" in your PMDG 737NGX SDK older. As far as I recall there are numerical commands there for everything in the cockpit, and I added support in FSUIPC for assigning to "custom controls" by number.

 

What Im trying to achieve with lua at this point, is that if I have lets say the taxi light on, the led on the GF-T8 would be on (green) as well.

 

Ah, in that case you'll also need to refer to the document "Offset Mapping for PMDG 737NGX.pdf", installed for you with FSUIPC. You'll find all the light switch states at offsets 64F4 to 6503, along with the other switches in that part of the overhead (Starters, Ignition and APU).

 

Regards

Pete

Link to comment
Share on other sites

Hi Pete,

 

Thanks for pointing me to the right direction, at least I can start look into this.... Do you have any idea what would be the situation with the PMDG 777/747/MD-11?

Would I be able to make the GF-T8 leds work accordingly using the 0D0C offset´s? Or have I totally misunderstood the logic? (could be as well :mrgreen:  )

 

I need to do some more reading and then start experimenting. I quess I can always ask your support in this forum..

 

Many thanks so far and wish you a nice weekend

 

Cheers

 

Thomas

Link to comment
Share on other sites

Thanks for pointing me to the right direction, at least I can start look into this.... Do you have any idea what would be the situation with the PMDG 777/747/MD-11?

Would I be able to make the GF-T8 leds work accordingly using the 0D0C offset´s?

 

No, I don't know. I don't use the PMDG aircraft. That is why I suggested that you monitor 0D0C to see if it changed when you operated the lights!

 

You should find it easy enough to use the numerical controls for all of the 737NGX switches though -- see that document provided by PMDG I referred you to.

 

Pete

Link to comment
Share on other sites

Hi Pete,

 

I´ve started writing some basic scripts using lua plugins and I was pleased to see that the test I did, actually worked.

 

However, now I would like to move on to make the leds work correctly for separate lights under one offset address. This is the case:

 

my GF-T8 are programmed for the external lights, they work fine. For example, the third switch is assigned to taxi light. Now I would like to make the 3rd led to light up when the switch is turned to on and clear the light when its turned to off. However, I have not able to found a solution how to write the script correctly. This is what I have now and I know it does not work because there are missing the info regarding the bits for the taxi light:

 

function Taxi(offset, value)
    if value == 1 then
        gfd.SetLight(GFT8, 0, 2)
    else
        gfd.ClearLight(GFT8, 0, 2)
    end
end
event.offset("0D0C", "SW", "Taxi") should this be something like ("x0D0C",  "8", "SW", "Taxi")

 

where the "8" would be the Bit 3 value?

 

I would like to also say that I have spent hours and hours reading through all these manuals, but it is HUGE amount of information that I feel somewhat overwhelming and Im still learning. If you could point me out to the right direction, im sure I can take it from there. I can manage to make a led go on and off accordingly, the problem is the 0D0C address which has multiple functions inside and im unsure about how to use the bits...

 

Thanks in advance

 

Cheers

Thomas

Link to comment
Share on other sites

 I can manage to make a led go on and off accordingly, the problem is the 0D0C address which has multiple functions inside and im unsure about how to use the bits...

 

The event.offset function does not have any "bit testing" capability. It will give you the event whenever ANY of the bits in your UW (Unsigned Word) change.  It might be an idea for me to add such a facility -- by a 'mask' value so one or more bits can be tested -- but it doesn't at present. (Maybe I'll add that in future).

 

So what you have to do is test the relevant bit yourself inside the called function.  For bit 3 you are right, it has value 8, so you test for bit 3 like this:

if logic.And(val,8) ~= 0 then
     gfd.SetLight(GFT8, 0, 2)
else
    gfd.ClearLight(GFT8, 0, 2)
end

Now, because your function will be called for ALL changes in offset 0DoC, you really should just call the function "Lights" (say), and test each bit in turn, setting or clearing its light as appropriate. i.e. a sequence of 

if logic.And(val, <bitvalue>) ~= 0 then
     gfd.SetLight(GFT8, 0, <LED number>)
else
    gfd.ClearLight(GFT8, 0, <LED number>)
end
parts, all in the one function.
 
It might look cumbersome. I'm afraid Lua was not provided with any logical functions like AND, OR, and SHIFT, so FSUIPC provides them in the logic library. But whilst it looks cumbersome, it is efficient -- don't forget it is only called when one of the lights changes, so it isn't doing anything most of the time. And its compiled form internally is small.
 
Regards
Pete
Link to comment
Share on other sites

Hi Pete,
 

Awesome fast reply! Thanks a lot!

 

To get things straigh, should my script look like this:

 

function Taxi(offset, value)
   if logic.And(val,8) ~= 0 then
        gfd.SetLight(GFT8, 0, 2)
    else
        gfd.ClearLight(GFT8, 0, 2)
    end
end
event.offset("0D0C", "SW", "Taxi")

 

btw. I thought 0D0C would be SW as the FSInterrogator says it is S16? (im probably completely wrong...) :mrgreen:

 

I know im thick, but im getting there :oops:

 

Cheers

 

Thomas

Link to comment
Share on other sites

To get things straigh, should my script look like this:

 

function Taxi(offset, value)

   if logic.And(val, :cool: ~= 0 then

        gfd.SetLight(GFT8, 0, 2)

    else

        gfd.ClearLight(GFT8, 0, 2)

    end

end

event.offset("0D0C", "SW", "Taxi")

 

Yes, but if you are adding the other lights, as I suggested, best not to call it "Taxi2 but just "Lights".

 

btw. I thought 0D0C would be SW as the FSInterrogator says it is S16? (im probably completely wrong...) 

 

No, whoever did the data file for FSInterogate got it wrong. Only values treated as signed numbers have signs.  This one is just a collection of bits.

 

But it actually makes no difference in this case, for two reasons:

1. The top bit (sign bit) is not used, always zero

2. You are not treating the value as a number in any case, so whether it is signed or not is irrelevant.

 

The only difference between signed and unsigned numbers is that, when treated as a number, the range of values is different. 

 

Signed Word  -32768 to +32767

Unsigned word 0 to 65535

 

Signed Byte -128 to +127

Unsigned Byte 0 to 255

 

See? It's all in the interpretation, not the way it actually looks.

 

Pete

Link to comment
Share on other sites

Excellent, thanks Pete!

 

I think i got it! :rolleyes:

 

As you suggested I could do it all in one, so something like this: (1st switch for landing lights, 2nd switch for logo lts and 3rd for taxi light)

 

function Lights(offset, value)
   if logic.And(val, 4) ~= 0 then
        gfd.SetLight(GFT8, 0, 0)
    else
        gfd.ClearLight(GFT8, 0, 0)
    end

   if logic.And(val, 256) ~= 0 then
        gfd.SetLight(GFT8, 0, 1)
    else
        gfd.ClearLight(GFT8, 0, 1)
    end

   if logic.And(val, 8) ~= 0 then
        gfd.SetLight(GFT8, 0, 2)
    else
        gfd.ClearLight(GFT8, 0, 2)
    end

end
event.offset("0D0C", "UW", "Lights")

 

Cheers

Thomas

Link to comment
Share on other sites

Many thanks Pete!

 

I feel like I have climbed over a mountain with this... (if it actually works... ) ;-)

I never thought I would need to learn programming, I have tried to avoid it as much as I can... hahahahaaa.

 

Who ever reads this post and is thinking "how the hell will I learn any of this lua scripting thing"?? I can say that you really can, if you search and search and search and read and read and read... If I can learn this (even it is only these bloody few leds) I bet you can too! Dont give up!!!

 

Cheers

 

Thomas

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.