Board index FlightGear Support Hardware

FAQs: customizing joystick controls; XP/Vista joystick issue

Joysticks, pedals, monitors.

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby sim » Thu Feb 28, 2013 11:52 am

2 buttons used for rudder? Does it not have a suitable rudder axis?
Also If it has a trigger button at top of stick you could use that as a modifier.
That'll double the uses you can get out of the other buttons. ( 8 buttons otherwise doesn't give many choices)
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby EGQK1 » Thu Feb 28, 2013 9:21 pm

Thank you very much for your reply Sim
no axis for rudder correct
use trigger (button 1)as modifier correct
that is what I am trying to do with
<button n="1+2">
<desc>trigger cannon</desc>
<binding>
<command>nasal</command>
<script>controls.armament.trigger.cannon(1,-1)</script>
</binding>
<mod-up>
<binding>
<command>nasal</command>
<script>controls.armament.trigger.cannon(0,-1)</script>
</binding>
</mod-up>
</button>
but my syntax is wrong n="1+2" wont work
tried thinking up ,down,sideways and standing on my head
I know the syntax is stupid I just cant see how stupid

I want to use this joystick for the arms control

the flying joystick is 6 channel 2.4ghz RC programable controler
works perfect took me a long time to write the code
here it is if you know where to post it for others to use

HK-T6A V2 hobbyking.com

<?xml version="1.0" encoding="utf-8"?>
<!--
************************************************************************
* Bindings for HK-T6AV2 radio controler.
*
*
* Axis 0: rudder
* Axis 1: elevator
* Axis 2: Throttle
* Axis 3: Aileron
* Axis 4: brakes HAT B
* Axis 5: flaps HAT A

* Switch A throttle CUT
* Switch B ?????

************************************************************************
$Id$
-->
<PropertyList>
<name>PPM</name>
<axis n="3">
<desc>Aileron</desc>
<binding>
<command>property-scale</command>
<property>/controls/flight/aileron</property>
<squared type="bool">true</squared>
</binding>
</axis>
<axis n="1">
<desc>Elevator</desc>
<binding>
<command>property-scale</command>
<property>/controls/flight/elevator</property>
<factor type="double">1.0</factor>
<squared type="bool">true</squared>
</binding>
</axis>
<axis n="2">
<desc>Throttle</desc>
<binding>
<command>nasal</command>
<script>controls.throttleAxis(1)</script>
</binding>
</axis>
<axis n="0">
<desc>Rudder</desc>
<binding>
<command>property-scale</command>
<property>/controls/flight/rudder</property>
<factor type="double">1.0</factor>
<power type="int">1</power>
</binding>
</axis>
<axis n="4">
<desc>Brakes</desc>
<binding>
<command>nasal</command>
<script>controls.applyBrakes(1)</script>
</binding>
</axis>
<axis n="5">
<desc>Flaps Down</desc>
<repeatable>false</repeatable>
<binding>
<command>nasal</command>
<script>controls.flapsDown(1)</script>
</binding>
</axis>


</PropertyList>

EGQK1 (EGQK south 1 mile)
EGQK1
 
Posts: 3
Joined: Mon Feb 27, 2012 10:14 pm

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby sim » Sat Mar 02, 2013 4:41 pm

Microsoft SideWinder Joystick

<axis n="2"> Is that a conventional throttle (move fore and aft)? Or does it move (left and right) or (up and down)?
Just wondering if it might operate rudder? Using buttons for rudder is not ideal. An analogue axis would give finer
control, better still if that axis is self centering!

Throttle on buttons is not such a problem as Rudder on buttons!

Also are you sure <button n="1"> is trigger ? On mine (Windows 7) that's <button n="0">
User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby sim » Mon Mar 04, 2013 9:31 am

See if this TRIGGER MODIFIER code works for your sidewinder. It has a little built-in aileron/rudder coordination and on the ground aileron gives differential wheel left/right braking. Slider axis No 2 gives Throttle but if TRIGGER is pressed you will find it moves rudder. (best observe how rudder moves by using keyboard "v" to get helicoptor view.
Four buttons are used to pan view horizontally and vertically but when trigger is pressed they serve to trim ailerons and elevator. If the view or trim moves the wrong way for you, just switch the negative signs between each button pair.

http://db.tt/srCisgEd

PS Tested above link code in this video (buttons were in very odd places! Didn't suit my joystick configuration)

User avatar
sim
 
Posts: 1431
Joined: Tue Jun 30, 2009 3:13 pm
Location: Shropshire England
Callsign: Fly4Fun
Version: 0.9.10 up
OS: 64 Win 10 HD6450

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby CloudPilot » Sun Jan 01, 2023 11:06 pm

Hello, I am setting up a joystick and throttle (TCA sidestick Airbus and TCA Quadrant Aitbus) to fly with the Concorde. I haven't had any problems so far, but I'm stuck configuring the starter. I have two toggle switches and two buttons that I would like to assign to the four engines:
- for the toggle switches I would like them to activate the starter of the reactor when I put them in the ON position (and once the engine has started they do nothing), and that they cut the engine when I switch them to the OFF position .
- For the buttons, I would like a first long press to start the engine (equivalent to a long press on s on the keyboard), and for them to turn off when I press a second time.

However, I am encountering several problems. For the toggle switches, I've tried using :
Code: Select all
<command>property-toggle</command
 <property>/controls/engines/engine[0]/starter</property>

, but it doesn't fully start the engine ( it remains stuck at 18 instead of 60 after a normal long press on s). I also tried adding <repeatable type="bool">true</repeatable>, to no avail. So I tried:
Code: Select all
<repeatable type="bool">true</repeatable>
  <binding>
      <command>nasal</command>
      <script>controls.selectEngine(0);
      controls.startEngine(0);</script>
  </binding>

When I flip the switch to ON, it starts the starter fine, but stalls at 25. And curiously, when I switch it to OFF, it starts the engine completely (while I didn't put anything between <mode-up> for this switch).
I could try to put a loop that lasts 30 seconds (engine ignition time) and that simulates pressing s. This would avoid leaving a press action on s all the time that the toggle switch is in the ON position when it is useless. But I don't know if it's possible.
Finally, when I try to put:
Code: Select all
<command>property-toggle</command>
      <property>/controls/engines/engine[0]/cutoff</property>

to turn off the engine, it doesn't work (it worked once in my various tests, but I forgot in which particular case. But then I couldn't turn it on again.)

Finally, I looked a bit in the available functions, and I don't understand the difference between:
Code: Select all
/controls/engines/engine[%d]/starter
/controls/engines/engine[%d]/fire-switch
/controls/engines/engine[%d]/ignition

nor which ones work on the Concorde.
(And last question, it seems to me that the mixture functions have no effect on the Concorde, do they?)

Thank you in advance for your help.
CloudPilot
 
Posts: 6
Joined: Sun Jan 01, 2023 9:53 pm

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby TheEagle » Mon Jan 02, 2023 4:00 am

The concorde is powered by turbine engines, and it is a JSBSim aircraft - thus, for an engine to start, you need to set controls/electric/engine[n]/generator to true, then controls/engines/engine[n]/starter to true and cutoff to false (If i remember correctly)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3401
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby V12 » Mon Jan 02, 2023 4:29 am

Concorde starting sequence is bit complicated, check the wiki :
https://wiki.flightgear.org/Concorde

Full flight from London to New York
https://youtu.be/5JiEkv0xJac
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby CloudPilot » Mon Jan 09, 2023 7:43 pm

Thanks a lot! I looked at the starting procedure and was able to configure the buttons. However, it seems to me that there is a bug with the parking brakes when you start the simulation by selecting the "parked, cold, off" option. After turning on the engines, when you try to remove the parking brakes (either by Shift+B or via the joystick command), the pressure increases even more, so you can never start... (although in the internal properties it is clearly stated that the parking brakes are off). But when I select the automatic state and turn the aircraft off completely and then on again there is no problem.
CloudPilot
 
Posts: 6
Joined: Sun Jan 01, 2023 9:53 pm

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby V12 » Mon Jan 09, 2023 9:46 pm

Concorde doesn't support states, it is very old plane. IIRC, cold'n dark state is not simulated properly. I have logged more than 1200 hours with this iconic plane and used it only from default "ready to fly" state.
Fly high, fly fast - fly Concorde !
V12
 
Posts: 2757
Joined: Thu Jan 12, 2017 5:27 pm
Location: LZIB
Callsign: BAWV12

Re: FAQs: customizing joystick controls; XP/Vista joystick i

Postby CloudPilot » Mon Jan 09, 2023 10:17 pm

Ok, thank you very much !
CloudPilot
 
Posts: 6
Joined: Sun Jan 01, 2023 9:53 pm

Previous

Return to Hardware

Who is online

Users browsing this forum: No registered users and 4 guests