davidk64 Posted August 2 Report Posted August 2 In P3D v5 with MILVIZ UH-1 helicopter. I enable logging of axis control and twist the collective grip. Looking at the log I think that corresponds to PROP_PITCH_SET. So I go into FSUIPC and assign an axis on my joystick to this variable but alas it doesn't work. If I instead assign the joystick axis to say throttle it works as expected raising and lowering the collective. Any thoughts on what I'm doing wrong please? FSUIPC6.log FSUIPC6.ini
John Dowson Posted August 6 Report Posted August 6 You are not doing anything wrong - just use what works. I don't know why its logging something different from the VC.
davidk64 Posted August 6 Author Report Posted August 6 Hi John, my message has put you slightly wrong. I meant that mapping the joystick axis to throttle worked which demonstrated to me that the chosen axis wasn't the issue (I'm trying to use a slider for the stick twist). So at present I am unable to map the slider to the twist grip. I went back and logged what happens when I assign SET_PROP_PITCH to my joystick axis. Looking at the log first you'll see the result of interacting with the twist using the mouse then with my joystick axis. You'll notice with the mouse the zero parameter entries stop while the twist is engaged. In contrast they continue in addition to the entries generated by my using the joystick. So I wonder whether while I am using the joystick some vendor software is continuing to interact with P3D regarding the twist axis? I also tried Axis Propeller Set. I think you are going to say it's something weird about this vendor Heli that unfortunately FSUIPC can't help with alas 🙂 FSUIPC6.log
John Dowson Posted August 6 Report Posted August 6 7 minutes ago, davidk64 said: I meant that mapping the joystick axis to throttle worked which demonstrated to me that the chosen axis wasn't the issue (I'm trying to use a slider for the stick twist). So at present I am unable to map the slider to the twist grip. So, the throttle axis works to control the collective. So why can't you assign the slider to the throttle axis? 10 minutes ago, davidk64 said: I went back and logged what happens when I assign SET_PROP_PITCH to my joystick axis. Looking at the log first you'll see the result of interacting with the twist using the mouse then with my joystick axis. You'll notice with the mouse the zero parameter entries stop while the twist is engaged. In contrast they continue in addition to the entries generated by my using the joystick. So I wonder whether while I am using the joystick some vendor software is continuing to interact with P3D regarding the twist axis? So, assigning your slider to the throttle axis results in PROP_PITCH_SET controls being logged with a parameter of 0? When you say 'mapping the joystick axis to throttle worked', did this result in PROP_PITCH_SET being logged with a parameter? Can you please show me your MILVIZ UH-1.ini file, both with assignments when the collective assignment is mapped to a joystick axis and it works, and another when it is mapped to the slider and it doesn't work. If an assignment to a control works on one axis, it should work on another. Do you see the in/out values change in the assignment panel when mapped to the slider? 22 minutes ago, davidk64 said: So I wonder whether while I am using the joystick some vendor software is continuing to interact with P3D regarding the twist axis? Do you mean the twist axis in the VC? An axis is just an axis, it shouldn't matter if this is a twist axis, a slider or a joystick/yoke. You do have controllers set to ON in P3D: Quote 484 Controllers are set to ON, using DirectInput within P3D So please check that your axes are not also assigned in P3D. Bet to disable controllers in P3D if assigning in FSUIPC. I see there are also a lot of aileron, elevator and rudder controls logged, all with a 0 parameter. What is generating these?
davidk64 Posted August 6 Author Report Posted August 6 I've explained this all wrong! Let me start again please. The collective stick gets raised up and down and I have that assigned to the throttle axis in P3D which is working fine. The twist grip on the collective controls something else. This is what I'm trying to map to my joystick using FSUIPC. I tried mapping to the propellor axis within P3D and that didn't work. I've tried mapping to PROP_SET_PITCH in FSUIPC and also to Axis Propellor Set neither of which work. I don't feel there is anything else to try. I guess I hoped there was something I'd done wrong you might pick up. Please don't spend any more time on this - I'll just stick to using the mouse for the twist grip - I believe something in the vendor implementation is preventing the use of FSUIPC to map to the twist grip axis on the collective. Thanks for taking a look. P.S. I'll post on a helicopter forum and see if anybody succeeded in mapping to the twist axis back in the day. I can't be the first to try and do this 🙂
John Dowson Posted August 6 Report Posted August 6 28 minutes ago, davidk64 said: I tried mapping to the propellor axis within P3D and that didn't work. I've tried mapping to PROP_SET_PITCH in FSUIPC and also to Axis Propellor Set neither of which work. I don't feel there is anything else to try. I guess I hoped there was something I'd done wrong you might pick up. Please don't spend any more time on this - I'll just stick to using the mouse for the twist grip - I believe something in the vendor implementation is preventing the use of FSUIPC to map to the twist grip axis on the collective. Thanks for taking a look. There is nothing preventing the use in the of FSUIPC as you say you cannot even assign this in P3D. If there is no P3D axis that controls this, then you cannot assign to this. You should ask the helicopter developers how to control this twist operation. You could maybe try listing the lvars to see if any of them look applicable. If there is an lvar for this, you would need to assign your axis to write its value to a free/spare FSUIPC offset, then have a lua script that monitors the offset, calibrates the axis value and then use this to set the lvar. 34 minutes ago, davidk64 said: P.S. I'll post on a helicopter forum and see if anybody succeeded in mapping to the twist axis back in the day. I can't be the first to try and do this 🙂 Yes, - let me know if you get a response. John
John Dowson Posted August 6 Report Posted August 6 20 minutes ago, davidk64 said: How do I list the lvars please? There is an FSUIPC-added control you can use: List Local Panel Vars. Assign a spare button or key press to that. Alternatively, there is a lua plugin provided - log lvars.lua, in the Example LUA plugins package in your FSUIPC6 documents folder.
davidk64 Posted August 7 Author Report Posted August 7 Thanks John. I checked the list of lvars and this one looks promising L:collective_grip I checked its value when grip fully twisted on and its 96. From here you list several steps: 1. "assign your axis to write its value to a free/spare FSUIPC offset" 2. "have a lua script that monitors the offset" 3. "calibrates the axis value" 4. "use this to set the lvar" I'm interested to try and follow these steps but I'm struggling to find how to do them in the documentation though I'm sure it's all there somewhere. Are you able to point me to the relevant sections or some tutorial online please?
John Dowson Posted August 7 Report Posted August 7 1 hour ago, davidk64 said: I checked its value when grip fully twisted on and its 96. And is it 0 when off? If so, I would expect thar the lvar range is 0 - 100. 1 hour ago, davidk64 said: I'm interested to try and follow these steps but I'm struggling to find how to do them in the documentation though I'm sure it's all there somewhere. Are you able to point me to the relevant sections or some tutorial online please? First assign your axis to an offset by checking the Send to FSUIPC Offset in the axis assignment panel. As this will be holding an axis range (-16384 to +16383), you can assign to Offset Word Set and you can use offset 6420 (first offset of PMDG data area). Then create a lua script, lets call it Milviz-UH1-grip.lua, and add the following: local offset=0x6420 function GripAxis(offset, value) -- ipc.log("Offset value: " .. value) -- value will be in range -16384 to +16383 - convert this to range 0-100 valueCalibrated = (value + 16384) / 327.67 -- set lvar ipc.writeLvar("L:collective_grip", valueCalibrated) end event.offset(offset, "SW","GripAxis") ipc.log("MILVIZ UH1 Collective Grip Lua started!") You then need to have this lua script auto-started, so add the following to your MILVIZ UH1.ini file: [Auto] 1=Lua Milviz-UH1-grip Try that. If you have issues, try uncommenting that initial ipc.log statement, and set logging for Lua Plugins to see what the issue is. You can also post your log file here and I can take a look.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now