Jump to content
TheHarvesteR

A fix for Full Axis throttle mapping

Recommended Posts

I can't get ppjoy to install. Even though I've got "test mode" running, the installer still throws a hissy fit about test mode and tells me to enable it, or tries to (and fails, because i have to specify the bcd store) do it itself, then tells me to reboot and try again.

if I just open the installer in 7zip, it's a big nasty pile and I'd have no clue how to install it myself.

Anyone gotten 'ppjoysetup-0-8-4-6.exe' to install on Windows 7 64-bit?

I'm running Win 7 x64 here, and I must agree PPJoy can be a pain to install...

Last week I spent a whole day at work trying to get a computer to run PPJoy... must have restarted that thing like 15 times :P

What happens exactly when you install? does the installer run at all? or does it complain about test mode and quit?

I've found that this supposed auto-test-mode-enabling-installer doesn't really enable test mode... to enable manually, do the following:

open up the command prompt (Start Menu -> Run -> type: cmd) then in there, type:

BCDEDIT -SET TESTSIGNING ON

that should put your OS in test mode... (you may have to reboot here) then try to run the PPJoy installer again. hopefully it'll work.

If the installer did run, but the drivers failed to install, that's another issue I had that day at work... try just adding more PPJoy controllers... for some reason, PPJoy sometimes fails to install the device, and removing and adding it again doesn't seem to work... what did it for me was to create 3 virtual devices... the 3rd one for some reason installed successfully...

PPJoy is a great little program, but it's far from a bug-free experience... I only wish it were updated more frequently... the same goes for GlovePIE...

Hope this helps

Cheers

Share this post


Link to post
Share on other sites

I've got test mode up, verified by the watermark on the lower-right of the screen... however the installer doesn't seem to act on this and executes as if test mode was not enabled.

Share this post


Link to post
Share on other sites

Maybe you try it again with Driver Signature Enforcement Overrider to enable the testmode.

Hope that works :)

I tried the script again. The helicopter doesn't go back in neutralposition if your joystick is in neutral position. So you have to trim the PPJoy axis all the time to get the neutral position.

Harvester, do you know which values the mouse sends to ArmA 2? Is there a scriptcommand to find that out?

var.deltaX = Joystick.x - var.lastX
var.lastX = Joystick.x
var.deltaY = Joystick.y - var.lastY
var.lastY = Joystick.y

PPjoy1.x = var.deltaX * 200.0 // the multiplier is your sensitivity adjustment
PPjoy1.y = var.deltaY * 150.0 // the multiplier is your sensitivity adjustment
//PPjoy1.x = Joystick.x
//PPjoy1.y = Joystick.y

debug = Joystick.X + "   DeltaX: " + var.deltaX + "   PPJoyX: " + PPJoy1.X + "      " + Joystick.Y + "   DeltaY: " + var.deltaY + "   PPJoyY: " + PPJoy1.y

Share this post


Link to post
Share on other sites

Tried it again and the WIP script looks like:

var.deltaX = Joystick.X - var.lastX
var.lastX = Joystick.x
var.deltaY = Joystick.Y - var.lastY
var.lastY = Joystick.y
var.keyTrim = Keyboard.b

if (var.keyTrim)
  PPJoy1.y = 0
  PPJoy1.x = 0
else
   if (var.deltaX == 0)
      PPJoy1.x = Joystick.x
   endif

   if (var.deltaY == 0)
      PPJoy1.y = 0
   endif

   if (var.deltaY > 0)
      if (Joystick.y > 0)
         PPjoy1.y = Joystick.y * 100
      endif
      if (Joystick.y < 0)
         PPJoy1.y = -Joystick.y * 100
      endif
   endif

   if (var.deltaY < 0)
      if (Joystick.y > 0)
         PPjoy1.y = -Joystick.y * 100
      endif
      if (Joystick.y < 0)
         PPJoy1.y = Joystick.y * 100
      endif
   endif
endif


debug = "KeyTrim: " + var.keyTrim + "      JoystickX: " + Joystick.X + "   lastX: " + var.lastX +  "   PPJoyX: " + PPJoy1.X + "  DeltaX: " + var.deltaX +  "     JoystickY:  " + Joystick.Y + "   lastY: " + var.lastY + " PPJoyY: "  + PPJoy1.y + "  DeltaY: " + var.deltaY

Works better than the last script. Maybe i can finish it. :yay:

Share this post


Link to post
Share on other sites

I don't think I can do it better :(

if (!var.init)
  var.sensitivity = 1
  var.test = 0
  var.init = true
endif

var.deltaX = Joystick.X - var.lastX
var.lastX = Joystick.x
var.deltaY = Joystick.Y - var.lastY
var.lastY = Joystick.y
var.keyTrim = Keyboard.b


if (var.keyTrim)
  PPJoy1.y = 0
  PPJoy1.x = 0
else
//    if (var.deltaX == 0)
//       PPJoy1.x = Joystick.x
//    endif

   if (var.deltaX > 0)
      if (Joystick.x > 0)
         PPjoy1.x = Joystick.x * var.sensitivity
      endif
      if (Joystick.x < 0)
         PPJoy1.x = -Joystick.x * var.sensitivity
      endif
   endif

   if (var.deltaX < 0)
      if (Joystick.x > 0)
         PPjoy1.x = -Joystick.x * var.sensitivity
      endif
      if (Joystick.x < 0)
         PPJoy1.x = Joystick.x * var.sensitivity
      endif
   endif

//    if (var.deltaY == 0)
//       PPJoy1.y = 0
//    endif

   if (var.deltaY > 0)
      if (Joystick.y > 0)
         PPjoy1.y = Joystick.y * var.sensitivity
      endif
      if (Joystick.y < 0)
         PPJoy1.y = -Joystick.y * var.sensitivity
      endif
   endif

   if (var.deltaY < 0)
      if (Joystick.y > 0)
         PPjoy1.y = -Joystick.y * var.sensitivity
      endif
      if (Joystick.y < 0)
         PPJoy1.y = Joystick.y * var.sensitivity
      endif
   endif
endif


debug = "KeyTrim: " + var.keyTrim + "      JoystickX: " + Joystick.X + "   lastX: " + var.lastX +  "   PPJoyX: " + PPJoy1.X + "  DeltaX: " + var.deltaX +  "     JoystickY:  " + Joystick.Y + "   lastY: " + var.lastY + " PPJoyY: "  + PPJoy1.y + "  DeltaY: " + var.deltaY

Share this post


Link to post
Share on other sites

Hey, Im trying to get this script to work for me and am having some trouble. I have the X52 pro as well, my problem is that in the control panel test area when i run the script and move the throttle the input moves all over the spectrum and can't seem to find how much power im putting in unless i leave it still. In ArmA this is translating into only feeding power at 100% throttle.

Heres my script:

PPJoy3.analog2 = (MapRange(-Joystick3.Z, -1, 1, 0, 1))
debug = joystick3.z

Share this post


Link to post
Share on other sites

Or more easily if you are on windows 7 go

ctrl pannel

devices and printers

Then right click on your joystick e.g. Cyborg X

Game controller settings

Properties

Deadzones

Find your Z Axis details

You will have 4 markers you can slide around to customise your axis

For ARMA 2 you want to first of all right click and ensure the deadzones are not linked

Then drag all 3 of the left most markers to the far left and right most to the far right.

You can test what this does on the TEST page after applying.

Basically to begin with the slider will go up very quickly with minimal movement until halfway, where it will slow down and cover the remaining axis very slowly.

It isnt perfect there is effectively a small deadzone at the beginning of the throttle to about 5-10% throttle, but it is effective, requires very little mucking around with programs and has absolutely zero risk of downloading the wrong thing and being riddled with trojans.

Also if you play other games you must remember to set it back to normal (clear deadzone).

Something similar can be done on XP however it is slightly more complicated.

Share this post


Link to post
Share on other sites

When i'm using this on my hotas, i can't take off with chopper unless i'm on 51% of throttle. When i put the throttle up to like 5% , engine of chopper starts, but i can't take off..i have to put the slider on more then the middle. I think thats not the intention of this script right?

Share this post


Link to post
Share on other sites

I still don't get it

This isn't the way a real chopper works, its not like a jet, there should be no decrease thrust at all. As You stand 0-50% thrust in a chopper does absolutely nothing for You in game without this fix. Being at 1% is the same as being at 49%. The increase thrust should be mapped to the full scope of the throttle 0-100%, not just the top 50-100%
I did exactly what you said wiht ppjoy and pie, i mapped it ingame. When i push the throttle away from me, nothing happens till i reach 51% , then chopper starts taking off

Share this post


Link to post
Share on other sites

Whilst this is supposedly fixed in the beta by mapping both axis of the throttle to thrust, I just tried this and found it still doesn't work as well as using PPJoy/GlovePIE. With the later, by adjusting the sensitivity to about 60% in ArmaII, in Auto-Hover with the throttle at mid-point it maintains altitude and above/below midpoint I can increase/decrease altitude at variable rates. Mapping the throttle in ArmaII directly, at mid-point and even below the helicopter increases altitude when in auto-hover and I don't have the same precision in controlling altitude. I tried adjusting the sensitivity all the way from 60% down to 0% but it doesn't make any difference, unlike with the PPJoystick where it allows me to fine-tune the collective response to achieve "maintain altitude at mid-point".

Share this post


Link to post
Share on other sites

How do you adjust the sens for throttle ingame, i mean i use ppjoy and glovepie too, and its superb. but for me it's not really middle pos when i hover. Which sens did you put to 60% ? I'm not at home and i never touched the axis like that..and additionally, i'm stupid :)

Share this post


Link to post
Share on other sites

If you click on Controllers at the bottom, you'll see the PPJoystick and then highlight that and click on Customise and you'll see the Sensitivity bars. For me it's the Z axis I needed to adjust but it will be whichever axis you have mapped to Thrust (Analogue).

Share this post


Link to post
Share on other sites

allright, i try that out when i'm home..I'd like to see what happens if i play with the value, never did that before

Share this post


Link to post
Share on other sites

Using beta 94700 (or 95099), sensitivity now works with the Hotas X Throttle (Z Axis) directly, but it's still not possible to adjust it so that mid-point maintains altitude and it only seems to change the time it takes for the collective to change in response to throttle adjustments, so I'll continue using PPJoy for now.

Share this post


Link to post
Share on other sites
Hello,

Just wanted to share with everyone the solution I came up with for mapping the entire range of the throttle slider to the analogue throttle control in ArmA.

.... stuff ....

Best of luck to all :)

Cheers

HarvesteR

Well, I had to do it a bit differently to get things to come together and play.

To even get the throttle to register in GlovePIE I had to use the "Joy#."-function rather than just "Joystick.". The "Joystick."-function only seemed to register events originating from the actual joystick, not the throttle which, obviously, was a real bummer.

I came across a simple GlovePIE script that helped immensely with ID-ing your different control devices if there's more than 1 controller connected to your computer, which is the case with the Saitek X55 Rhino H.O.T.A.S.

if pressed(Joy1.Button1){
  say "Controller 1 Button 1 pressed"
}

if pressed(Joy2.Button1){
  say "Controller 2 Button 1 pressed"
}

if pressed(Joy3.Button1){
  say "Controller 3 Button 1 pressed"
}

if pressed(Joy4.Button1){
  say "Controller 4 Button 1 pressed"
}

if pressed(Joy5.Button1){
  say "Controller 5 Button 1 pressed"
}

if pressed(Joy6.Button1){
  say "Controller 6 Button 1 pressed"
}

if pressed(Joy7.Button1){
  say "Controller 7 Button 1 pressed"
}

if pressed(Joy8.Button1){
  say "Controller 8 Button 1 pressed"
}

if pressed(Joy1.Button9){
  say "Controller 9 Button 1 pressed"
}

if pressed(Joy10.Button1){
  say "Controller 10 Button 1 pressed"
}

As it turned out, my X55 RIGHT throttle lever responded via Joy2 on the Y-axis for some reason and the stick hailed from Joy9. My personal final version of your original code now looks like this and works flawlessly on my setup:

PPJoy3.analog2 = (MapRange(-Joy2.y, -1, 1, 0, 1))

Cheers for your effort and time spent on educating the internets.

ta-ta

Edited by JC_
speeling

Share this post


Link to post
Share on other sites

Hallo,

 

ppjoy hasnt windows signt drivers so with the new battleye update the script cant be used in multiplayer, because you need windows testing mode to use unsigned drivers.

another virtual joystick driver calld vjoy (link: http://sourceforge.net/projects/vjoystick/?source=typ_redirect)has a signt driver and work with the manipulater "freepie"(link: http://andersmalmgren.github.io/FreePIE/) which is the same as glovepie but open source.

This will work without using the testing mode but there is a new script needed. I tryed but Im not a programmer.  

Can someone write a script in freepie using vjoy? Or is there another option to use the full 100% of the throttle?

Share this post


Link to post
Share on other sites

This worked for me. (Thrustmaster Warthog HOTAS Throttle, with Joystick and CH Pro Pedals) I used vJoy and FreePIE. Nothing fancy, but it's something and works reasonably for a first iteration of the script. Tried it with AH-6 for a few minutes.

 

You may need to change the number in brackets after "joystick" to correspond to your setup, as per previous posts in this thread have mentioned. So nothing new there...

def update():

	vJoy[0].x = (joystick[2].z)
	
if starting:
	virtualAxisMax = vJoy[0].axisMax
	joystick[2].setRange(0, virtualAxisMax)
	freeTrack.update += update
	
#diagnostics.watch(joystick[2].z)
#diagnostics.watch(vJoy[0].x)

The last two commented lines are for dev/debug purposes, uncomment them if you want to view the raw values in vJoyMonitor.

 

(Haven't tried it with how it affects the plane throttle, which is mapped to the same throttle but directly without vJoy/FreePIE modifications inbetween. Will report back if it fouls things up and the script needs to be edited.)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×