-
pero | JeeHell EXT PWR by GSX
Just want to inform you, that I created a new freeware LUA Script.
This LUA Script is compatible with FSX and P3D and works with FSDT Ground Services X (GSX) and JeeHell FMGS. If you don’t use both of them this script is useless for you.
The Script detects if GSX is in BOARDING, DEBOARDING, CATERING or REFUELING process (must be started by user) and set the „EXT PWR“ LED in the overhead to „AVAIL“. Pressing the Button force the „EXT PWR“ to „ON“.
If the GSX Pushback is requested, the script disconnects „EXT PWR“ (make sure APU or Engines are running before ELEC EXT PWR is disconnected).
Please find download and install instructions on my website:
https://aviation.pero-online.de/wordpress/?page_id=1937
-
Re: pero | JeeHell EXT PWR by GSX
Hi Peter !
Thank You for your hard Work !
I will try it next Time, but my Beamers are on Service next Weeks.
Thank you very much
Karl
-
Re: pero | JeeHell EXT PWR by GSX
Sure. I am very happy about some feedback. Yesterday I did an online flight with the script. Works perfectly...
-
Re: pero | JeeHell EXT PWR by GSX
Quote:
Originally Posted by
capt_pero
Just want to inform you, that I created a new freeware LUA Script.
This LUA Script is compatible with FSX and P3D and works with FSDT Ground Services X (GSX) and JeeHell FMGS. If you don’t use both of them this script is useless for you.
The Script detects if GSX is in BOARDING, DEBOARDING, CATERING or REFUELING process (must be started by user) and set the „EXT PWR“ LED in the overhead to „AVAIL“. Pressing the Button force the „EXT PWR“ to „ON“.
If the GSX Pushback is requested, the script disconnects „EXT PWR“ (make sure APU or Engines are running before ELEC EXT PWR is disconnected).
Please find download and install instructions on my website:
https://aviation.pero-online.de/wordpress/?page_id=1937
Thanks for this - I gave up on GSX after there was no further development to allow for remote trigger action, and/or keyboard presses.
The visual immersion is destroyed when you have to use the P3D menu.
-
Re: pero | JeeHell EXT PWR by GSX
Quote:
Originally Posted by
capt_pero
Sure. I am very happy about some feedback. Yesterday I did an online flight with the script. Works perfectly...
Thanks for the script worked great for me
To make it even better is it possible to trigger a sound eg (external power plugged in) and also
(External power out) this is what the captain here if it is possible
Thanks again
Mike
-
Re: pero | JeeHell EXT PWR by GSX
Further to OmniAtlas post it is a shame that remote control of GSX is not forthcoming from FSDT and AES is not compatible with P3D and Windows 10. I agree it is rather silly to have messages in the windscreen for home cockpit drivers. I don't have the technical know how to develop an interface but it would be nice if someone with the expertise could produce an interface. I seem to remember that the AES interface was developed independently.
of course purists could point out that pilots in a cockpit can't see a lot of the stuff going on around the aircraft without opening up an outside view!
Barry
www.a320sim.com
-
Re: pero | JeeHell EXT PWR by GSX
Barry I got tired of waiting for a solution so I just assigned shift p to a joystick button in FSUIPC and used an unused pedestal push button (such as the door lock switch or vide output button)
-
Re: pero | JeeHell EXT PWR by GSX
Why don't you use the ADIRS buttons to set GSX? I have "ENT" to open the GSX Dialog and "0-9" for the dialog. Very easy.
-
1 Attachment(s)
Re: pero | JeeHell EXT PWR by GSX
I have buttons programmed to select the menus, that us not the issue. I just don't like the messages appearing in my scenery. With AES I used a services screen to display the messages
http://www.mycockpit.org/forums/atta...id=12642&stc=1
You can just see the screen on the left of the cockpit like a tablet which is where I also handle vpilot, active sky, charts etc.
-
Preview: Door handling
I did some tinkering on the weekend.
The script now opens / closes the doors to match GSX Action:
- BOARDING ACTIVE = FWD L, AFT L and CARGO (both) open
- BOARDING COMPLETED = FWD L, AFT L and CARGO (both) close
- DEBOARDING ACTIVE = FWD L, AFT L and CARGO (both) open
- DEPARTURE ACTIVE = ALL DOORS close
- CATERING ACTIVE = SERVICE DOORS (both) open
- CATERING COMPLETED = SERVICE DOORS (both) close *
* Make sure that both SERVICE DOORS have no OPEN / CLOSE Check
=> GSX> Customize Aircraft> Service 1 & 2> "Door without open / close Checks"
I will test it a bit and release this version soon.
-
Re: Preview: Door handling
Version 2 is out now. Very comfortable if doors are handling by "someone else".
https://aviation.pero-online.de/wordpress/?page_id=1937
-
GSX handling by the LUA Script
Version 3 will include GSX handling (done by LUA keypress). So if the engines are both off, parking brake set and aircraft on ground the script will call boarding/deboarding. As there is no GSX API it needs to work with keypresses by the LUA Script.
Here is a short video:
https://youtu.be/NYggPZFWobU
-
Re: GSX handling by the LUA Script
-
Version 4 out now!
With version 4, the script can now also serve the default jetways. If the plane is parked and the FWD L door is opened or closed, the script will toggle the default jetway. This of course has a few limitations, since you can not query the status of the standard jetways and the script does not work with the SODE Jetways.
But still cool, if you arrive at EDDS Professional and the jetway moves. :O)
Please do not forget to check GSX is still on the key assignment CTRL + SHIFT + W. If not, you can customize the key combination in my LUA-Script.
Download:
https://aviation.pero-online.de/wordpress/?page_id=1937
-
Version 5 out now!
I did two bugfixes regarding the keypresses that causes info messages in the sim. Please find version 5 here:
https://aviation.pero-online.de/wordpress/?page_id=1937
-
Re: Version 5 out now!
Hi Peter,
I did a complete new installation for P3D v4.3 and since that I cant get your script working again ! I placed it in the modules folder, created the ipcReady.lua with this one entry. My GSX reacts on shift+ctrl+w. so I did everything like in v4.2.
Any idea what could be wrong ???
thx anf best regards
Michael
-
Re: pero | JeeHell EXT PWR by GSX
Do you see the message (Step 4 of my installation guide)?
https://aviation.pero-online.de/wordpress/?page_id=1937
If yes please logging=0 to logging=1 and restart the sim (within my .lua script).
-
Re: pero | JeeHell EXT PWR by GSX
Quote:
Originally Posted by
capt_pero
Hi Peter,
thanks for your reply. No, I didnt see this short message. therefore I reinstalled GSX for the second time now and downloaded your v.5 as well and now it is working !!! I have no clue why it wasnt before as I did nothing special. Anyway, it is all ok now. thanks and best regards Michael
-
Features in next Version 6
As GSX v2 is out now and Rainer Kunst agreed using his idea for "Intelligent Cabin Announcements (ICA)" I am happy that the next version will include:
- For GSX v2 Users: Ext Power Handling will be dependent on Gate Power by the Jetway (if no SODE jetway it works like before)
- Integration of "Intelligent Cabin Announcements (ICA)" which plays sounds of the Cabin Crew for Safety, Climb, Approach, e.g. To use this feature you need files of a FS-Passengers Crew Pack (which can be found freeware on the internet). For sure ICA can be disabled. The sounds are a little modified for better fitting into the JeeHell operations
This gives a very nice flight experience. Thanks to Rainer Kunst (www.simmershome.de)
-
JeeHell EXT PWR by GSX - Version 6 available!
New to v6:
- [FEATURE] Integrated Simmershome Intelligent Cabin Announcements v2
- [FEATURE] Added GSX v2 Passenger Boarding
- [CHANGED] Using GSX v2 the Ground Power will be connected with the jetway
Click here for more details.
-
Re: JeeHell EXT PWR by GSX - Version 6 available!
[QUOTE=capt_pero;172017]New to v6:
- [FEATURE] Integrated Simmershome Intelligent Cabin Announcements v2
- [FEATURE] Added GSX v2 Passenger Boarding
- [CHANGED] Using GSX v2 the Ground Power will be connected with the jetway
please would you check my lua file please i cannot here any sounds even thou i can see in text that they are being triggered
i downloaded the german sound and put them in the correct folder
i looked at fsuipc for number of sound card number 4
please see attached
Thanks for lua
Mike
---------------------------------------------------------------------------
--| pero | JeeHell Ext PWR by GSX |--
--| Version 6 - 17.11.2018 |--
---------------------------------------------------------------------------
--| This LUA Script is designed to use with FSDT GSX and JeeHell FMGS. |--
--| If you don't use both this script is useless. |--
--| |--
--| Developer: Peter Rosendahl (capt_pero@web.de) |--
--| FREEWARE. Private use ONLY! |--
--| |--
--| GSX States: |--
--| 1 = service can be called |--
--| 2 = service is not available |--
--| 3 = services has been bypassed |--
--| 4 = service has been requested |--
--| 5 = service is being performed |--
--| 6 = service has been completed |--
--| |--
---------------------------------------------------------------------------
--| ICA - Intelligent Cabin Announcements v2.0 is integrated |--
---------------------------------------------------------------------------
--| |--
--| Copyright (C) 2017 by simmershome. www.simmershome.de. |--
--| |--
--| This program comes with ABSOLUTELY NO WARRANTY. |--
--| Commercial use strongly vorbidden! Licence see Manual. |--
--| This script manage cabin announcements during the flight. |--
--| It works with all MS based Simulators x32 and x64 |--
--| and FSUPC 4.644 or above |--
---------------------------------------------------------------------------
-- Set this to 1 enables logging of the script. For debugging purpose only
local logging = 0
-- Set Sound Device (default: soundDevice = 1)
local soundDevice = 4
------------------------------------------------
------ Door and Ext. Power Management by GSX
------------------------------------------------
-- Set this to 0 disables LUA Status Messages at the running Sim for this script
local showStatusMessages = 1
-- Set this to 0 to disable the door handling by this script
local doorHandling = 1
-- Set the pause in milliseconds until the Ext Power will be connected once the condition is reached
local waitUntilExtPWRconnect = 3000
-- Sets the Interval in milliseconds to check GSX state (Minimum = 100)
local pollInterval = 1000
------------------------------------------------
------ GSX Automation
------------------------------------------------
-- Set this to 1 if you want to enable GSX handling by this script
local GSXhandling = 1
-- Set this to 0 if you want to disable the handling of the Default Jetways (state can not be recognized)
local defaultJetwayToggle = 1
-- Set this to 1 if you want to have GSX Boarding And Catering. 0 is Boarding only.
local GSXboardingAndCatering = 0
-- Set the minimum and maximum values how many passengers you want to board by GSX v2
local GSXv2_handling = 1
local GSXv2_MinPax = 23
local GSXv2_MaxPax = 61
-- Enter KeyCode of the Keyboard Combination for GSX Dialog (Default: SHIFT+CTRL+W)
-- (Please read FSUIPC Documentation "FSUIPC for Advanced Users.pdf" page 22 & 30 for more details)
local GSXdialogKeyShift = 3 -- SHIFT + CTRL
local GSXdialogKeyCode = 87 -- W
------------------------------------------------
------ Simmershome Cabin Announcement Integration
------------------------------------------------
-- Set this variable to 1 if you want to have SH Cabin Announcements started
local SH_ICAinUse = 1
-- Set the altitude to play the climb / descent altitude
local SH_ICAclimbDescentAlt = 7000
-- Set the path to the Sound files for ICA (!!! Must end with \\)
local SH_ICAbasePath = "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\\SH_ICAsound\\"
--------------------------------------------------------------------------------------------------------
-- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! --
--------------------------------------------------------------------------------------------------------
-- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! --
--------------------------------------------------------------------------------------------------------
-- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! --
--------------------------------------------------------------------------------------------------------
------------------------------------------------
------ Door and Ext. Power Management by GSX
------------------------------------------------
-- Local variables (please do NOT change)
local DEBOARDING_STATE=0
local BOARDING_STATE=0
local DEPARTURE_STATE = 0
local CATERING_STATE = 0
local REFUELING_STATE = 0
local GSX_JETWAY_POWER = 0
local extPWR = 0
local SH_ICAwelcome = -1
local SH_ICAsafety = 0
local SH_ICAclimb = 0
local SH_ICAcruise = 0
local SH_ICAdescent = 0
local SH_ICAfinal = 0
local SH_ICAafterLand = 0
local SH_ICAatGate = 0
local SH_ICAunboarding = 0
-- Functions
function GSX_DEBOARDING_STATE(varname, value)
DEBOARDING_STATE = value
checkState()
end
function GSX_BOARDING_STATE(varname, value)
BOARDING_STATE = value
checkState()
end
function GSX_CATERING_STATE(varname, value)
CATERING_STATE = value
checkState()
end
function GSX_REFUELING_STATE(varname, value)
REFUELING_STATE = value
checkState()
end
function GSX_DEPARTURE_STATE(varname, value)
DEPARTURE_STATE = value
checkState()
end
function GSXv2_JETWAY_POWER_STATE(varname, value)
GSX_JETWAY_POWER = value
if (GSX_JETWAY_POWER==5) then
extPWR_Avail()
end
if (GSX_JETWAY_POWER==4 and extPWR==1) then
extPWR_Off()
end
end
function checkState()
if (CATERING_STATE == 4) then
ipc.sleep(120000)
doorAction(8,1)
end
if (DEBOARDING_STATE == 6) then
onAir=0
end
if (DEPARTURE_STATE >= 5) then
doorAction(2,0)
ipc.sleep(5000)
doorAction(1,0)
ipc.sleep(3000)
doorAction(4,0)
ipc.sleep(7000)
doorAction(8,0)
if (GSXv2_handling == 0 or GSX_JETWAY_POWER==2) then
extPWR_Off()
end
end
if (BOARDING_STATE == 6) then
ipc.sleep(8000)
doorAction(2,0)
ipc.sleep(5000)
doorAction(1,0)
ipc.sleep(3000)
doorAction(4,0)
if (SH_ICAwelcome==-1) then
SH_ICAwelcome = 0
SH_ICAsafety = 0
SH_ICAclimb = 0
SH_ICAcruise = 0
SH_ICAdescent = 0
SH_ICAfinal = 0
SH_ICAafterLand = 0
SH_ICAatGate = 0
SH_ICAunboarding = 0
end
end
if (CATERING_STATE == 6) then
doorAction(8,0)
end
if ((DEBOARDING_STATE > 2) or (BOARDING_STATE > 2) or (CATERING_STATE > 2) or (REFUELING_STATE > 2)) and (DEPARTURE_STATE < 4) and (DEPARTURE_STATE > 0) and (GSXv2_handling == 0 or GSX_JETWAY_POWER==2) then
extPWR_Avail()
end
if (DEBOARDING_STATE == 4) or (BOARDING_STATE == 4)then
doorAction(2,1)
ipc.sleep(15000)
doorAction(1,1)
ipc.sleep(3000)
doorAction(4,1)
end
if (SH_ICAinUse==1) then
SH_ICAaction()
end
logAll()
end
function showStatus(value)
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: EXT PWR = "..value, 3)
end
end
function doorAction(door, value)
if (doorHandling == 1) then
-- 1 Left FWD
-- 2 Right CARGO (both)
-- 3 Right Service (both)
-- 4 Left AFT
local doorAction = door
if (door == 1 and value==1 and SH_ICAunboarding==0 and SH_ICAatGate==1) then
SH_ICAwelcome = -1
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Unboarding", 3)
end
SH_ICAunboarding = 1
ipc.sleep(8000)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew_unboarding.wav", soundDevice)
end
if (door == 4) then doorAction = 3 end
if (door == 8) then doorAction = 4 end
if (value==1) then
value = door
else
value = 0
end
local statExits = ipc.readUB("3367")
if (logic.And(statExits,door) ~= value) then
if (door==1) and (defaultJetwayToggle==1) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: Toggle Default Jetway", 3)
end
ipc.control(66695,0)
end
ipc.control(66389,doorAction)
end
end
end
function extPWR_Avail()
if (extPWR == 0) then
valPwrAvail = ipc.readUB("7397")
valPwrOn = ipc.readUB("7398")
if (logic.And(valPwrAvail,128) == 0) and (logic.And(valPwrOn,1) == 0) then
-- Toggle Connect/Disconnect EXT PWR
ipc.sleep(waitUntilExtPWRconnect)
ipc.writeUB("78ED",33)
showStatus("AVAIL")
extPWR = 1
end
end
end
function extPWR_Off()
if (extPWR == 1) then
valPwrAvail = ipc.readUB("7397")
valPwrOn = ipc.readUB("7398")
if (logic.And(valPwrAvail,128) > 0) or (logic.And(valPwrOn,1) > 0) then
if (logic.And(valPwrOn,1) > 0) then
-- EXT PWR = ON to EXT PWR = AVAIL
ipc.writeUB("78EE",79)
end
-- Toggle Connect/Disconnect EXT PWR
ipc.writeUB("78ED",33)
showStatus("Disconnected")
extPWR = -1
end
end
end
------------------------------------------------
------ SH ICA
------------------------------------------------
function SH_ICAaction()
-- Welcome Onboard
if (SH_ICAwelcome==0) then
groundSpeed = ipc.readUD("02B4") * 3600 / 1852 / 65536
blgtPower = ipc.readUB("739A")
if (groundSpeed == 0 and logic.And(blgtPower,1) > 0) then
SH_ICAwelcome = 1
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Welcome", 3)
end
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew1_welcomeonboard.wav", soundDevice)
end
end
-- Safety
if (SH_ICAsafety==0) then
onGround=ipc.readUW("0366")
if (onGround==1) then
groundSpeed = ipc.readUD("02B4") * 3600 / 1852 / 65536
if (groundSpeed > 2) and (groundSpeed < 30) then
SH_ICAsafety = 1
ipc.sleep(math.random(3, 10) * 1000)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
hourLocalTime = ipc.readUB("0238")
if (hourLocalTime>21) or (hourLocalTime<5) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Safety Night", 3)
end
sound.play(SH_ICAbasePath.."crew2_nighttakeoff.wav", soundDevice)
ipc.sleep(6000)
else
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Safety", 3)
end
sound.play(SH_ICAbasePath.."crew2_safetyaboard.wav", soundDevice)
end
end
end
end
-- Climb
if (SH_ICAclimb==0) then
vspeed=ipc.readSW("0842") * -3.28084
alt=ipc.readUD("0574") * 3.28084
if (alt > SH_ICAclimbDescentAlt and vspeed > 1200) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Climb", 3)
end
ipc.log("Climb: "..SH_ICAclimb)
SH_ICAclimb = 1
ipc.log("Climb after: "..SH_ICAclimb)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew3_climbingdevice.wav", soundDevice)
end
end
-- Cruise
if (SH_ICAcruise==0) then
vspeed=ipc.readSW("0842") * -3.28084
alt=ipc.readUD("0574") * 3.28084
if (alt > 18000 and vspeed < 700) then
SH_ICAcruise = 1
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Cruise", 3)
end
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew_servesandwich.wav", soundDevice)
end
end
-- Descent
if (SH_ICAdescent==0 and SH_ICAclimb==1) then
vspeed=ipc.readSW("0842") * -3.28084
alt=ipc.readUD("0574") * 3.28084
if (alt < SH_ICAclimbDescentAlt and vspeed > -900) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Descent", 3)
end
SH_ICAdescent = 1
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew6_descentautobelt.wav", soundDevice)
end
end
-- Final
if (SH_ICAfinal==0) then
vspeed = ipc.readSW("0842") * 3.28084
groundalt = ipc.readUD("0020") * 3.28084 / 256
alt = ipc.readUD("0574") * 3.28084
altogr = alt - groundalt
if (altogr < 3000 and vspeed > 500) then
SH_ICAfinal = 1
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
hourLocalTime = ipc.readUB("0238")
if (hourLocalTime>21 or hourLocalTime<5) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Final Night", 3)
end
sound.play(SH_ICAbasePath.."crew7_beforelandnight.wav", soundDevice)
ipc.sleep(7000)
else
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Final", 3)
end
sound.play(SH_ICAbasePath.."crew7_beforeland.wav", soundDevice)
end
end
end
-- After landing
if (SH_ICAafterLand==0 and SH_ICAfinal==1) then
while ((ipc.readUD("02B4") * 3600 / 1852 / 65536) > 40) do
ipc.sleep(1000)
end
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA After Landing", 3)
end
SH_ICAafterLand = 1
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew8_aftland.wav", soundDevice)
end
-- At Gate
if (SH_ICAatGate==0 and SH_ICAafterLand==1) then
groundSpeed = ipc.readUD("02B4") * 3600 / 1852 / 65536
if (groundSpeed<3) then
SH_ICAatGate = 1
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA At Gate", 3)
end
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew9_atgate.wav", soundDevice)
end
end
end
------------------------------------------------
------ GSX Automation
------------------------------------------------
local onGround = ipc.readUW("0366")
local onAir = 0
local parkBrakeSet = ipc.readUW("0BC8")
local engineLeftRunning = ipc.readUW("0894")
local engineRightRunning = ipc.readUW("092C")
function GSXcallDeboarding()
if (DEBOARDING_STATE==1) and (GSXhandling==1) then
ipc.keypress(GSXdialogKeyCode, GSXdialogKeyShift) -- Press Keyboard for GSX Dialog
ipc.sleep(2000) -- Wait 2000 ms
ipc.keypress(49) -- Press 1 (Deboarding)
if (showStatusMessages == 1) then
ipc.Display("pero | GSX Deboarding Requested", 3)
end
end
end
function GSXcallBoarding()
if (BOARDING_STATE==1) and (GSXhandling==1) then
ipc.writeLvar("FSDT_GSX_NUMPASSENGERS", math.random(GSXv2_MinPax, GSXv2_MaxPax))
ipc.keypress(GSXdialogKeyCode, GSXdialogKeyShift) -- Press Keyboard for GSX Dialog
ipc.sleep(2000) -- Wait 2000 ms
ipc.keypress(52) -- Press 4 (Boarding)
if (GSXboardingAndCatering == 1) then
ipc.keypress(GSXdialogKeyCode, GSXdialogKeyShift) -- Press Keyboard for GSX Dialog
ipc.sleep(2000) -- Wait 2000 ms
ipc.keypress(50) -- Press 2 (Catering)
end
if (showStatusMessages == 1) then
ipc.Display("pero | GSX Boarding Requested", 3)
end
end
end
function groundSpeedChanged(offset, value)
SH_ICAaction()
end
function verticalSpeedChanged(offset, value)
SH_ICAaction()
end
function groundStateChanged(offset, value)
if (value==0) then onAir = 1 end
onGround = value
checkAircraftStateForGSX()
extPWR = 0
end
function parkingBrakeChanged(offset, value)
parkBrakeSet = value
checkAircraftStateForGSX()
end
function engineLeftRunChanged(offset, value)
engineLeftRunning = value
checkAircraftStateForGSX()
end
function engineRightRunChanged(offset, value)
engineRightRunning = value
checkAircraftStateForGSX()
end
function checkAircraftStateForGSX()
if (DEBOARDING_STATE == 6) then onAir=0 end
if (onGround==1) and (parkBrakeSet>0) and (engineLeftRunning==0) and (engineRightRunning==0) then
if (onAir==0) then
GSXcallBoarding()
elseif (onAir==1) then
GSXcallDeboarding()
end
end
logAll()
end
------------------------------------------------
------ General
------------------------------------------------
function logAll()
if (logging==1) then
ipc.log("-------------------------------")
ipc.log(" GSX ENVIRONMENT")
ipc.log("-------------------------------")
ipc.log("DEBOARDING_STATE: "..DEBOARDING_STATE)
ipc.log("BOARDING_STATE: "..BOARDING_STATE)
ipc.log("DEPARTURE_STATE: "..DEPARTURE_STATE)
ipc.log("CATERING_STATE: "..CATERING_STATE)
ipc.log("REFUELING_STATE: "..REFUELING_STATE)
ipc.log("Jetway Power: "..GSX_JETWAY_POWER)
ipc.log("External Power: "..extPWR)
ipc.log("-------------------------------")
ipc.log(" AIRCRAFT STATE")
ipc.log("-------------------------------")
ipc.log("On Ground: "..onGround)
ipc.log("Was already Airborne: "..onAir)
ipc.log("Parking Brake: "..parkBrakeSet)
ipc.log("Engine Left Running: "..engineLeftRunning)
ipc.log("Engine Right Running: "..engineRightRunning)
ipc.log("-------------------------------")
ipc.log(" SH ICA STATE")
ipc.log("-------------------------------")
ipc.log("Welcome: "..SH_ICAwelcome)
ipc.log("Safety: "..SH_ICAsafety)
ipc.log("Climb: "..SH_ICAclimb)
ipc.log("Cruise: "..SH_ICAcruise)
ipc.log("Descent: "..SH_ICAdescent)
ipc.log("Final Approach: "..SH_ICAfinal)
ipc.log("After Landing: "..SH_ICAafterLand)
ipc.log("At Gate: "..SH_ICAatGate)
ipc.log("Unboarding: "..SH_ICAunboarding)
end
end
-- Event Trigger
event.offset(0x0366, "UW", "groundStateChanged")
event.offset(0x0BC8, "UW", "parkingBrakeChanged")
event.offset(0x0894, "UW", "engineLeftRunChanged")
event.offset(0x092C, "UW", "engineRightRunChanged")
event.offset(0x02B4, "UD", "groundSpeedChanged")
event.offset(0x0842, "SW", "verticalSpeedChanged")
event.Lvar("FSDT_GSX_DEBOARDING_STATE", pollInterval, "GSX_DEBOARDING_STATE")
event.Lvar("FSDT_GSX_BOARDING_STATE", pollInterval, "GSX_BOARDING_STATE")
event.Lvar("FSDT_GSX_DEPARTURE_STATE", pollInterval, "GSX_DEPARTURE_STATE")
event.Lvar("FSDT_GSX_CATERING_STATE", pollInterval, "GSX_CATERING_STATE")
event.Lvar("FSDT_GSX_REFUELING_STATE", pollInterval, "GSX_REFUELING_STATE")
event.Lvar("FSDT_GSX_JETWAY_POWER", pollInterval, "GSXv2_JETWAY_POWER_STATE")
-- event.Lvar("FSDT_GSX_JETWAY_AIR", pollInterval, "GSXv2_JETWAY_AIR_STATE")
-- Show starting information
ipc.Display("pero | JeeHellExtPWRbyGSX: Running...", 3)
if (SH_ICAinUse==1) then
ipc.display("Kabinenansagen gestartet\nCabinannouncements started\nCopyright by overflow 2011\nVisit www.simmershome.de",3)
end
if (logging==1) then
ipc.log("pero | JeeHellExtPWRbyGSX: Running...")
ipc.log("-------------------------------")
ipc.log(" GENERAL SETTINGS")
ipc.log("-------------------------------")
ipc.log("Show Status Messages: "..showStatusMessages)
ipc.log("Door handling: "..doorHandling)
ipc.log("Wait until EXT PWR Conn: "..waitUntilExtPWRconnect)
ipc.log("Poll Interval: "..pollInterval)
ipc.log("GSX Handling: "..GSXhandling)
ipc.log("GSXboardingAndCatering: "..GSXboardingAndCatering)
ipc.log("GSXdialogKeyShift: "..GSXdialogKeyShift)
ipc.log("GSXdialogKeyCode: "..GSXdialogKeyCode)
ipc.log("SH Cabin Announcement: "..SH_ICAinUse)
ipc.log("-------------------------------")
end
logAll()
-
Re: pero | JeeHell EXT PWR by GSX
Hi Mike,
can you please post a screenshot of your
<SIM>\Modules\ folder
<SIM>\Modules\SH_ICAsound folder
<SIM>\Modules\ipcReady.lua file content
Please correct your setting:
local SH_ICAbasePath = "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\\SH_ICAsound\\"
to
local SH_ICAbasePath = "C:\\Program Files\\Lockheed Martin\\Prepar3D v4\\Modules\\SH_ICAsound\\"
-
2 Attachment(s)
Re: pero | JeeHell EXT PWR by GSX
Quote:
Originally Posted by
capt_pero
Hi Mike,
can you please post a screenshot of your
<SIM>\Modules\ folder
<SIM>\Modules\SH_ICAsound folder
<SIM>\Modules\ipcReady.lua file content
Please correct your setting:
local SH_ICAbasePath = "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\\SH_ICAsound\\"
to
local SH_ICAbasePath = "C:\\Program Files\\Lockheed Martin\\Prepar3D v4\\Modules\\SH_ICAsound\\"
ipready file
ipc.macro("Lua peroJeeHellExtPWRbyGSX")
-
Re: pero | JeeHell EXT PWR by GSX
Looks good. I am pretty sure that the missing \\ causing the error. Please change as stated above. If this doesn't work, please post the FSUIPC5.log after starting / ending the sim.
-
Re: pero | JeeHell EXT PWR by GSX
Quote:
Originally Posted by
capt_pero
Looks good. I am pretty sure that the missing \\ causing the error. Please change as stated above. If this doesn't work, please post the FSUIPC5.log after starting / ending the sim.
done what you said but still no sounds i have perojeehellextpwrbygsx lua again for checking
i can actually see in text they are triggering within the sim but no sound
q1 when does welcome start or is trig (is it when the main door is shut)
because the first text i see is safety annoucement
-
Re: pero | JeeHell EXT PWR by GSX
Quote:
Originally Posted by
mike24
done what you said but still no sounds i have perojeehellextpwrbygsx lua again for checking
i can actually see in text they are triggering within the sim but no sound
q1 when does welcome start or is trig (is it when the main door is shut)
because the first text i see is safety annoucement
fsuipc log
********* FSUIPC5, Version 5.102 (12th June 2017) by Pete Dowson *********
Running inside Prepar3D v4
Module base=7FF93FEC0000
Windows 10 Home 64 Bit reported as Build 17134, Release ID: 1803 (OS 10.0)
Prepar3D.exe version = 4.3.29.25520
Checking the Registrations now ...
User Name="michael baker"
User Addr="BAKERM18@sky.com"
FSUIPC5 Key is provided
WideFS7 Key is provided
0 System time = 17/11/2018 00:11:29
15 FLT UNC path = "\\P3D\Documents2\Prepar3D v4 Files\"
15 ------ Module Version Check ------
15 acontain.dll: 4.3.29.25520
15 api.dll: 4.3.29.25520
15 controls.dll: 4.3.29.25520
15 fs-traffic.dll: 4.3.29.25520
15 G3D.dll: 4.3.29.25520
15 language.dll: 4.3.29.25520
15 sim1.dll: 4.3.29.25520
15 visualfx.dll: 4.3.29.25520
15 weather.dll: 4.3.29.25520
15 window.dll: 4.3.29.25520
15 ----------------------------------
47 FS UNC path = "\\P3D\3DV4\"
109 ---------------------- Joystick Device Scan -----------------------
109 Product= T-Rudder
109 Manufacturer= Thrustmaster
109 Vendor=044F, Product=B679 (Version 1.16)
125 GUIDs returned for product: VID_044F&PID_B679:
125 GUID= {1A9B0B10-7FCA-11E8-8001-444553540000}
125 Details: Btns=0, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X1019,Y1023,Z1023
125 Product= BU0836X Interface
125 Serial Number= B59353
125 Vendor=1DD2, Product=22A0 (Version 2.37)
125 GUIDs returned for product: VID_1DD2&PID_22A0:
125 GUID= {E764C9E0-AEB3-11E6-8001-444553540000}
125 Details: Btns=32, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R4095,U4095,V4095,X4095,Y4095,Z4095
125 Product= USB Game Controllers
125 Manufacturer= Thrustmaster, Inc.
125 Vendor=07B5, Product=0316 (Version 1.1)
125 GUIDs returned for product: VID_07B5&PID_0316:
125 GUID= {8909DF70-7B17-11E8-8001-444553540000}
125 Details: Btns=4, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X127,Y127,Z127
125 -------------------------------------------------------------------
140 Device acquired for use :
140 Joystick ID = 3 (Registry okay)
140 3=T-Rudder
140 3.GUID={1A9B0B10-7FCA-11E8-8001-444553540000}
140 Device acquired for use :
140 Joystick ID = 1 (Registry okay)
140 1=BU0836X Interface
140 1.GUID={E764C9E0-AEB3-11E6-8001-444553540000}
140 Device acquired for use :
140 Joystick ID = 0 (Registry okay)
140 0=USB Game Controllers
140 0.GUID={8909DF70-7B17-11E8-8001-444553540000}
140 -------------------------------------------------------------------
156 LogOptions=80000000 00000001
172 SimConnect_Open succeeded: waiting to check version okay
172 Opened separate AI Traffic client okay
87515 Running in "Lockheed Martin® Prepar3D® v4", Version: 4.3.29.25520 (SimConnect: 4.3.0.0)
87515 Initialising SimConnect data requests now
87515 FSUIPC Menu entry added
87531 ... Using Prepar3D with Academic License
87547 \\P3D\Documents2\Prepar3D v4 Files\GERMANY NURMBERG CFM NO FUEL day.fxml
87547 \\P3D\A320FMGS\Aircraft\A320-214\cfm56_5B4.air
116765 Weather Mode now = Theme
119047 \\P3D\A320FMGS\Aircraft\A320-233\IAEV2500.air
119047 \\P3D\Documents2\Prepar3D v4 Files\UK HEATHROW GATE AEI NEW.fxml
119203 !!! ICAO1 from AI traffic incorrect!
119203 !!! ICAO2 from AI traffic incorrect!
239687 User Aircraft ID 2 supplied, now being used
239734 Aircraft loaded: running normally now ...
240515 System time = 17/11/2018 00:15:30, Simulator time = 21:10:51 (20:10Z)
240531 Aircraft="FMGS A320-233 British Airways IAE"
246984 Starting everything now ...
247000 Plug-in thread table check:
247000 0: No Lua action yet: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ipcReady.lua"
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 0: No Lua action yet: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ipcReady.lua"
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 0: No Lua action yet: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ipcReady.lua"
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 0: No Lua action yet: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ipcReady.lua"
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 0: No Lua action yet: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ipcReady.lua"
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 0: No Lua action yet: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ipcReady.lua"
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 0: No Lua action yet: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ipcReady.lua"
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 0: No Lua action yet: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ipcReady.lua"
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 0: No Lua action yet: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\ipcReady.lua"
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247000 Plug-in thread table check:
247000 1: Okay: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
247031 ASN active function link set
247031 Ready for ASN WX radar
248219 Advanced Weather Interface Enabled
942078 Sim stopped: average frame rate for last 702 secs = 25.9 fps
942078 Max AI traffic was 126 aircraft (Deleted 0)
1625390 Sim stopped: average frame rate for last 676 secs = 29.2 fps
1625390 Max AI traffic was 157 aircraft (Deleted 0)
2182859 === Closing session: waiting for DLLStop to be called ...
2187859 Sim stopped: average frame rate for last 546 secs = 26.7 fps
2187859 Max AI traffic was 161 aircraft (Deleted 0)
2205828 === DLLStop called ...
2205828 === Closing external processes we started ...
2206828 === About to kill any Lua plug-ins still running ...
2206984 Lua threads being terminated:
2206984 1 = "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua"
2207140 LUA: "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\peroJeeHellExtPWRbyGSX.lua": killed
2207140 === Closing global Lua thread
2208140 === About to kill my timers ...
2208344 === Restoring window procs ...
2208344 === Unloading libraries ...
2208344 === stopping other threads ...
2208344 === ... Button scanning ...
2208437 === ... Axis scanning ...
2208547 === Releasing joystick devices ...
2208547 === Freeing macro memory
2208547 === Removing any offset overrides
2208547 === Closing all WideFS threads
2209922 === Clearing any displays left
2209922 === Calling SimConnect_Close ...
2212015 === SimConnect_Close done!
2212015 === AI slots deleted!
2212015 === Freeing button memory ...
2212015 === Closing my Windows ...
2212015 === Freeing FS libraries ...
2213031 === Closing devices ...
2213031 === Closing the Log ... Bye Bye! ...
2213031 System time = 17/11/2018 00:48:22, Simulator time = 21:42:54 (20:42Z)
2213031 *** FSUIPC log file being closed
Minimum frame rate was 5.1 fps, Maximum was 40.7 fps
Average frame rate for running time of 1925 secs = 27.3 fps
Maximum AI traffic for session was 161 aircraft
Memory managed: 979 Allocs, 978 Freed
********* FSUIPC Log file closed ***********
-
Re: pero | JeeHell EXT PWR by GSX
---------------------------------------------------------------------------
--| pero | JeeHell Ext PWR by GSX |--
--| Version 6 - 17.11.2018 |--
---------------------------------------------------------------------------
--| This LUA Script is designed to use with FSDT GSX and JeeHell FMGS. |--
--| If you don't use both this script is useless. |--
--| |--
--| Developer: Peter Rosendahl (capt_pero@web.de) |--
--| FREEWARE. Private use ONLY! |--
--| |--
--| GSX States: |--
--| 1 = service can be called |--
--| 2 = service is not available |--
--| 3 = services has been bypassed |--
--| 4 = service has been requested |--
--| 5 = service is being performed |--
--| 6 = service has been completed |--
--| |--
---------------------------------------------------------------------------
--| ICA - Intelligent Cabin Announcements v2.0 is integrated |--
---------------------------------------------------------------------------
--| |--
--| Copyright (C) 2017 by simmershome. www.simmershome.de. |--
--| |--
--| This program comes with ABSOLUTELY NO WARRANTY. |--
--| Commercial use strongly vorbidden! Licence see Manual. |--
--| This script manage cabin announcements during the flight. |--
--| It works with all MS based Simulators x32 and x64 |--
--| and FSUPC 4.644 or above |--
---------------------------------------------------------------------------
-- Set this to 1 enables logging of the script. For debugging purpose only
local logging = 0
-- Set Sound Device (default: soundDevice = 1)
local soundDevice = 4
------------------------------------------------
------ Door and Ext. Power Management by GSX
------------------------------------------------
-- Set this to 0 disables LUA Status Messages at the running Sim for this script
local showStatusMessages = 1
-- Set this to 0 to disable the door handling by this script
local doorHandling = 1
-- Set the pause in milliseconds until the Ext Power will be connected once the condition is reached
local waitUntilExtPWRconnect = 3000
-- Sets the Interval in milliseconds to check GSX state (Minimum = 100)
local pollInterval = 1000
------------------------------------------------
------ GSX Automation
------------------------------------------------
-- Set this to 1 if you want to enable GSX handling by this script
local GSXhandling = 1
-- Set this to 0 if you want to disable the handling of the Default Jetways (state can not be recognized)
local defaultJetwayToggle = 1
-- Set this to 1 if you want to have GSX Boarding And Catering. 0 is Boarding only.
local GSXboardingAndCatering = 0
-- Set the minimum and maximum values how many passengers you want to board by GSX v2
local GSXv2_handling = 1
local GSXv2_MinPax = 23
local GSXv2_MaxPax = 61
-- Enter KeyCode of the Keyboard Combination for GSX Dialog (Default: SHIFT+CTRL+W)
-- (Please read FSUIPC Documentation "FSUIPC for Advanced Users.pdf" page 22 & 30 for more details)
local GSXdialogKeyShift = 3 -- SHIFT + CTRL
local GSXdialogKeyCode = 87 -- W
------------------------------------------------
------ Simmershome Cabin Announcement Integration
------------------------------------------------
-- Set this variable to 1 if you want to have SH Cabin Announcements started
local SH_ICAinUse = 1
-- Set the altitude to play the climb / descent altitude
local SH_ICAclimbDescentAlt = 7000
-- Set the path to the Sound files for ICA (!!! Must end with \\)
local SH_ICAbasePath = "C:\\Program Files\\Lockheed Martin\\Prepar3D v4\\Modules\\SH_ICAsound\\"
--------------------------------------------------------------------------------------------------------
-- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! --
--------------------------------------------------------------------------------------------------------
-- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! --
--------------------------------------------------------------------------------------------------------
-- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! -- DO NOT CHANGE BELOW THIS LINE! --
--------------------------------------------------------------------------------------------------------
------------------------------------------------
------ Door and Ext. Power Management by GSX
------------------------------------------------
-- Local variables (please do NOT change)
local DEBOARDING_STATE=0
local BOARDING_STATE=0
local DEPARTURE_STATE = 0
local CATERING_STATE = 0
local REFUELING_STATE = 0
local GSX_JETWAY_POWER = 0
local extPWR = 0
local SH_ICAwelcome = -1
local SH_ICAsafety = 0
local SH_ICAclimb = 0
local SH_ICAcruise = 0
local SH_ICAdescent = 0
local SH_ICAfinal = 0
local SH_ICAafterLand = 0
local SH_ICAatGate = 0
local SH_ICAunboarding = 0
-- Functions
function GSX_DEBOARDING_STATE(varname, value)
DEBOARDING_STATE = value
checkState()
end
function GSX_BOARDING_STATE(varname, value)
BOARDING_STATE = value
checkState()
end
function GSX_CATERING_STATE(varname, value)
CATERING_STATE = value
checkState()
end
function GSX_REFUELING_STATE(varname, value)
REFUELING_STATE = value
checkState()
end
function GSX_DEPARTURE_STATE(varname, value)
DEPARTURE_STATE = value
checkState()
end
function GSXv2_JETWAY_POWER_STATE(varname, value)
GSX_JETWAY_POWER = value
if (GSX_JETWAY_POWER==5) then
extPWR_Avail()
end
if (GSX_JETWAY_POWER==4 and extPWR==1) then
extPWR_Off()
end
end
function checkState()
if (CATERING_STATE == 4) then
ipc.sleep(120000)
doorAction(8,1)
end
if (DEBOARDING_STATE == 6) then
onAir=0
end
if (DEPARTURE_STATE >= 5) then
doorAction(2,0)
ipc.sleep(5000)
doorAction(1,0)
ipc.sleep(3000)
doorAction(4,0)
ipc.sleep(7000)
doorAction(8,0)
if (GSXv2_handling == 0 or GSX_JETWAY_POWER==2) then
extPWR_Off()
end
end
if (BOARDING_STATE == 6) then
ipc.sleep(8000)
doorAction(2,0)
ipc.sleep(5000)
doorAction(1,0)
ipc.sleep(3000)
doorAction(4,0)
if (SH_ICAwelcome==-1) then
SH_ICAwelcome = 0
SH_ICAsafety = 0
SH_ICAclimb = 0
SH_ICAcruise = 0
SH_ICAdescent = 0
SH_ICAfinal = 0
SH_ICAafterLand = 0
SH_ICAatGate = 0
SH_ICAunboarding = 0
end
end
if (CATERING_STATE == 6) then
doorAction(8,0)
end
if ((DEBOARDING_STATE > 2) or (BOARDING_STATE > 2) or (CATERING_STATE > 2) or (REFUELING_STATE > 2)) and (DEPARTURE_STATE < 4) and (DEPARTURE_STATE > 0) and (GSXv2_handling == 0 or GSX_JETWAY_POWER==2) then
extPWR_Avail()
end
if (DEBOARDING_STATE == 4) or (BOARDING_STATE == 4)then
doorAction(2,1)
ipc.sleep(15000)
doorAction(1,1)
ipc.sleep(3000)
doorAction(4,1)
end
if (SH_ICAinUse==1) then
SH_ICAaction()
end
logAll()
end
function showStatus(value)
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: EXT PWR = "..value, 3)
end
end
function doorAction(door, value)
if (doorHandling == 1) then
-- 1 Left FWD
-- 2 Right CARGO (both)
-- 3 Right Service (both)
-- 4 Left AFT
local doorAction = door
if (door == 1 and value==1 and SH_ICAunboarding==0 and SH_ICAatGate==1) then
SH_ICAwelcome = -1
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Unboarding", 3)
end
SH_ICAunboarding = 1
ipc.sleep(8000)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew_unboarding.wav", soundDevice)
end
if (door == 4) then doorAction = 3 end
if (door == 8) then doorAction = 4 end
if (value==1) then
value = door
else
value = 0
end
local statExits = ipc.readUB("3367")
if (logic.And(statExits,door) ~= value) then
if (door==1) and (defaultJetwayToggle==1) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: Toggle Default Jetway", 3)
end
ipc.control(66695,0)
end
ipc.control(66389,doorAction)
end
end
end
function extPWR_Avail()
if (extPWR == 0) then
valPwrAvail = ipc.readUB("7397")
valPwrOn = ipc.readUB("7398")
if (logic.And(valPwrAvail,128) == 0) and (logic.And(valPwrOn,1) == 0) then
-- Toggle Connect/Disconnect EXT PWR
ipc.sleep(waitUntilExtPWRconnect)
ipc.writeUB("78ED",33)
showStatus("AVAIL")
extPWR = 1
end
end
end
function extPWR_Off()
if (extPWR == 1) then
valPwrAvail = ipc.readUB("7397")
valPwrOn = ipc.readUB("7398")
if (logic.And(valPwrAvail,128) > 0) or (logic.And(valPwrOn,1) > 0) then
if (logic.And(valPwrOn,1) > 0) then
-- EXT PWR = ON to EXT PWR = AVAIL
ipc.writeUB("78EE",79)
end
-- Toggle Connect/Disconnect EXT PWR
ipc.writeUB("78ED",33)
showStatus("Disconnected")
extPWR = -1
end
end
end
------------------------------------------------
------ SH ICA
------------------------------------------------
function SH_ICAaction()
-- Welcome Onboard
if (SH_ICAwelcome==0) then
groundSpeed = ipc.readUD("02B4") * 3600 / 1852 / 65536
blgtPower = ipc.readUB("739A")
if (groundSpeed == 0 and logic.And(blgtPower,1) > 0) then
SH_ICAwelcome = 1
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Welcome", 3)
end
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew1_welcomeonboard.wav", soundDevice)
end
end
-- Safety
if (SH_ICAsafety==0) then
onGround=ipc.readUW("0366")
if (onGround==1) then
groundSpeed = ipc.readUD("02B4") * 3600 / 1852 / 65536
if (groundSpeed > 2) and (groundSpeed < 30) then
SH_ICAsafety = 1
ipc.sleep(math.random(3, 10) * 1000)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
hourLocalTime = ipc.readUB("0238")
if (hourLocalTime>21) or (hourLocalTime<5) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Safety Night", 3)
end
sound.play(SH_ICAbasePath.."crew2_nighttakeoff.wav", soundDevice)
ipc.sleep(6000)
else
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Safety", 3)
end
sound.play(SH_ICAbasePath.."crew2_safetyaboard.wav", soundDevice)
end
end
end
end
-- Climb
if (SH_ICAclimb==0) then
vspeed=ipc.readSW("0842") * -3.28084
alt=ipc.readUD("0574") * 3.28084
if (alt > SH_ICAclimbDescentAlt and vspeed > 1200) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Climb", 3)
end
ipc.log("Climb: "..SH_ICAclimb)
SH_ICAclimb = 1
ipc.log("Climb after: "..SH_ICAclimb)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew3_climbingdevice.wav", soundDevice)
end
end
-- Cruise
if (SH_ICAcruise==0) then
vspeed=ipc.readSW("0842") * -3.28084
alt=ipc.readUD("0574") * 3.28084
if (alt > 18000 and vspeed < 700) then
SH_ICAcruise = 1
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Cruise", 3)
end
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew_servesandwich.wav", soundDevice)
end
end
-- Descent
if (SH_ICAdescent==0 and SH_ICAclimb==1) then
vspeed=ipc.readSW("0842") * -3.28084
alt=ipc.readUD("0574") * 3.28084
if (alt < SH_ICAclimbDescentAlt and vspeed > -900) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Descent", 3)
end
SH_ICAdescent = 1
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew6_descentautobelt.wav", soundDevice)
end
end
-- Final
if (SH_ICAfinal==0) then
vspeed = ipc.readSW("0842") * 3.28084
groundalt = ipc.readUD("0020") * 3.28084 / 256
alt = ipc.readUD("0574") * 3.28084
altogr = alt - groundalt
if (altogr < 3000 and vspeed > 500) then
SH_ICAfinal = 1
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
hourLocalTime = ipc.readUB("0238")
if (hourLocalTime>21 or hourLocalTime<5) then
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Final Night", 3)
end
sound.play(SH_ICAbasePath.."crew7_beforelandnight.wav", soundDevice)
ipc.sleep(7000)
else
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA Final", 3)
end
sound.play(SH_ICAbasePath.."crew7_beforeland.wav", soundDevice)
end
end
end
-- After landing
if (SH_ICAafterLand==0 and SH_ICAfinal==1) then
while ((ipc.readUD("02B4") * 3600 / 1852 / 65536) > 40) do
ipc.sleep(1000)
end
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA After Landing", 3)
end
SH_ICAafterLand = 1
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew8_aftland.wav", soundDevice)
end
-- At Gate
if (SH_ICAatGate==0 and SH_ICAafterLand==1) then
groundSpeed = ipc.readUD("02B4") * 3600 / 1852 / 65536
if (groundSpeed<3) then
SH_ICAatGate = 1
if (showStatusMessages == 1) then
ipc.Display("pero | JeeHellExtPWRbyGSX: SH ICA At Gate", 3)
end
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."paxsign.wav", soundDevice)
ipc.sleep(3000)
sound.play(SH_ICAbasePath.."crew9_atgate.wav", soundDevice)
end
end
end
------------------------------------------------
------ GSX Automation
------------------------------------------------
local onGround = ipc.readUW("0366")
local onAir = 0
local parkBrakeSet = ipc.readUW("0BC8")
local engineLeftRunning = ipc.readUW("0894")
local engineRightRunning = ipc.readUW("092C")
function GSXcallDeboarding()
if (DEBOARDING_STATE==1) and (GSXhandling==1) then
ipc.keypress(GSXdialogKeyCode, GSXdialogKeyShift) -- Press Keyboard for GSX Dialog
ipc.sleep(2000) -- Wait 2000 ms
ipc.keypress(49) -- Press 1 (Deboarding)
if (showStatusMessages == 1) then
ipc.Display("pero | GSX Deboarding Requested", 3)
end
end
end
function GSXcallBoarding()
if (BOARDING_STATE==1) and (GSXhandling==1) then
ipc.writeLvar("FSDT_GSX_NUMPASSENGERS", math.random(GSXv2_MinPax, GSXv2_MaxPax))
ipc.keypress(GSXdialogKeyCode, GSXdialogKeyShift) -- Press Keyboard for GSX Dialog
ipc.sleep(2000) -- Wait 2000 ms
ipc.keypress(52) -- Press 4 (Boarding)
if (GSXboardingAndCatering == 1) then
ipc.keypress(GSXdialogKeyCode, GSXdialogKeyShift) -- Press Keyboard for GSX Dialog
ipc.sleep(2000) -- Wait 2000 ms
ipc.keypress(50) -- Press 2 (Catering)
end
if (showStatusMessages == 1) then
ipc.Display("pero | GSX Boarding Requested", 3)
end
end
end
function groundSpeedChanged(offset, value)
SH_ICAaction()
end
function verticalSpeedChanged(offset, value)
SH_ICAaction()
end
function groundStateChanged(offset, value)
if (value==0) then onAir = 1 end
onGround = value
checkAircraftStateForGSX()
extPWR = 0
end
function parkingBrakeChanged(offset, value)
parkBrakeSet = value
checkAircraftStateForGSX()
end
function engineLeftRunChanged(offset, value)
engineLeftRunning = value
checkAircraftStateForGSX()
end
function engineRightRunChanged(offset, value)
engineRightRunning = value
checkAircraftStateForGSX()
end
function checkAircraftStateForGSX()
if (DEBOARDING_STATE == 6) then onAir=0 end
if (onGround==1) and (parkBrakeSet>0) and (engineLeftRunning==0) and (engineRightRunning==0) then
if (onAir==0) then
GSXcallBoarding()
elseif (onAir==1) then
GSXcallDeboarding()
end
end
logAll()
end
------------------------------------------------
------ General
------------------------------------------------
function logAll()
if (logging==1) then
ipc.log("-------------------------------")
ipc.log(" GSX ENVIRONMENT")
ipc.log("-------------------------------")
ipc.log("DEBOARDING_STATE: "..DEBOARDING_STATE)
ipc.log("BOARDING_STATE: "..BOARDING_STATE)
ipc.log("DEPARTURE_STATE: "..DEPARTURE_STATE)
ipc.log("CATERING_STATE: "..CATERING_STATE)
ipc.log("REFUELING_STATE: "..REFUELING_STATE)
ipc.log("Jetway Power: "..GSX_JETWAY_POWER)
ipc.log("External Power: "..extPWR)
ipc.log("-------------------------------")
ipc.log(" AIRCRAFT STATE")
ipc.log("-------------------------------")
ipc.log("On Ground: "..onGround)
ipc.log("Was already Airborne: "..onAir)
ipc.log("Parking Brake: "..parkBrakeSet)
ipc.log("Engine Left Running: "..engineLeftRunning)
ipc.log("Engine Right Running: "..engineRightRunning)
ipc.log("-------------------------------")
ipc.log(" SH ICA STATE")
ipc.log("-------------------------------")
ipc.log("Welcome: "..SH_ICAwelcome)
ipc.log("Safety: "..SH_ICAsafety)
ipc.log("Climb: "..SH_ICAclimb)
ipc.log("Cruise: "..SH_ICAcruise)
ipc.log("Descent: "..SH_ICAdescent)
ipc.log("Final Approach: "..SH_ICAfinal)
ipc.log("After Landing: "..SH_ICAafterLand)
ipc.log("At Gate: "..SH_ICAatGate)
ipc.log("Unboarding: "..SH_ICAunboarding)
end
end
-- Event Trigger
event.offset(0x0366, "UW", "groundStateChanged")
event.offset(0x0BC8, "UW", "parkingBrakeChanged")
event.offset(0x0894, "UW", "engineLeftRunChanged")
event.offset(0x092C, "UW", "engineRightRunChanged")
event.offset(0x02B4, "UD", "groundSpeedChanged")
event.offset(0x0842, "SW", "verticalSpeedChanged")
event.Lvar("FSDT_GSX_DEBOARDING_STATE", pollInterval, "GSX_DEBOARDING_STATE")
event.Lvar("FSDT_GSX_BOARDING_STATE", pollInterval, "GSX_BOARDING_STATE")
event.Lvar("FSDT_GSX_DEPARTURE_STATE", pollInterval, "GSX_DEPARTURE_STATE")
event.Lvar("FSDT_GSX_CATERING_STATE", pollInterval, "GSX_CATERING_STATE")
event.Lvar("FSDT_GSX_REFUELING_STATE", pollInterval, "GSX_REFUELING_STATE")
event.Lvar("FSDT_GSX_JETWAY_POWER", pollInterval, "GSXv2_JETWAY_POWER_STATE")
-- event.Lvar("FSDT_GSX_JETWAY_AIR", pollInterval, "GSXv2_JETWAY_AIR_STATE")
-- Show starting information
ipc.Display("pero | JeeHellExtPWRbyGSX: Running...", 3)
if (SH_ICAinUse==1) then
ipc.display("Kabinenansagen gestartet\nCabinannouncements started\nCopyright by overflow 2011\nVisit www.simmershome.de",3)
end
if (logging==1) then
ipc.log("pero | JeeHellExtPWRbyGSX: Running...")
ipc.log("-------------------------------")
ipc.log(" GENERAL SETTINGS")
ipc.log("-------------------------------")
ipc.log("Show Status Messages: "..showStatusMessages)
ipc.log("Door handling: "..doorHandling)
ipc.log("Wait until EXT PWR Conn: "..waitUntilExtPWRconnect)
ipc.log("Poll Interval: "..pollInterval)
ipc.log("GSX Handling: "..GSXhandling)
ipc.log("GSXboardingAndCatering: "..GSXboardingAndCatering)
ipc.log("GSXdialogKeyShift: "..GSXdialogKeyShift)
ipc.log("GSXdialogKeyCode: "..GSXdialogKeyCode)
ipc.log("SH Cabin Announcement: "..SH_ICAinUse)
ipc.log("-------------------------------")
end
logAll()
-
Re: pero | JeeHell EXT PWR by GSX
Looks all good. To start the script you have to Set PARK BRK = On (From Off to On). Have you tried this?
An please switch logging = 1 and post FSUIPC5.log again (after running the sim)
In "peroJeeHellExtPWRbyGSX.lua"
local logging = 1
-
1 Attachment(s)
Re: pero | JeeHell EXT PWR by GSX
Thanks for all your help
i have put handbrake on and off still no sound
gsx lua log
-
Re: pero | JeeHell EXT PWR by GSX
But we come closer. The log shows that we should have had "Safety" sound.
Can you please try putting the "soundDevice = 1" to really make sure that we take a valid sound card.
If you in addition set "local showStatusMessages = 1" you should see a message for each LUA Action of this script.
I am sure we will get it run because the log file is looking good. :cool:
-
Re: pero | JeeHell EXT PWR by GSX
Quote:
Originally Posted by
capt_pero
But we come closer. The log shows that we should have had "Safety" sound.
Can you please try putting the "soundDevice = 1" to really make sure that we take a valid sound card.
If you in addition set "local showStatusMessages = 1" you should see a message for each LUA Action of this script.
I am sure we will get it run because the log file is looking good. :cool:
Already tryed on 1 for sound card still no sound
Also already on 1 for lua actions
The first action I see is safety message but not sound
Should the first sound be welcome
Again Thankyou
-
Re: pero | JeeHell EXT PWR by GSX
Strange. Do you see a LUA Message and hear a "bing" sound? Yes, after GSX Boarding is completed you should hear the "welcome" sound.
-
Re: pero | JeeHell EXT PWR by GSX
Hello Peter
I have the same error no sound. At the start, the text message comes, the doors open, the passengers start up, you can hear the noises of the passengers, but no welcome message. Have it synonymous with sound card 1 and 2 tried but no success. will create a logfile today and post here. Thanks for your help.
Karl
-
Re: pero | JeeHell EXT PWR by GSX
No Bing sound no wecome sound but i did see them trigger in the text bar
Thanks for all the effort did try all different fsuipc sound card choices
Thanks
-
Re: pero | JeeHell EXT PWR by GSX
In my case it works well!
Only the soundcarddevice changed to my devicenumber from fsuipc.ini
and the path to the Simfolder, for example (local SH_ICAbasePath = "D:\\Prepar3D v4\\Modules\\SH_ICAsound\\")!
regards Peter
-
Re: pero | JeeHell EXT PWR by GSX
Quote:
Originally Posted by
pete_fuss
In my case it works well!
Only the soundcarddevice changed to my devicenumber from fsuipc.ini
and the path to the Simfolder, for example (local SH_ICAbasePath = "D:\\Prepar3D v4\\Modules\\SH_ICAsound\\")!
regards Peter
so are you saying yours is working now or can you stikll not here the sounds
-
Re: pero | JeeHell EXT PWR by GSX
Quote:
Originally Posted by
mike24
so are you saying yours is working now or can you stikll not here the sounds
I here all sounds!
Regards Peter
-
Re: pero | JeeHell EXT PWR by GSX
I am reworking the manual at the moment adding a troubleshooting section.
-
Re: pero | JeeHell EXT PWR by GSX
How many Lau files do I need in modules folder apart from
peroJeeHellExtPWRbyGSX.lua"
If their is another Lua file what should be in it
-
Re: pero | JeeHell EXT PWR by GSX
I have two lua files in the modules folder,
ipcready.lua with this text in it : ipc.macro("Lua peroJeeHellExtPWRbyGSX")
and
peroJeeHellExtPWRbyGSX.lua
thats all !
regards Peter