Howto:Build and run FlightGear on Raspberry Pi 4: Difference between revisions

Jump to navigation Jump to search
Line 183: Line 183:
=== Honeycomb Aeronautical Alpha Flight Controls - Yoke ===
=== Honeycomb Aeronautical Alpha Flight Controls - Yoke ===


{{not done}}
The Honeycomb Aeronautical Alpha Flight Controls yoke is a quality flight yoke that works with the Raspberry Pi and FlightGear. The buttons on the yoke are standard normally open, where as the base buttons are normally closed double throw and one five position rotary. The base buttons are odd in that they use two USB Buttons per button. However it might be possible to hack the yoke in order to add nine more buttons. FlightGear is self limited to 32 button, however HID interface will be included in the next revision and it will allow an unlimited number of buttons.


The Honeycomb Aeronautical Alpha Flight Controls yoke is a quality flight yoke that works with the Raspberry Pi and FlightGear. The buttons on the yoke are standard normally open, where as the base buttons are normally closed double throw and one five position rotary. The base buttons are odd in that they use two USB Buttons per button. However it might be possible to hack the yoke in order to add nine more buttons.
The below is being written for the Dakota DC-3, hence there will be some unusual bindings. This is a work in progress and shared for educational purposes.


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
Line 226: Line 226:
* Button 25: BASE Taxi down
* Button 25: BASE Taxi down
* Button 26: BASE Nav up
* Button 26: BASE Nav up
* Button 27: Base Nav down
* Button 27: BASE Nav down
* Button 28: BASE Strobe up
* Button 28: BASE Strobe up
* Button 29: BASE Strobe down
* Button 29: BASE Strobe down
Line 243: Line 243:
       <desc type="string">Aileron</desc>
       <desc type="string">Aileron</desc>
       <binding>
       <binding>
           <command type="string">property-scale</command>
           <command>property-scale</command>
           <property type="string">/controls/flight/aileron</property>
           <property>/controls/flight/aileron</property>
           <factor type="double">1</factor>
           <factor type="double">1</factor>
           <offset type="double">0</offset>
           <offset type="double">0</offset>
Line 251: Line 251:


   <axis n="1">
   <axis n="1">
       <desc type="string">Elevator</desc>
       <desc>Elevator</desc>
       <binding>
       <binding>
           <command type="string">property-scale</command>
           <command>property-scale</command>
           <property type="string">/controls/flight/elevator</property>
           <property>/controls/flight/elevator</property>
           <factor type="double">-1</factor>
           <factor type="double">-1</factor>
           <offset type="double">0</offset>
           <offset type="double">0</offset>
Line 261: Line 261:


   <axis n="2">
   <axis n="2">
       <desc type="string">View Direction</desc>
       <desc>View Direction</desc>
       <direction type="string">left</direction>
       <direction>left</direction>
       <low>
       <low>
           <repeatable type="string">true</repeatable>
           <repeatable>true</repeatable>
           <binding>
           <binding>
               <command type="string">nasal</command>
               <command>nasal</command>
               <script type="string">view.panViewDir(1)</script>
               <script>view.panViewDir(1)</script>
               <module type="string">__js1</module>
               <module>__js1</module>
               <offset type="double">1</offset>
               <offset type="double">1</offset>
           </binding>
           </binding>
       </low>
       </low>
       <high>
       <high>
           <repeatable type="string">true</repeatable>
           <repeatable>true</repeatable>
           <binding>
           <binding>
               <command type="string">nasal</command>
               <command>nasal</command>
               <script type="string">view.panViewDir(-1)</script>
               <script>view.panViewDir(-1)</script>
               <module type="string">__js1</module>
               <module>__js1</module>
               <offset type="double">1</offset>
               <offset type="double">1</offset>
           </binding>
           </binding>
Line 283: Line 283:
   </axis>
   </axis>
   <axis n="3">
   <axis n="3">
       <desc type="string">View Elevation</desc>
       <desc>View Elevation</desc>
       <direction type="string">upward</direction>
       <direction>upward</direction>
       <low>
       <low>
           <repeatable type="string">true</repeatable>
           <repeatable>true</repeatable>
           <binding>
           <binding>
               <command type="string">nasal</command>
               <command>nasal</command>
               <script type="string">view.panViewPitch(1)</script>
               <script>view.panViewPitch(1)</script>
               <module type="string">__js1</module>
               <module>__js1</module>
               <offset type="double">1</offset>
               <offset type="double">1</offset>
           </binding>
           </binding>
     </low>
     </low>
     <high>
     <high>
           <repeatable type="string">true</repeatable>
           <repeatable>true</repeatable>
           <binding>
           <binding>
               <command type="string">nasal</command>
               <command>nasal</command>
               <script type="string">view.panViewPitch(-1)</script>
               <script>view.panViewPitch(-1)</script>
               <module type="string">__js1</module>
               <module>__js1</module>
               <offset type="double">1</offset>
               <offset type="double">1</offset>
           </binding>
           </binding>
       </high>
       </high>
   </axis>
   </axis>
   <button>
   <button n="0">
       <desc type="string">View Cycle Forwards</desc>
       <desc>View Cycle Forwards</desc>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">view.stepView(1);</script>
           <script>view.stepView(1);</script>
       </binding>
       </binding>
       <repeatable type="double">0</repeatable>
       <repeatable>0</repeatable>
  </button>
 
  <button n="1">
      <desc>Reset View</desc>
      <binding>
          <command>nasal</command>
          <script>
              setprop("/sim/current-view/view-number", 0);
              view.resetView()
          </script>
      </binding>
      <repeatable>0</repeatable>
   </button>
   </button>


   <button n="3">
   <button n="3">
       <desc type="string">Gear Toggle</desc>
       <desc>Gear Toggle</desc>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">controls.gearTogglePosition(1);</script>
           <script>controls.gearToggle(1);</script>
       </binding>
       </binding>
       <repeatable type="double">0</repeatable>
       <repeatable>0</repeatable>
   </button>
   </button>


   <button n="4">
   <button n="4">
       <desc type="string">Elevator Trim Up</desc>
       <desc>Elevator Trim Up</desc>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">controls.elevatorTrim(-1);</script>
           <script>controls.elevatorTrim(-1);</script>
       </binding>
       </binding>
       <repeatable type="double">1</repeatable>
       <repeatable>1</repeatable>
   </button>
   </button>


   <button n="5">
   <button n="5">
       <desc type="string">Elevator Trim Down</desc>
       <desc>Elevator Trim Down</desc>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">controls.elevatorTrim(1);</script>
           <script>controls.elevatorTrim(1);</script>
       </binding>
       </binding>
       <repeatable type="double">1</repeatable>
       <repeatable>1</repeatable>
   </button>
   </button>


   <button n="6">
   <button n="6">
       <desc type="string">Flaps Down</desc>
       <desc>Flaps Down</desc>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">controls.flapsDown(1);</script>
           <script>controls.flapsDown(1);</script>
       </binding>
       </binding>
       <repeatable type="double">0</repeatable>
       <repeatable>0</repeatable>
   </button>
   </button>


   <button n="7">
   <button n="7">
       <desc type="string">Flaps Up</desc>
       <desc>Flaps Up</desc>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">controls.flapsDown(-1);</script>
           <script>controls.flapsDown(-1);</script>
       </binding>
       </binding>
       <repeatable type="double">0</repeatable>
       <repeatable>0</repeatable>
   </button>
   </button>


   <button n="8">
   <button n="8">
       <desc type="string">Rudder Trim Left</desc>
       <desc>Rudder Trim Left</desc>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">controls.rudderTrim(-1);</script>
           <script>controls.rudderTrim(-1);</script>
       </binding>
       </binding>
       <repeatable type="double">1</repeatable>
       <repeatable>1</repeatable>
   </button>
   </button>
   <button n="9">
   <button n="9">


       <desc type="string">Rudder Trim Right</desc>
       <desc>Rudder Trim Right</desc>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">controls.rudderTrim(1);</script>
           <script>controls.rudderTrim(1);</script>
       </binding>
       </binding>
       <repeatable type="double">1</repeatable>
       <repeatable>1</repeatable>
   </button>
   </button>


   <button n="10">
   <button n="10">
       <desc type="string">Aileron Trim Left</desc>
       <desc>Aileron Trim Left</desc>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">controls.aileronTrim(-1);</script>
           <script>controls.aileronTrim(-1);</script>
       </binding>
       </binding>
       <repeatable type="double">1</repeatable>
       <repeatable>1</repeatable>
   </button>
   </button>


   <button n="11">
   <button n="11">
       <desc type="string">Aileron Trim Right</desc>
       <desc>Aileron Trim Right</desc>
      <repeatable>1</repeatable>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">controls.aileronTrim(1);</script>
           <script>controls.aileronTrim(1);</script>
       </binding>
       </binding>
       <repeatable type="double">1</repeatable>
  </button>
 
 
  <button n="12">
      <desc>Instruments ON OFF</desc>
       <repeatable>0</repeatable>
      <binding>
          <command>nasal</command>
          <script>setprop("/controls/lighting/instruments-norm", 0.16)</script>
      </binding>
      <mod-up>
          <binding>
              <command>nasal</command>
              <script type="string">setprop("/controls/lighting/instruments-norm", 0)</script>
          </binding>
      </mod-up>
   </button>
   </button>


   <button n="14">
   <button n="14">
       <desc type="string">Battery ON OFF</desc>
       <desc>Battery ON OFF</desc>
      <repeatable>0</repeatable>
      <binding>
          <command>nasal</command>
          <script>setprop("/controls/electric/battery-switch", 1)</script>
      </binding>
      <mod-up>
          <binding>
              <command>nasal</command>
              <script>setprop("/controls/electric/battery-switch", 0)</script>
          </binding>
      </mod-up>
      </button>
 
  <button n="16">
      <desc>Boost Engine-1 ON OFF</desc>
      <repeatable>0</repeatable>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">setprop("/controls/electric/battery-switch", 1);</script>
           <script>setprop("/controls/engines/engine/boost", 1)</script>
       </binding>
       </binding>
       <mod-up>
       <mod-up>
           <binding>
           <binding>
               <command type="string">nasal</command>
               <command>nasal</command>
               <script type="string">setprop("/controls/electric/battery-switch", 0);</script>
               <script>setprop("/controls/engines/engine/boost", 0)</script>
           </binding>
           </binding>
       </mod-up>
       </mod-up>
      <repeatable type="double">0</repeatable>
       </button>
       </button>


   <button n="24">
   <button n="22">
       <desc type="string">Tail Wheel Lock ON OFF</desc>
       <desc>Landing Lights Left and Right ON OFF</desc>
      <repeatable>0</repeatable>
      <binding>
          <command>nasal</command>
          <script>
              setprop("/controls/lighting/landing-lights", 1);
              setprop("/controls/lighting/landing-lights[1]" ,1)
          </script>
      </binding>
      <mod-up>
          <binding>
              <command>nasal</command>
              <script>
              setprop("/controls/lighting/landing-lights", 0);
              setprop("/controls/lighting/landing-lights[1]" ,0)
          </script>
          </binding>
      </mod-up>
  </button>
 
  <button n="25">
      <desc>Tail Wheel Lock ON OFF</desc>
      <repeatable>0</repeatable>
       <binding>
       <binding>
           <command type="string">nasal</command>
           <command>nasal</command>
           <script type="string">setprop("/controls/gear/tailwheel-lock-pos", 1);</script>
           <script>setprop("/controls/gear/tailwheel-lock", 1)</script>
       </binding>
       </binding>
       <mod-up>
       <mod-up>
           <binding>
           <binding>
               <command type="string">nasal</command>
               <command>nasal</command>
               <script type="string">setprop("/controls/gear/tailwheel-lock-pos", 0);</script>
               <script>setprop("/controls/gear/tailwheel-lock", 0)</script>
           </binding>
           </binding>
       </mod-up>
       </mod-up>
      <repeatable type="double">0</repeatable>
   </button>
   </button>
  <button n="30">
      <desc>Magneto OFF</desc>
      <repeatable>0</repeatable>
      <binding>
          <command>nasal</command>
          <script>setprop("/controls/engines/engine/magnetos", 0)</script>
      </binding>
  </button>
  <button n="33">
      <desc>Magneto Right</desc>
      <repeatable>0</repeatable>
      <binding>
          <command>nasal</command>
          <script>setprop("/controls/engines/engine/magnetos", 1)</script>
      </binding>
  </button>
</PropertyList>
</PropertyList>
</syntaxhighlight>
</syntaxhighlight>
320

edits

Navigation menu