Jump to content
The simFlight Network Forums
Sign in to follow this  
Skavsta

rotaries.lua - no changes in speed

Recommended Posts

Hi!
I have installed installed several HIDs. Some of them are connected to rotaries to adjust VOR OBI, ADF, altimeter  etc.
Now I want to use the rotaries.lua to get more rotation speed while turning the OBI or the altimeter.  I tried different entries in rotation.lua and FSUIPC.INI, searched in this forum, but it does not work.
When I turn the knob I get the normal assignments in FSUIPC-window. But turning fast it should be something like joystick 64 button 0, or not?
All other HID-operations work fine, inkl. all button and offset assignments. The buttons I want to use for rotation.lua have no assignments, of course!

My configs:
WIN 10, P3D45, newest FSUIPC reg.

FSUIPC.INI:

[JoyNames]
AutoAssignLetters=No
0=Saitek Pro Flight Rudder Pedals
0.GUID={157FB2C0-7637-11E9-8005-444553540000}
R=Saitek Pro Flight Rudder Pedals
R.GUID={157FB2C0-7637-11E9-8005-444553540000}

1=Saitek Pro Flight Yoke
1.GUID={15CE9610-7637-11E9-8006-444553540000}
Y=Saitek Pro Flight Yoke
Y.GUID={15CE9610-7637-11E9-8006-444553540000}

2=CH THROTTLE QUADRANT
2.GUID={1D3433B0-7637-11E9-8007-444553540000}
Q=CH THROTTLE QUADRANT
Q.GUID={1D3433B0-7637-11E9-8007-444553540000}

3=BU0836X Interface
3.GUID={F94574E0-A94F-11E9-8001-444553540000}
A=BU0836X Interface
A.GUID={F94574E0-A94F-11E9-8001-444553540000}

4=Button Box Interface 1
4.GUID={F94574E0-A94F-11E9-8002-444553540000}
B=Button Box Interface 1
B.GUID={F94574E0-A94F-11E9-8002-444553540000}

5=Button Box Interface 2
5.GUID={F9459BF0-A94F-11E9-8003-444553540000}
C=Button Box Interface 2
C.GUID={F9459BF0-A94F-11E9-8003-444553540000}

FSUIPX.joyScan:

Good?, flags, VID, PID, Name, INIid, REGid, RegEntry, INIguid, REGguid, HIDguid, ValsOK?, ReadsOk?

,,, HIDscanning completed

N, x00, x1DD2, x1142, , -1, -1, 0, {NULL}, {NULL}, {F9459BF0-A94F-11E9-8003-444553540000}, Y, N
N, x00, x1DD2, x1001, , -1, -1, 0, {NULL}, {NULL}, {F94574E0-A94F-11E9-8001-444553540000}, Y, N
N, x00, x068E, x00FA, , -1, -1, 0, {NULL}, {NULL}, {1D3433B0-7637-11E9-8007-444553540000}, Y, N
N, x00, x06A3, x0BAC, , -1, -1, 0, {NULL}, {NULL}, {15CE9610-7637-11E9-8006-444553540000}, Y, N
N, x00, x1DD2, x1141, , -1, -1, 0, {NULL}, {NULL}, {F94574E0-A94F-11E9-8002-444553540000}, Y, N
N, x00, x06A3, x0763, , -1, -1, 0, {NULL}, {NULL}, {157FB2C0-7637-11E9-8005-444553540000}, Y, N

,,, REGscanning completed

N, x00, x1DD2, x1142, Button Box Interface 2, -1, 5, 0, {NULL}, {F9459BF0-A94F-11E9-8003-444553540000}, {F9459BF0-A94F-11E9-8003-444553540000}, Y, N
N, x00, x1DD2, x1001, BU0836X Interface, -1, 3, 0, {NULL}, {F94574E0-A94F-11E9-8001-444553540000}, {F94574E0-A94F-11E9-8001-444553540000}, Y, Y
N, x00, x068E, x00FA, CH THROTTLE QUADRANT, -1, 2, 0, {NULL}, {1D3433B0-7637-11E9-8007-444553540000}, {1D3433B0-7637-11E9-8007-444553540000}, Y, Y
N, x00, x06A3, x0BAC, Saitek Pro Flight Yoke, -1, 1, 0, {NULL}, {15CE9610-7637-11E9-8006-444553540000}, {15CE9610-7637-11E9-8006-444553540000}, Y, Y
N, x00, x1DD2, x1141, Button Box Interface 1, -1, 4, 0, {NULL}, {F94574E0-A94F-11E9-8002-444553540000}, {F94574E0-A94F-11E9-8002-444553540000}, Y, N
N, x00, x06A3, x0763, Saitek Pro Flight Rudder Pedals, -1, 0, 0, {NULL}, {157FB2C0-7637-11E9-8005-444553540000}, {157FB2C0-7637-11E9-8005-444553540000}, Y, Y

,,, User settings imported

N, x00, x1DD2, x1142, Button Box Interface 2, 5, 5, 0, {F9459BF0-A94F-11E9-8003-444553540000}, {F9459BF0-A94F-11E9-8003-444553540000}, {F9459BF0-A94F-11E9-8003-444553540000}, Y, N
N, x00, x1DD2, x1001, BU0836X Interface, 3, 3, 0, {F94574E0-A94F-11E9-8001-444553540000}, {F94574E0-A94F-11E9-8001-444553540000}, {F94574E0-A94F-11E9-8001-444553540000}, Y, Y
N, x00, x068E, x00FA, CH THROTTLE QUADRANT, 2, 2, 0, {1D3433B0-7637-11E9-8007-444553540000}, {1D3433B0-7637-11E9-8007-444553540000}, {1D3433B0-7637-11E9-8007-444553540000}, Y, Y
N, x00, x06A3, x0BAC, Saitek Pro Flight Yoke, 1, 1, 0, {15CE9610-7637-11E9-8006-444553540000}, {15CE9610-7637-11E9-8006-444553540000}, {15CE9610-7637-11E9-8006-444553540000}, Y, Y
N, x00, x1DD2, x1141, Button Box Interface 1, 4, 4, 0, {F94574E0-A94F-11E9-8002-444553540000}, {F94574E0-A94F-11E9-8002-444553540000}, {F94574E0-A94F-11E9-8002-444553540000}, Y, N
N, x00, x06A3, x0763, Saitek Pro Flight Rudder Pedals, 0, 0, 0, {157FB2C0-7637-11E9-8005-444553540000}, {157FB2C0-7637-11E9-8005-444553540000}, {157FB2C0-7637-11E9-8005-444553540000}, Y, Y

,,, Values matched and decided

(Y), x16, x1DD2, x1142, Button Box Interface 2, 5, 5, 0, {F9459BF0-A94F-11E9-8003-444553540000}, {F9459BF0-A94F-11E9-8003-444553540000}, {F9459BF0-A94F-11E9-8003-444553540000}, Y, N
Y, x1E, x1DD2, x1001, BU0836X Interface, 3, 3, 0, {F94574E0-A94F-11E9-8001-444553540000}, {F94574E0-A94F-11E9-8001-444553540000}, {F94574E0-A94F-11E9-8001-444553540000}, Y, Y
Y, x1E, x068E, x00FA, CH THROTTLE QUADRANT, 2, 2, 0, {1D3433B0-7637-11E9-8007-444553540000}, {1D3433B0-7637-11E9-8007-444553540000}, {1D3433B0-7637-11E9-8007-444553540000}, Y, Y
Y, x1E, x06A3, x0BAC, Saitek Pro Flight Yoke, 1, 1, 0, {15CE9610-7637-11E9-8006-444553540000}, {15CE9610-7637-11E9-8006-444553540000}, {15CE9610-7637-11E9-8006-444553540000}, Y, Y
(Y), x16, x1DD2, x1141, Button Box Interface 1, 4, 4, 0, {F94574E0-A94F-11E9-8002-444553540000}, {F94574E0-A94F-11E9-8002-444553540000}, {F94574E0-A94F-11E9-8002-444553540000}, Y, N
Y, x1E, x06A3, x0763, Saitek Pro Flight Rudder Pedals, 0, 0, 0, {157FB2C0-7637-11E9-8005-444553540000}, {157FB2C0-7637-11E9-8005-444553540000}, {157FB2C0-7637-11E9-8005-444553540000}, Y, Y

FSUIPC.log:
Prepar3D.exe version = 4.5.12.30293
Reading options from "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\FSUIPC5.ini"
Checking the Registrations now ...

FSUIPC5 Key is provided
WIDEFS7 not user registered, or expired
        0 System time = 22/07/2019 09:13:47
        0 FLT path = "C:\Users\Gunnar\Documents\Prepar3D v4 Files\"
        0 Using DialogMode
       31 FS path = "C:\Program Files\Lockheed Martin\Prepar3D v4\"
      125 ---------------------- Joystick Device Scan -----------------------
      125 Product= Button Box Interface 2
      125    Manufacturer= Leo Bodnar
      125    Serial Number= B51344
      125    Vendor=1DD2, Product=1142 (Version 1.4)
      140    GUIDs returned for product: VID_1DD2&PID_1142:
      140       GUID= {F9459BF0-A94F-11E9-8003-444553540000}
      140       Details: Btns=128, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X0,Y0,Z0
      140 Product= BU0836X Interface
      140    Manufacturer= Leo Bodnar
      140    Serial Number= B39900
      140    Vendor=1DD2, Product=1001 (Version 1.36)
      140    GUIDs returned for product: VID_1DD2&PID_1001:
      140       GUID= {F94574E0-A94F-11E9-8001-444553540000}
      140       Details: Btns=32, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R4095,U4095,V4095,X4095,Y4095,Z4095
      140 Product= CH THROTTLE QUADRANT
      140    Manufacturer= CH PRODUCTS
      140    Vendor=068E, Product=00FA (Version 0.0)
      140    GUIDs returned for product: VID_068E&PID_00FA:
      140       GUID= {1D3433B0-7637-11E9-8007-444553540000}
      140       Details: Btns=12, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R255,U255,V255,X255,Y255,Z255
      140 Product= Saitek Pro Flight Yoke
      140    Manufacturer= Saitek
      140    Vendor=06A3, Product=0BAC (Version 3.2)
      140    GUIDs returned for product: VID_06A3&PID_0BAC:
      140       GUID= {15CE9610-7637-11E9-8006-444553540000}
      140       Details: Btns=23, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U255,V255,X1023,Y1023,Z255
      140 Product= Button Box Interface 1
      140    Manufacturer= Leo Bodnar
      140    Serial Number= B51406
      140    Vendor=1DD2, Product=1141 (Version 1.4)
      140    GUIDs returned for product: VID_1DD2&PID_1141:
      140       GUID= {F94574E0-A94F-11E9-8002-444553540000}
      140       Details: Btns=128, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R0,U0,V0,X0,Y0,Z0
      140 Product= Saitek Pro Flight Rudder Pedals
      140    Manufacturer= Saitek
      140    Vendor=06A3, Product=0763 (Version 1.0)
      140    GUIDs returned for product: VID_06A3&PID_0763:
      140       GUID= {157FB2C0-7637-11E9-8005-444553540000}
      140       Details: Btns=0, POVs=(0, 0, 0, 0), Cal=x00000000, Max=R511,U0,V0,X127,Y127,Z0
      140 -------------------------------------------------------------------
      156 Device acquired for use:
      156    Joystick ID = 5 (Registry okay)
      156    5=Button Box Interface 2
      156    5.GUID={F9459BF0-A94F-11E9-8003-444553540000}
      171 Device acquired for use:
      171    Joystick ID = 3 (Registry okay)
      171    3=BU0836X Interface
      171    3.GUID={F94574E0-A94F-11E9-8001-444553540000}
      171 Device acquired for use:
      171    Joystick ID = 2 (Registry okay)
      171    2=CH THROTTLE QUADRANT
      171    2.GUID={1D3433B0-7637-11E9-8007-444553540000}
      171 Device acquired for use:
      171    Joystick ID = 1 (Registry okay)
      171    1=Saitek Pro Flight Yoke
      171    1.GUID={15CE9610-7637-11E9-8006-444553540000}
      171 Device acquired for use:
      171    Joystick ID = 4 (Registry okay)
      171    4=Button Box Interface 1
      171    4.GUID={F94574E0-A94F-11E9-8002-444553540000}
      171 Device acquired for use:
      171    Joystick ID = 0 (Registry okay)
      171    0=Saitek Pro Flight Rudder Pedals
      171    0.GUID={157FB2C0-7637-11E9-8005-444553540000}
      171 -------------------------------------------------------------------
      390 LogOptions=00000000 00000001
      390 -------------------------------------------------------------------
      390 SimConnect_Open succeeded: waiting to check version okay
      390 Opened separate AI Traffic client okay
      390 ### PDKmodeHelper callback registered
     4765 Running in "Lockheed Martin® Prepar3D® v4", Version: 4.5.12.30293 (SimConnect: 4.5.0.0)
     4765 Initialising SimConnect data requests now
     4765 FSUIPC Menu entry added
     4781 ... Using Prepar3D with Academic License
     4812 C:\Users\Gunnar\Documents\Prepar3D v4 Files\all9.fxml
     4812 C:\Users\Gunnar\Documents\Prepar3D v4 Add-ons\A2A\SimObjects\Airplanes\A2A_C172\C172.air
     9093 ### The user object is 'A2A C172R N7274H'
     9093 ### Mode is NORMAL
    12281 ### Mode: PAUSE on
    40171 Loading Complete ...
    40187 ### Mode is NORMAL
    40968 User Aircraft ID 2 supplied, now being used
    40968 Aircraft loaded: running normally now ...
    41015 System time = 22/07/2019 09:14:28, Simulator time = 14:00:46 (21:00Z)
    41171 Aircraft="A2A C172R N7274H"
    48015 -------------------- Starting everything now ----------------------
    48062 LUA.0: beginning "C:\Program Files\Lockheed Martin\Prepar3D v4\Modules\rotaries.lua"
    48062 LUA.0: ...les\Lockheed Martin\Prepar3D v4\Modules\rotaries.lua:1
    48062 LUA.0: Global: ipcPARAM = 0
    48062 LUA.0: ...les\Lockheed Martin\Prepar3D v4\Modules\rotaries.lua:2
    48062 LUA.0: Global: Vendor = 1DD2
    48078 LUA.0: ...les\Lockheed Martin\Prepar3D v4\Modules\rotaries.lua:3
    48078 LUA.0: Global: Product = 1001
    48078 LUA.0: ...les\Lockheed Martin\Prepar3D v4\Modules\rotaries.lua:10
    48078 LUA.0: Global: Device = 3
    48078 LUA.0: ...les\Lockheed Martin\Prepar3D v4\Modules\rotaries.lua:16
    48078 LUA.0: Global: Rotaries = table: 000001C3DF2C5F10
    48093 LUA.0: ...les\Lockheed Martin\Prepar3D v4\Modules\rotaries.lua:18
    48093 LUA.0: Global: dev = 0
    48109 LUA.0: ...les\Lockheed Martin\Prepar3D v4\Modules\rotaries.lua:19
    48109 LUA.0: Could not open HID
    48109 LUA.0: ...les\Lockheed Martin\Prepar3D v4\Modules\rotaries.lua:20
    49203 Advanced Weather Interface Enabled


rotaries.lua:

Vendor = "1DD2"
Product = "1001"
Device = 3 -- Multiple devices of the same name need increasing Device numbers

-- Use separate Lua plug-ins for separate cards!

-- NOTE: this can handle up to 16 rotaries only, using the first 64 "virtual buttons"
-- List the pairs here:

Rotaries = {22, 23 }


...

...

Thanks for help!

 

 

 

 

Share this post


Link to post
Share on other sites
2 hours ago, Skavsta said:

Vendor = "1DD2"
Product = "1001"
Device = 3 -- Multiple devices of the same name need increasing Device numbers

Why have you got Device = 3? You only appear to have one device with that Vendor and Product number! You are telling FSUIPC to select the third such device, which doesn't exist!

Pete

 

Share this post


Link to post
Share on other sites

ah...sorry. I assumed that I have to select the #3 in the joysticks-section of FSUIPC.cfg

Will try it later and report - thanks a lot!

Share this post


Link to post
Share on other sites

Have changed the entry DEVICE = 3 to DEVICE = 1.

But I still read the normal joystick and button numbers in the fsuipc-interface while turning😯

Share this post


Link to post
Share on other sites
1 hour ago, Skavsta said:

But I still read the normal joystick and button numbers in the fsuipc-interface while turning😯

Since they also look like normal joysticks you'll get both. You will need to suppress the joyskic #3 axes using the button provided, i think it is top right.

Pete

 

Share this post


Link to post
Share on other sites

The joysticks #3, #4 and #5 do not generate axes.
I get no axis-assigment while clicking "rescan" in the FSUIPC-interface (axis-assignment) and then turning the rotaries. The field "ignore axis" remains grey/inactive.

The #3, #4 and #5 are USB-boards with 32 pins for buttons (www.leobodnar.com).

I will play and test this evening, f.e. flash new firmware. But I am sure that my configuration is buggy.

Share this post


Link to post
Share on other sites
2 hours ago, Skavsta said:

The joysticks #3, #4 and #5 do not generate axes.

Of course. Apologies. I forgot the ignore option only applied to axes.

The only reason you are generating "virtual button" presses is for assignment in FSUIPC, right? Instead, why not simply program the action you want directly into the Lua. i.e. use ipc.control to send whatever it is you wuold be assigning to? More efficinet really.

However, there's another method which saves all that Lua serial USB handling and relies on Windows instead.. The ROTARIES.LUA file you are using was intended for devices which do not register as regular joysticks in Windows. for those which do there is no need at all to have all that stuff.

Instead you can read the buttons directly.  Have the Lua pre-loaded via [Auto] and use event.button to act on the button changes -- both on and off. If the time between them is short it is being turned quickly, so you do one thinmg, if else do the other (via ipc.control).

One catch. The joystick must be being scanned by FSUIPC for this to work -- only scanned joysticks can cause events to be detected by normal Lua functions.  So you need at least one button assigned in FSUIPC, though that can be to something innocuous.

Pete

 

Share this post


Link to post
Share on other sites
10 hours ago, Pete Dowson said:

Of course. Apologies. I forgot the ignore option only applied to axes.

Ah! I remembered (but only because John mentioned it in another thread!). There is a facility to Ignore specified buttons!

See the Advanced User's guide, search for "IgnoreThese", in the Button Programming section. You can list all the 'real' buttons so that the assigned 'virtual' buttons can be seen and assigned.

So, if you want the easiest way out then that's the answer.

Sorry I didn't remember this before. I am getting too old! 😞

Pete

 

Share this post


Link to post
Share on other sites

Pete, how would be the simmers world without your support - many, many thanks!

I will try these things during the next days. Not too much time to play with my sim due to work.
But You will get response!

Have a nice day!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

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

Create an account

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

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

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