Board index FlightGear Support Hardware

Help detecting Saitek switchpanel [SOLVED-REALLY!]

Joysticks, pedals, monitors.

Help detecting Saitek switchpanel [SOLVED-REALLY!]

Postby marco155 » Wed Feb 15, 2017 7:39 pm

Hi,
new user here running flightgear 2016.4.4 on Linux

Device is Saitek Switch Panel.

When I plug it into the usb port i can see from dmesg:

[ 2419.534516] input: HOLTEK Saitek Pro Flight Switch Panel as /devices/pci0000:00/0000:00:1c.5/0000:04:00.0/usb5/5-1/5-1.4/5-1.4:1.0/0003:06A3:0D67.0005/input/input23
[ 2419.534712] hid-generic 0003:06A3:0D67.0005: input,hidraw3: USB HID v1.00 Device [HOLTEK Saitek Pro Flight Switch Panel] on usb-0000:04:00.0-1.4/input0


> lsusb |grep Saitek
Bus 005 Device 009: ID 06a3:0d67 Saitek PLC Pro Flight Switch Panel


I needed to be in the "input" group, so testing with my user and evtest was working,
I could see events for every button I was pressing.
So the peripheral with linux and my user is working properly.

I created the file $HOME/.fgfs/Input/Joysticks/Switch-Panel.xml that starts with:

<?xml version="1.0"?>

<!--
************************************************************************
* Setup for Saitek Switch Panel
*
* Marco
************************************************************************
-->

<PropertyList>

<name>HOLTEK Saitek Pro Flight Switch Panel</name>
<name>Saitek Pro Flight Switch Panel</name>
<name>Saitek PLC Pro Flight Switch Panel</name>
<debug-events type="bool">true</debug-events>
...



when i run Flightgear with --log-level=bulk --log-class=input
i see the following log that makes me think the config file is loaded:

...
Initializing joystick bindings
Scanning Path "/home/marco/.fgfs/Input/Joysticks" for input devices
Reading device file Path "/home/marco/.fgfs/Input/Joysticks/Switch-Panel.xml"
Scanning Path "/usr/share/flightgear/Input/Joysticks" for input devices
...


but then, to my surprise, i see

name=HDA Intel PCH Line Out Side, node=/dev/input/event8
No configuration found for device HDA Intel PCH Line Out Side
name=<null>, node=<null>
name=HOLTEK Saitek Pro Flight Switch Panel, node=/dev/input/event19
No configuration found for device HOLTEK Saitek Pro Flight Switch Panel
name=<null>, node=<null>


And I'm at loss, can somebody please help me here?
Last edited by marco155 on Wed Mar 01, 2017 4:45 pm, edited 2 times in total.
marco155
 
Posts: 6
Joined: Wed Feb 15, 2017 7:24 pm

Re: Help detecting input device

Postby marco155 » Fri Feb 17, 2017 5:04 pm

... then I installed the yoke that works perfectly, but on the same log:

name=Saitek Saitek Pro Flight Yoke, node=/dev/input/event19
No configuration found for device Saitek Saitek Pro Flight Yoke
name=Saitek Saitek Pro Flight Yoke, node=/dev/input/js0
No configuration found for device Saitek Saitek Pro Flight Yoke


Honestly I have no idea what's going on...
marco155
 
Posts: 6
Joined: Wed Feb 15, 2017 7:24 pm

Re: Help detecting input device

Postby marco155 » Sun Feb 19, 2017 11:28 am

Ok, so what I could understand about it (but of course I might be wrong) is that evdev is the new system and /dev/input/jsX is the old one and flightgear supports only the old one
so unless there's a way to show the switchpanel as a /dev/input/js (old joystick driver) the panel won't be supported out of the box.
This is interesting to know also if you want to create your own panels with arduino or raspberry pi.

I'll stop here, i've no idea how to proceed
marco155
 
Posts: 6
Joined: Wed Feb 15, 2017 7:24 pm

Re: Help detecting input device

Postby marco155 » Sun Feb 19, 2017 1:28 pm

Found a solution!
xboxdrv gets evdev events and creates a /dev/input/jsX device.
I'm able to turn on and off avionics now!
It's just a matter of working with config files now.
Thanks for the attention.

Marco.
marco155
 
Posts: 6
Joined: Wed Feb 15, 2017 7:24 pm

Re: Help detecting Saitek switchpanel [SOLVED]

Postby stuart » Sun Feb 19, 2017 9:48 pm

Glad you managed to work it out. I read your original post, but didn't have any useful comment to add, so hoped someone else would jump in.

That you've worked it out yourself is even better!

Welcome to the forum.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1469
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: Help detecting Saitek switchpanel [SOLVED]

Postby Isaak » Sun Feb 19, 2017 10:46 pm

I was following your topic as well, nice you found a solution for your problem! If anyone has an idea on how to bring the functionality of xboxdrv to Windows, give me a shout, my two year old dust gathering switch panel would be grateful, as would I :)
Isaak
 
Posts: 433
Joined: Sat Jun 04, 2011 2:52 pm
Location: Leuven, Belgium
Callsign: OO-ISA
Version: 2019.1.1
OS: Windows 10

Re: Help detecting Saitek switchpanel [SOLVED]

Postby marco155 » Mon Feb 20, 2017 6:11 pm

Hi guys, nice to meet you.
Unfortunately I'm not really happy about this solution,
xboxdrv emulates an xbox controller and an xbox controller doesn't have 20 switch buttons, so you have to pick which ones you want to use.

I picked this as an hobby because I wanted to connect it to my passion for microcontrollers and electronics to build my own controls, lights etc, using linux,
so understanding I'm not able to have this panel work with evdev is a big setback for me, or maybe I just miss the right pointers.
Hope someone can help me, meanwhile, I'm trying to get this damn Cessna flight straight ... :)
marco155
 
Posts: 6
Joined: Wed Feb 15, 2017 7:24 pm

Re: Help detecting Saitek switchpanel [SOLVED]

Postby marco155 » Wed Mar 01, 2017 4:44 pm

Guys, I'm super dumb and the solution was super simple.
I was misguided by the entire Joystick thing while what I needed to do was just to put the right xml file in the right directory.
Switchpanel is seen under Linux only under the hiddev so the xml file has to go under $FGROOT/Input/Event and not under the $FGROOT/Input/Joystick
Now on my Cessna the Switchpanel works well!!!!!!!!

So copy this to your editor, save it as Switch-Panel.xml and put it into $FGROOT/Input/Event/Saitek (Create Saitek if it doesn't exist)
Then enjoy!

Code: Select all
<?xml version="1.0"?>

<!--
************************************************************************
* Setup for Saitek Switch Panel
*
*
************************************************************************
$Id$
-->

<PropertyList>

  <name>HOLTEK Saitek Pro Flight Switch Panel</name>
  <name>Saitek Pro Flight Switch Panel</name>
  <name>Saitek PLC Pro Flight Switch Panel</name>
  <debug-events type="bool">true</debug-events>

  <event>
    <name>button-0</name>
    <desc>Battery master</desc>
    <binding>
      <command>property-assign</command>
      <property>/controls/switches/master-bat</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/switches/master-bat</property>
        <value>false</value>
      </binding>
    </mod-up>
  </event>

  <event>
    <name>button-1</name>
    <desc>Alternator master</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/switches/master-alt</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/switches/master-alt</property>
        <value>false</value>
      </binding>
    </mod-up>
  </event>

  <event>
    <name>button-2</name>
    <desc>Avionics master</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/switches/master-avionics</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/switches/master-avionics</property>
        <value>false</value>
      </binding>
    </mod-up>
  </event>

  <event>
    <name>button-5</name>
    <desc>Pitot heat</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/anti-ice/pitot-heat</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/anti-ice/pitot-heat</property>
        <value>false</value>
      </binding>
    </mod-up>
  </event>

  <event>
    <name>button-7</name>
    <desc>Instruments light</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/lighting/instruments-norm</property>
      <value>1.0</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/lighting/instruments-norm</property>
        <value>0.0</value>
      </binding>
   </mod-up>
  </event>

  <event>
    <name>button-8</name>
    <desc>Beacon</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/lighting/beacon</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/lighting/beacon</property>
        <value>false</value>
      </binding>
   </mod-up>
  </event>

  <event>
    <name>button-9</name>
    <desc>Navigation lights</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/lighting/nav-lights</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/lighting/nav-lights</property>
        <value>false</value>
      </binding>
   </mod-up>
  </event>

  <event>
    <name>button-266</name>
    <desc>Strobe</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/lighting/strobe</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/lighting/strobe</property>
        <value>false</value>
      </binding>
   </mod-up>
  </event>

  <event>
    <name>button-267</name>
    <desc>Taxi light</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/lighting/taxi-light</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/lighting/taxi-light</property>
        <value>false</value>
      </binding>
   </mod-up>
  </event>

  <event>
    <name>button-268</name>
    <desc>Landing lights</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/lighting/landing-lights</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/lighting/landing-lights</property>
        <value>false</value>
      </binding>
   </mod-up>
  </event>

  <event>
    <name>button-side</name>
    <desc>Gear</desc>
    <binding>
      <command>nasal</command>
      <script>controls.gearDown(1)</script>
    </binding>
    <mod-up>
      <binding>
        <command>nasal</command>
        <script>controls.gearDown(0)</script>
      </binding>
    </mod-up>
  </event>

  <event>
    <name>button-269</name>
    <desc>Magnetos off</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/switches/magnetos</property>
      <value>0</value>
    </binding>
  </event>

  <event>
    <name>button-270</name>
    <desc>Magnetos right</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/switches/magnetos</property>
      <value>1</value>
    </binding>
  </event>

  <event>
    <name>button-271</name>
    <desc>Magnetos right</desc>
    <binding>
      <command>property-assign</command>
      <property>/controls/switches/magnetos</property>
      <value>2</value>
    </binding>
  </event>

  <event>
    <name>button-left</name>
    <desc>Magnetos both</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/switches/magnetos</property>
      <value>3</value>
    </binding>
  </event>

  <event>
    <name>button-right</name>
    <desc>Starter</desc>
     <binding>
      <command>property-assign</command>
      <property>/controls/switches/starter</property>
      <value>true</value>
    </binding>
    <mod-up>
      <binding>
        <command>property-assign</command>
        <property>/controls/switches/starter</property>
        <value>false</value>
      </binding>
    </mod-up>
   </event>

</PropertyList>
<!-- end of Switch-Panel.xml -->
marco155
 
Posts: 6
Joined: Wed Feb 15, 2017 7:24 pm

Re: Help detecting Saitek switchpanel [SOLVED-REALLY!]

Postby jumina » Mon Apr 24, 2017 3:27 am

I tried this and it doesn't work
jumina
 
Posts: 1
Joined: Mon Apr 24, 2017 3:20 am

Re: Help detecting Saitek switchpanel [SOLVED-REALLY!]

Postby Knüppelrührer » Sun Nov 18, 2018 8:31 pm

Same results here running Windows 8.

I created switch-panel.xml in c:\programme\flightgear 2018.2.2\data\input\evelt\Saitek

Result: Nothing.

Maybe FG needs to know, that it should look into this directory?
Knüppelrührer
 
Posts: 68
Joined: Thu Oct 25, 2018 9:06 pm

Re: Help detecting Saitek switchpanel [SOLVED-REALLY!]

Postby wkitty42 » Sun Nov 18, 2018 8:40 pm

Knüppelrührer wrote in Sun Nov 18, 2018 8:31 pm:evelt

is that a typo? reading back up-topic, that should be "Event"... case is important as well as spelling ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5501
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Help detecting Saitek switchpanel [SOLVED-REALLY!]

Postby Knüppelrührer » Sun Nov 18, 2018 8:46 pm

typo ;-)

Folder is "Event".
Knüppelrührer
 
Posts: 68
Joined: Thu Oct 25, 2018 9:06 pm

Re: Help detecting Saitek switchpanel [SOLVED-REALLY!]

Postby CptDondo » Sun Dec 23, 2018 2:31 pm

Anyone have this working in Windows? I copied the XML file into the event/Saitek folder, no joy.
CptDondo
 
Posts: 17
Joined: Sun May 17, 2009 6:28 pm

Re: Help detecting Saitek switchpanel [SOLVED-REALLY!]

Postby Isaak » Mon Dec 24, 2018 8:39 am

Nope, Linux only I 'm afraid (have an unused switch panel lying here for four years too)
Isaak
 
Posts: 433
Joined: Sat Jun 04, 2011 2:52 pm
Location: Leuven, Belgium
Callsign: OO-ISA
Version: 2019.1.1
OS: Windows 10

Re: Help detecting Saitek switchpanel [SOLVED-REALLY!]

Postby aprecelton » Thu Dec 27, 2018 7:54 pm

Does anyone know if there is an xml file for the saitek/Logitech radio panel? I’m surprised Logitech or saitek don’t support FlightGear directly :(
aprecelton
 
Posts: 31
Joined: Fri Feb 26, 2016 10:20 am


Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest

cron