Results 21 to 30 of 204
Thread: pero | JeeHell EXT PWR by GSX
-
11-17-2018, 10:59 AM #21
- Join Date
- Feb 2011
- Location
- england
- Posts
- 95
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 == 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,12 == 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,12 > 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()
-
11-17-2018, 11:35 AM #22
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\\"
-
11-17-2018, 11:59 AM #23
- Join Date
- Feb 2011
- Location
- england
- Posts
- 95
-
11-17-2018, 03:43 PM #24
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.
-
11-18-2018, 07:40 AM #25
- Join Date
- Feb 2011
- Location
- england
- Posts
- 95
Re: pero | JeeHell EXT PWR by GSX
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
-
11-18-2018, 07:45 AM #26
- Join Date
- Feb 2011
- Location
- england
- Posts
- 95
Re: pero | JeeHell EXT PWR by GSX
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 ***********
-
11-18-2018, 07:46 AM #27
- Join Date
- Feb 2011
- Location
- england
- Posts
- 95
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 == 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,12 == 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,12 > 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()
-
11-19-2018, 02:28 PM #28
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
-
11-20-2018, 01:40 PM #29
- Join Date
- Feb 2011
- Location
- england
- Posts
- 95
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
-
11-20-2018, 03:11 PM #30
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.
Find Sexy Womans from your town for night
Route not displayed after ND and...