shorthauler
-
Posts
85 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Gallery
Downloads
Posts posted by shorthauler
-
-
I think I may have the correct code now:
spdstate = ipc.readSTR(0xABCD, 9)
function getnumbersfromtext(spdstate)
return tonumber(spdstate:match"%d+[%d.,]*")
endspeed = getnumbersfromtext(spdstate) -- everything works until here, I get a correct Mach number such as 0.59
ipc.writeFLT(0x66C1, speed) -- I get 0.590000000000... as an output value that I read via the logging window or in MobiflightAs per the log below, I am getting the correct results for "speed". But how do I write them best to the offset? If I use "writeFLT" for writing and "FLT32" for monitoring, I get a number with a seemingly infinite number of zeroes after the Mach value. I only need the two digits after the decimal, just like in the log.
Am I using the wrong format to write to the offset?
Best regards,
- shorthauler********* LUA: "A320 SPD split" Log [from FSUIPC version 4.977] *********
529704 System time = 24/09/2023 09:09:22, Simulator time = 13:20:07 (12:20Z)
529704 LUA: beginning "E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua"
529719 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:1
529719 LUA: Global: ipcPARAM = 0
529719 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:11
529719 LUA: Global: spdstate = MACH
0.56
529719 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:3
529735 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:13
529735 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:6 fn: getnumbersfromtext
529735 LUA: Local: spdstate = MACH
0.56
529735 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:14
529735 LUA: Global: speed = 0.56
529766 >>> Thread forced exit (ipc.exit or os.exit) <<<
529766 System time = 24/09/2023 09:09:22, Simulator time = 13:20:09 (12:20Z)
********* LUA execution terminated: Log Closed ********* -
Thanks a lot, sorry to have missed this!
-
Thanks a lot, can you give me a keyword, so I can read up on this on the documentation? 66C1 is to be sent to a display, will these interferences influence the value that is being sent? Should I space the offsets further apart?
-
Hi folks,
This seems to be a new (and interesting) problem, so I am opening a new thread. I am searching a string for certain characters, and depending on whether they are found or not, a free offset is either set to 1 or 0. The string is either SPD plus a number or MACH or a number ("SPD245" or "MACH 0.78"). Or, in managed mode, it is "---*".
spdstate = ipc.readSTR(0xABCD, 9)
if (string.find(spdstate, "%-") and string.find(spdstate, "%*")) then
ipc.writeUB(0x66C2,1)
ipc.writeUB(0x66C3,1)
elseif string.find(spdstate, "%-") then
ipc.writeUB(0x66C2,1)
ipc.writeUB(0x66C3,0)
elseif string.find(spdstate, "%*") then
ipc.writeUB(0x66C2,0)
ipc.writeUB(0x66C3,1)
else
ipc.writeUB(0x66C2,0)
ipc.writeUB(0x66C3,0)
endThis works well. Now the conundrum: I am also monitoring (FS Window) free offset 66C1 which in an older script was used to extract other elements of the string. This offset is not used anymore in any of my lua scripts. Still, in managed mode, when offets 66C2 and 66C3 both show "1", 66C1 it shows the value of 256 in signed 16-bit value (S16) or 65792 in signed 16-bit value (S32). In selected mode, when the string shows either a SPD or MACH value, it is 0.
As this seems to be an FSUIPC related question rather than a Lua question, I am posting it here.
Any input appreciated!
-shorthauler
Log:
********* LUA: "A320 SPD split" Log [from FSUIPC version 4.977] *********
1712937 System time = 23/09/2023 13:45:07, Simulator time = 13:23:27 (12:23Z)
1712937 LUA: beginning "E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua"
1712937 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:3
1712937 LUA: Global: ipcPARAM = 0
1712937 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:11
1712937 LUA: Global: spdstate = SPD
250
1712937 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:14
1712953 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:17
1712953 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:21
1713000 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:22
1713000 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:23
1713000 >>> Thread forced exit (ipc.exit or os.exit) <<<
1713000 System time = 23/09/2023 13:45:07, Simulator time = 13:23:27 (12:23Z)
********* LUA execution terminated: Log Closed ****************** LUA: "A320 SPD split" Log [from FSUIPC version 4.977] *********
1729640 System time = 23/09/2023 13:45:24, Simulator time = 13:23:39 (12:23Z)
1729640 LUA: beginning "E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua"
1729640 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:3
1729640 LUA: Global: ipcPARAM = 0
1729640 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:11
1729640 LUA: Global: spdstate = SPD
---*
1729640 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:12
1729718 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:13
1729718 LUA: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:23
1729718 >>> Thread forced exit (ipc.exit or os.exit) <<<
1729718 System time = 23/09/2023 13:45:24, Simulator time = 13:23:39 (12:23Z)
********* LUA execution terminated: Log Closed ********* -
Apologies for the separate threads, but one is to extract the numbers from a string and write it into an offset, the other one (this one) is to learn how to find a certain character in a string and write 0 or 1 into an offset accordingly. I though it would be less confusing to separate the threads.
Best regards,
Holger -
Thank you, so adapted to my variables, this would look like this?
spdstate = ipc.readSTR(0xABCD, 9)
function getnumbersfromtext(spdstate)
local str = ""
string.gsub(txt,"([%d.]+)",function(e)
str = str .. e
end)
return tonumber(str);
endspeed = getnumbersfromtext
ipc.writeSW(0x66C1, speed) -
This is a snippet of the log file, with my commments:
2750813 LUA.0: beginning "E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua"
=> The script is started, airplane is in managed mode with dashes and dot displayed.
2750813 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:3
2750813 LUA.0: Global: ipcPARAM = 0
=> I do not know which parameter this refers to. Line 3 is spdstate = ipc.readSTR(0xABCD, 9)
2750813 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:5
2750828 LUA.0: Global: spdstate = SPD
---*
=> I am puzzeled - there is a line change. The string seems to work in two lines. I wonder whether this makes the string difficult to read.
2750828 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:6
2750875 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:7
2750875 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:19
2750875 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:20
2750891 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:21
=> Airplane has been changed to selected mode, knots. Then the script is called again.
2756047 LUA.0: beginning "E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua"
2756047 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:3
2756047 LUA.0: Global: ipcPARAM = 0
2756063 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:5
2756063 LUA.0: Global: spdstate = SPD
289
=> Again, a line change.
2756063 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:8
2756078 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:11
2756078 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:15
2756109 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:16
2756125 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:19
2756125 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:20
2756125 LUA.0: Global: speed_str = 289
=> Speed as characters, extracted correctly from string.
2756125 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:21
2756125 LUA.0: Global: speed = 289
=> Speed as number.
=> Airplane is in managed mode, speed changed to Mach.
2759688 LUA.0: beginning "E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua"
2759688 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:3
2759703 LUA.0: Global: ipcPARAM = 0
2759703 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:5
2759703 LUA.0: Global: spdstate = MACH
0.54
=> Mach number read correctly from string.
2759703 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:8
2759719 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:11
2759719 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:15
2759766 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:16
2759766 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:19
2759766 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:20
2759781 LUA.0: Global: speed_str = 0.
=> This should be only the numbers from the string. See other post on the Mach number.
2759781 LUA.0: E:\FSX\Flight Simulator X\Modules\A320 SPD split.lua:21
2759781 LUA.0: Global: speed = 0 -
Yes, you were right, thank you very much. I realize that "*" is a "magic character". It can be escaped by putting "\" in front. Same goes for the hyphen / minus. In the script I have reduced the number of hyphens to one. Because there will always be three hyphens in the string or none. So it's enough to only find one.
But still the same problem. When 66C2 should be set to one, it is set to 0 and vice versa.
The script now looks like this, with line numbers:1 -- dashes C2, dot C3
2
3 spdstate = ipc.readSTR(0xABCD, 9)
4
5 if (string.find(spdstate, "\-") and string.find(spdstate, "\*")) then
6 ipc.writeUB(0x66C2,1)
7 ipc.writeUB(0x66C3,1)
8 elseif string.find(spdstate, "\-") then
9 ipc.writeUB(0x66C2,1)
10 ipc.writeUB(0x66C3,0)
11 elseif string.find(spdstate, "\*") then
12 ipc.writeUB(0x66C2,0)
13 ipc.writeUB(0x66C3,1)
14 else
15 ipc.writeUB(0x66C2,0)
16 ipc.writeUB(0x66C3,0)
17 end
18
19 speed_str = string.match(spdstate, "%d+[%d.,]") -- speed as string
20 speed = tonumber(speed_str) -- converting speed from string to number
21 ipc.writeSW(0x66C1, speed) -
The Mach number in the string is seperated with a full stop, not with a comma.
- shorthauler
-
Yes, I was also surprised, but it only works in SPD mode, not in MACH. SPD is an integer, MACH a rational number < 1. For MACH I only get a zero. This may be the zero in front of the decimal, and the value after the decimal is cut off. I have tried to make use of the tonumber function - did I do this correctly?
For the value after the decimal, I tried this "[%d.,]". But it does not do the trick.
I have used "ipc.writeSW" (signed word value).
-- dashes C2, dot C3
spdstate = ipc.readSTR(0xABCD, 9)
if (string.find(spdstate, "---") and string.find(spdstate, "*")) then
ipc.writeUB(0x66C2,1)
ipc.writeUB(0x66C3,1)
elseif (string.find(spdstate, "---") and not string.find(spdstate, "*")) then
ipc.writeUB(0x66C2,1)
ipc.writeUB(0x66C3,0)
elseif (string.find(spdstate, "*") and not string.find(spdstate, "---")) then
ipc.writeUB(0x66C2,0)
ipc.writeUB(0x66C3,1)
else
ipc.writeUB(0x66C2,0)
ipc.writeUB(0x66C3,0)
endspeed_str = string.match(spdstate, "%d%d[%d.,]") -- speed as string
speed =tonumber(speed_str) -- converting speed from string to number
ipc.writeSW(0x66C1, speed) -
Thanks a lot, John. This is the file, as it stands now. I have changed it a bit. We are looking at two elements here, dashes and dots, and I think it is necessary to explicitly add the "not string.find" part (I hope my syntax is ok).
The conundrum is that The 0x66C2 offset is always 1 where it should be 0 and vice versa. Even if I swap the ones and the zeroes in the code!
-- dashes C2, dot C3
spdstate = ipc.readSTR(0xABCD, 9)
if (string.find(spdstate, "---") and string.find(spdstate, "*")) then
ipc.writeUB(0x66C2,1)
ipc.writeUB(0x66C3,1)
elseif (string.find(spdstate, "---") and not string.find(spdstate, "*")) then
ipc.writeUB(0x66C2,1)
ipc.writeUB(0x66C3,0)
elseif (string.find(spdstate, "*") and not string.find(spdstate, "---")) then
ipc.writeUB(0x66C2,0)
ipc.writeUB(0x66C3,1)
else
ipc.writeUB(0x66C2,0)
ipc.writeUB(0x66C3,0)
endspeed = string.match(spdstate, "%d+")
ipc.writeSW(0x66C1, speed) -
Hi folks, I have these two scripts which work seperately from each other:
spdstate = ipc.readSTR(0xABCD, 9)
if string.find(spdstate, "---")
then
ipc.writeUB(0x66C2,1)
else
ipc.writeUB(0x66C2,0)end
----------------------------
spdstate = ipc.readSTR(0xABCD, 9)
if string.find(spdstate, "*")
then
ipc.writeUB(0x66C3,1)
else
ipc.writeUB(0x66C3,0)end
I would like to fuse both of them into one script. I don't see how I should use the function expression for this. I could do a nested if statement with all possible four combinations, but I don't know how to code "not find".
Best regards
-shorthauler
-
Thsnk you for directing me to these links. This now works:
spdstate = ipc.readSTR(0xABCD, 9)
speed = string.match(spdstate, "%d+")
ipc.writeSW(0x66C1, speed)It was essential to define the lenght of the string (the ", 9" in the first line).
Best regards,
-shorthauler
-
Hi folks,
I am trying to extract numbers from a string. The string corresponds to the full FCU message, for example SPD240 or MACH 0,78. Let's call the offset where the string can be found 0xABCD. The result shall be written to offset 066C1. As the MACH number is not an integer, I think I should be working with floats. As SPD and MACH have different lengths, I cannot extract from specific positions of the string.
spdstate = ipc.readSTR(0xABCD)
local speed = string.match(spdstate, "%d+")
ipc.writeFLT(0x66C1, speed)end
I would like to show the resulting value in a window in FSX, I think I shoud use U32 as a type for logging.
But I only receive a 0.
Any input is much appreciated. I am reluctant to use the tonumber function as I am afraid I will mess up.
Best regards
-shorthauler
-
Thank you for your comment. I seem to have a lack of understanding - I set up the script in a way that it is triggered only when the button is actuated. I thought this would be more efficient than having ths script running in the background the whole time. Seems I am wrong?
Holger
-
Dear John,
Problem solved - I had the Lua scrip running continuously due to a faulty Auto entry in FSUIPC.INI
My sincere apologies for taking your time!
Best regards,
Holger
-
Hi folks,
I have an 8-position-switch (A320 EFIS mode selector), so this corresponds to 8 seperate buttons. I have set up these buttons to call a Lua script ("Control sent when button pressed"). Every button calls the same Lus script but sends different parameters (0, 10, 20, 30, 40). The parameters are supposed to set an Lvar state that will select the respective mode (LSm VOR, NAV, ARC, PLAN). This is for FSUIPC4.
Ths Lua script consist of one single line:
ipc.writeLvar("VC_GSLD_CP_EFIS_ND_Mode_Knob", ipcPARAM)
This is where I started. I have read up on parameters in the Advanced Users, Library and Plug-In documents and all kinds of variations, but to no avail.
I am probably missing something very simple here, so apologies in advance.
Any input will be much appreciated.
Best regards,
- shorthauler
-
I might have used the term "virtual buttons" incorrectly.
My hardware is connected to an Arduino Mega. As far as I know, there is no direct communication between FSUIPC and Arduino (or at least, it is very cumbersome), so the ways I know to trigger Lua scripts is either by buttons or by way of Mobiflight.
-
HI John, I think I get what you mean. I would also need to assign virtual buttons for each position, right? Yes, the switch rotates freely / indefinitely.
-
5 hours ago, John Dowson said:
Normally you would have one mode selector switch/rotary that has multiple positions (e.g. ALT, VS, HDG, etc) and another rotary used to increment and decrement the value determined by the mode selector switch.
Hi John, thank you for looking into this and apologies for posting in the wrong forum.
From the hardware side of things, both selectors are 8-position rotary switches. From the software side, both PMDG and FSLabs only have offsets / parameters to decrease or increase the position of the selector switch. There are no specific offsets / parameters for specific positions of the selector.
I am attaching my Lua scripts (for both PMDG and FSLabs) and the FSUIPC.ini. The Lua scripts are triggered by way of Mobiflight. There is no slow / fast option as Mobiflight looks at an 8-position-rotary-switch as an assembly of eight buttons, not as an encoder. An encoder for Mobiflight is a switch that has three pins (A, B and ground).
So I am trying to emulate a rotary encoder with a direction of turn by way of these scripts.
Best regards,
Holger
-
Dear all,
I am using an 8-position-rotary switch for the mode / range function for various aircraft (FSLabs A320, PMDG). All these aircraft on increase or decrease of the knob, not a specific position.
So I had to write a script that diagnoses in which direction the switch is being turned. This is what I did:
Every position (e.g. "2") triggers a specific Lua script. The script first writes into a free custom FSUIPC offset specific to this position. It then checks whether the offset of the position to the left ("1") has been set. If yes, it assumes the switch has been turned to the right. It then clears the offset of the previous position and sends a parameter to increase range or mode. If no, it assumes the switch has been turned to the left and decreases.
This works reasonably well, but if I turn the switch too much, I get jumps and mostly increases where there should be decreases. I am wondering why this is. Any ideas in this forum?
I also have optical rotary encoders that send an enormous amount of parameters per unit of time and there is no problem.
Software is Mobiflight, FSX, FSLABs A320, PMDG 744.
I did a test in Mobiflight where I directly sent keyboard inputs to notepad - no skipping or reversing there.
Best regards,
HolgerScript for the first position:
ipc.writeUB(0x66CA,2) -- setting the offset of the current position to 2
btnstate = ipc.readUB(0x66C9) -- reading the offset of the position before (clockwise)
if btnstate == 2 -- if the switch is turned in clockwise direction, the offset has been set to two at the previous detent
then
ipc.writeUB(0x66C9,1) -- resetting the offset of the previous detent
ipc.control(70158,16384) -- command for increasing range
else -- if btnstate is not 2 it means the switch has been turned counter clockwise
ipc.control(70158,8192) -- command for decreasing range
endScript for the second position:
ipc.writeUB(0x66CB,2)
btnstate = ipc.readUB(0x66CA)
if btnstate == 2
then
ipc.writeUB(0x66CA,1)
ipc.control(70158,16384) -- command for increasing range
else
ipc.control(70158,8192) -- command for decreasing range
endEtc.
-
I am using the EPIC card. Quite an old product but to my mind still more advanced as what is available today as values are generated within the card and then sent to FS rather then sending signals to FS which turn the knobs.
However, not every add-on aircraft has Offesets, so I am now programming EPIC to send button pulses to FSUIPC. By way of a macro and LVARs they will then manipulate the aircraft's input (A2A C172 in this case).
Now I notice if I turn a knob quickly, it sends three pulses from EPIC to the Windows Game Controller. But out of these three pulses, only one goes through to the aircraft. The other two get lost on the way.
I think I have explained in a non-technical manner what some of you might have experienced - FSX seems to be rather slow accepting inputs, so if they are above FSX's tolerance, they get lost.
Can anyone help with this?
Best,
Holger
-
Thanks a lot, this helped. No idea how this hotchpotch of *.ini came about, though.
Best regards,
Holger
-
I have checked in FSX. The controllers are switched off, and I even deleted all axis in the controllers. This is my FSUIPC.
Best,
HOlger
[General]
UpdatedByVersion=4972
History=K5WTBRWEI4QTD1H2JE7ST
AxesWrongRange=No
TCASid=Flight
TCASrange=40
AxisCalibration=No
DirectAxesToCalibs=No
ShowMultilineWindow=Yes
SuppressSingleline=No
SuppressMultilineFS=No
AxisIntercepts=No
DontResetAxes=No
InitDelay=0
GetNearestAirports=Yes
OOMcheck=Yes
OOMcheckInterval=10
WeatherReadFactor=2
WeatherRewriteSeconds=1
CustomWeatherModify=No
SimConnectStallTime=20
LuaRerunDelay=66
Console=No
InitDelayDevicesToo=No
NewInterceptTextMenu=No
UseSystemTime=No
UseMidMouseBtn=Yes
MouseWheelMove=No
MouseWheelTrim=No
MouseWheelTrimSpeed=1
JoystickTimeout=20
PollGFTQ6=Yes
BlankDisplays=No
FixControlAccel=No
FixMachSpeedBug=No
AutoScanDevices=Yes
VisibilityOptions=No
OneCloudLayer=No
CloudTurbulence=No
CloudIcing=No
GenerateCirrus=No
SuppressCloudTurbulence=No
MaxIce=-4
MinIce=-4
UpperWindGusts=No
SuppressWindTurbulence=No
SuppressWindVariance=No
WindTurbulence=No
TurbulenceRate=1.0,5.0
TurbulenceDivisor=20,20,40,40
SuppressAllGusts=No
MaxSurfaceWind=0
WindLimitLevel=200
WindDiscardLevel=400
WindAjustAltitude=No
WindAjustAltitudeBy=2000
SmoothBySimTime=No
WindSmoothing=No
WindSmoothness=2
WindSmoothAirborneOnly=Yes
PressureSmoothness=0
TemperatureSmoothness=0
DisconnTrimForAP=No
ZeroElevForAPAlt=No
ThrottleSyncAll=No
WhiteMessages=No
ShowPMcontrols=No
SpoilerIncrement=512
MagicBattery=No
RudderSpikeRemoval=No
ElevatorSpikeRemoval=No
AileronSpikeRemoval=No
ReversedElevatorTrim=No
ClockSync=No
ClockSyncMins=5
ClearWeatherDynamics=No
OwnWeatherChanges=No
TimeForSelect=4
LoadFlightMenu=No
LoadPlanMenu=No
PauseAfterCrash=No
BrakeReleaseThreshold=75
SaveDataWithFlights=No
ZapSound=firework
ShortAircraftNameOk=Substring
UseProfiles=Yes
EnableMouseLook=No
DelayedMouseLookZoom=No
Annotate=Yes
NewDeleteVehiclesForAES=No
WideLuaGlobals=Yes
LogOptionProtect=Yes
TimeForLuaClosing=2
ThreadAffinityMask=x0
LuaAffinityMask=x0
ConsoleWindow=730,147,1407,554
FSVersionUsed="Microsoft Flight Simulator X",10.0.61472.0
SimConnectUsed=10.0.61259.0[WideServer]
WideFSenabled=Yes[JoyNames]
AutoAssignLetters=No
2=BU0836X Interface
2.GUID={B2A96040-D917-11E8-8003-444553540000}
1=Logitech Attack 3
1.GUID={B2A96040-D917-11E8-8002-444553540000}[Axes]
PollInterval=10
RangeRepeatRate=10
0=0X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
1=0Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
2=1X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
3=1Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
4=1Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
5=2X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
6=2Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
7=2R,256,D,3,0,0,0 -{ DIRECT: Rudder }-[Buttons]
PollInterval=25
ButtonRepeat=20,10
1=R2,30,C65721,0 -{BRAKES_RIGHT}-
2=R2,31,C65720,0 -{BRAKES_LEFT}-
3=P1,6,K113,8 -{Key press: F2}-
5=R2,28,C65607,0 -{ELEV_TRIM_DN}-
6=P2,27,K90,8 -{Key press: Z}-
7=R0,6,K113,8 -{Key press: F2}-
8=R2,29,C65615,0 -{ELEV_TRIM_UP}-[AutoSave]
Next=4
Interval=60
Files=10
SaveOnGround=No
AutoSaveEnabled=Yes
1=Wed 220318
2=Wed 220517
3=Wed 221608
4=Wed 000506
5=Wed 000606
6=Wed 000705
7=Wed 000805
8=Wed 000905
9=Wed 001004
10=Wed 001104[GPSout]
GPSoutEnabled=No
Port=COM1
Speed=4800
Interval=2000
PosTo6Decimal=No
SimModeIndicator=No
Sentences=[GPSout2]
GPSoutEnabled=No
Port=<none set>
Speed=4800
Interval=2000
PosTo6Decimal=No
SimModeIndicator=No
Sentences=[Sounds]
Path=E:\FSX\Flight Simulator X\Sound\
Device1=Primärer Soundtreiber
Device2=Lautsprecher (Realtek High Definition Audio)
Device3=Realtek Digital Output (Realtek High Definition Audio)[Programs]
Run1=HIDE,"E:\FSX\Flight Simulator X\Aero.bat"[JoystickCalibration]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Elevator=-15862,191,512,16283/16
Throttle=-13184,16253/16
Aileron=-8912,-1754,512,6064/8
Rudder=-15758,713,713,15496[Profile.FSL A320]
1=FSLabs A320-X Gulf Air
2=FSLabs A320-X Airberlin
3=FSLabs A320-X Middle East Airlines
4=FSLabs A320-X Turkish Airlines
5=FSLabs A320-X Royal Jordanian
6=FSLabs A320X CFM Condor_D-AICK
7=FSLabs A320-X Lufthansa[Axes.FSL A320]
RangeRepeatRate=10
0=0X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
1=0Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
2=0Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
3=1Z,256,F,65697,0,0,0 -{ TO SIM: THROTTLE_SET }-
4=2R,256,F,65696,0,0,0 -{ TO SIM: RUDDER_SET }-[JoystickCalibration.FSL A320]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Elevator=-16383,58,512,16383
Rudder=-11267,-697,512,8720
Throttle=-16253,13952
Aileron=-16380,-512,512,16380[Profile.C172R]
1=C172R default[Axes.C172R]
RangeRepeatRate=10
0=0X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
1=0Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
2=1Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
3=2X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
4=2Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
5=2R,256,D,3,0,0,0 -{ DIRECT: Rudder }-[JoystickCalibration.C172R]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Aileron=-16173,-2052,-2052,16184
Elevator=-16111,-91,-91,15856/24
Rudder=-15762,-531,512,16280
Throttle=-16384,13952/16[Buttons.C172R]
0=R2,31,C65720,0 -{BRAKES_LEFT}-
1=R2,30,C65721,0 -{BRAKES_RIGHT}-[Profile.FSL 320]
1=FSLabs A320-X Saudi Arabian Airlines[Axes.FSL 320]
RangeRepeatRate=10
0=0X,256,D,1,0,0,0
1=0Y,256,D,2,0,0,0
2=1Z,256,D,4,0,0,0
3=2R,256,D,3,0,0,0[JoystickCalibration.FSL 320]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Aileron=-16380,-512,512,16380
Elevator=-16383,58,512,16383
Rudder=-15758,713,713,15496
Throttle=-13208,16256/16[Buttons.FSL A320]
0=R1,6,K113,8 -{Key press: F2}-
1=R2,30,C65721,0 -{BRAKES_RIGHT}-
2=R2,31,C65720,0 -{BRAKES_LEFT}-[Profile.B763]
1=Level D Simulations B767-300ER Winglet - DHL G-DHLF
2=Level D Simulations B767-300ER Winglet - Condor Flugdienst (circa 2014) D-ABUA
3=UPS 767-300ER - Winglet
4=Cessna310_DIRFT[Buttons.B763]
0=R1,6,K113,8 -{Key press: F2}-
1=R2,30,C65721,0 -{BRAKES_RIGHT}-
2=R2,31,C65720,0 -{BRAKES_LEFT}-[Axes.B763]
RangeRepeatRate=10
0=0X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
1=0Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
2=0Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
3=1X,256,F,65697,0,0,0 -{ TO SIM: THROTTLE_SET }-
4=1Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
5=2X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
6=2Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
7=2R,256,D,3,0,0,0 -{ DIRECT: Rudder }-[JoystickCalibration.B763]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Aileron=-8176,-512,512,6344
Elevator=-11360,-512,512,14302/16
Rudder=-9945,-336,512,8392
//Throttle=-16384,13545/16
Throttle=-13568,16253/16[Profile.B744]
1=PMDG 747-430 Lufthansa (D-ABVM | 2016)
2=PMDG 747-400ER SVA
3=PMDG 747-4P8ER BAHRAIN AIR A9C-HMK
4=PMDG 747-400 PMDG House (N744GE | 2017)[Buttons.B744]
0=R1,6,K113,8 -{Key press: F2}-
1=R2,30,C65721,0 -{BRAKES_RIGHT}-
2=R2,31,C65720,0 -{BRAKES_LEFT}-
3=P6,3,C70156,0 -{Custom control: <70156>}-
4=P6,4,C70156,1 -{Custom control: <70156>}-
5=P6,5,C70156,2 -{Custom control: <70156>}-
6=P6,6,C70156,3 -{Custom control: <70156>}-
7=P6,7,C70157,1 -{Custom control: <70157>}-
8=P6,8,C70158,0 -{Custom control: <70158>}-
9=P6,9,C70158,1 -{Custom control: <70158>}-
10=P6,16,C70158,2 -{Custom control: <70158>}-
11=P6,17,C70158,3 -{Custom control: <70158>}-
12=P6,18,C70158,4 -{Custom control: <70158>}-
13=P6,19,C70158,5 -{Custom control: <70158>}-
14=P6,20,C70158,6 -{Custom control: <70158>}-
15=P6,21,C70158,7 -{Custom control: <70158>}-[Axes.B744]
RangeRepeatRate=10
0=0X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
1=0Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
2=0Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
3=1Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
4=2X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
5=2Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
6=2R,256,D,3,0,0,0 -{ DIRECT: Rudder }-[JoystickCalibration.B744]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Aileron=-7247,-1401,512,6080
Elevator=-14694,512,665,11656/16
Rudder=-15758,713,713,15496
Throttle=-13208,16256/16[Profile.B737NGX]
1=Boeing 737-8KN NGX Fly Dubai Winglets V2[Buttons.B737NGX]
0=R1,6,K113,8 -{Key press: F2}-
1=R2,30,C65721,0 -{BRAKES_RIGHT}-
2=R2,31,C65720,0 -{BRAKES_LEFT}-
3=P6,3,C69991,0 -{Custom control: <69991>}-
4=P6,4,C69991,1 -{Custom control: <69991>}-
5=P6,5,C69991,2 -{Custom control: <69991>}-
6=P6,6,C69991,3 -{Custom control: <69991>}-
7=P6,7,C69992,536870912 -{Custom control: <69992>}-
8=P6,8,C69993,0 -{Custom control: <69993>}-
9=P6,9,C69993,1 -{Custom control: <69993>}-
10=P6,16,C69993,2 -{Custom control: <69993>}-
11=P6,17,C69993,3 -{Custom control: <69993>}-
12=P6,18,C69993,4 -{Custom control: <69993>}-
13=P6,19,C69993,5 -{Custom control: <69993>}-
14=P6,20,C69993,6 -{Custom control: <69993>}-
15=P6,21,C69993,7 -{Custom control: <69993>}-
18=U6,7,C69992,131072 -{Custom control: <69992>}-
19=P6,24,C70008,2147483647 -{Custom control: <70008>}-
20=P6,25,C70008,536870912 -{Custom control: <70008>}-[Axes.B737NGX]
RangeRepeatRate=10
0=0X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
1=0Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
2=0Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
3=1Z,256,D,4,0,0,0 -{ DIRECT: Throttle }-
4=2X,256,D,1,0,0,0 -{ DIRECT: Aileron }-
5=2Y,256,D,2,0,0,0 -{ DIRECT: Elevator }-
6=2R,256,D,3,0,0,0 -{ DIRECT: Rudder }-[JoystickCalibration.B737NGX]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Aileron=-16380,-512,512,16380
Elevator=-16383,58,512,16383/16
Rudder=-15758,713,713,15496
Throttle=-13208,16256/16[MacroFiles]
1=iFly737
2=leveld767[LuaFiles]
1=ipcReady
2=linda
3=CAR_C90_CD[Traffic Limiter]
TrafficLimit=0
AirportPreference=50
GroundPreference=50
NearerPreference=50
PlannedAirportsPreference=50
TargetFrameRate=0[Profile.B200]
1=Carenado B200 King Air 3[Keys.B200]
1=112,11,L3:R,0 -{ctl+shft+F1: Press=Lua CAR_C90_CD }-[Window.LUA display]
Docked=7354, 2823, 3545, 2451[Profile.C421]
1=Alabeo C421C N7864M
2=Alabeo C421C N421MN[JoystickCalibration.C421]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Aileron=-9033,-2530,512,7424
Elevator=-15862,191,512,16283/16
Rudder=-15758,713,713,15496
Throttle=-13184,16253/16[Monitor]
Monitor0=0,024C,4,0[Profile.F70]
1=Fokker 70 KLM PH-KZO[JoystickCalibration.F70]
AllowSuppressForPFCquad=Yes
ExcludeThrottleSet=Yes
ExcludeMixtureSet=Yes
ExcludePropPitchSet=Yes
SepRevsJetsOnly=No
ApplyHeloTrim=No
UseAxisControlsForNRZ=No
FlapsSetControl=0
FlapDetents=No
ReverserControl=66292
Reverser1Control=66422
Reverser2Control=66425
Reverser3Control=66428
Reverser4Control=66431
MaxThrottleForReverser=256
AileronTrimControl=66731
RudderTrimControl=66732
CowlFlaps1Control=66162
CowlFlaps2Control=66163
CowlFlaps3Control=66164
CowlFlaps4Control=66165
SteeringTillerControl=0
MaxSteerSpeed=60
Aileron=-8632,-2322,512,6872
Elevator=-11400,496,512,14822/16
Rudder=-11147,-921,512,8600
Throttle=-13184,16253/16
trying to extract numbers from string
in FSUIPC Support Pete Dowson Modules
Posted
Update: I was able to solve this with the "transform" function in Mobiflight using "Round($*100, 0)". "Truncate" did not work for some reason, but "Round" did the trick. I will now do a few flights to see if everything really works and then report back.