On Sunday 16 January 2005 13:13, Erik Hofman wrote:
> Oliver C. wrote:
> > Yes, i am waiting for the insertion of my joystick patch from 24 Dec.
> > 2004:
> >
> > http://www.mail-archive.com/flightgear-devel@flightgear.org/msg28933.html
> >
> > If there's something wrong with this patch, then please tell me.
>
> Would this work just by defining two sections for the specific bindings,
> like this:
>
>
>    <axis>
>     <desc>View Elevation (Default)</desc>
>     <number>
>      <unix>5</unix>
>     </number>
>     <low>
>      <repeatable>true</repeatable>
>      <binding>
>       <command>property-adjust</command>
>       <property>/sim/current-view/goal-pitch-offset-deg</property>
>       <step type="double">1.0</step>
>      </binding>
>     </low>
>     <high>
>      <repeatable>true</repeatable>
>      <binding>
>       <command>property-adjust</command>
>       <property>/sim/current-view/goal-pitch-offset-deg</property>
>       <step type="double">-1.0</step>
>      </binding>
>     </high>
>    </axis>
>
>    <axis>
>     <desc>View Elevation (windows)</desc>
>     <number>
>      <windows>7</windows>
>     </number>
>     <low>
>      <repeatable>true</repeatable>
>      <binding>
>       <command>property-adjust</command>
>       <property>/sim/current-view/goal-pitch-offset-deg</property>
>       <step type="double">-1.0</step>
>      </binding>
>     </low>
>     <high>
>      <repeatable>true</repeatable>
>      <binding>
>       <command>property-adjust</command>
>       <property>/sim/current-view/goal-pitch-offset-deg</property>
>       <step type="double">1.0</step>
>      </binding>
>     </high>
>    </axis>
>
> Erik
>

The problem is, how do you define which section should be used by which OS?
That's why i added a new property.

There's also another solution by reading the assigned joystick button number 
with a nasal script like this way:
    
Pseudo Code:
<script><![CDATA[
      # invert Axis under Windows
      if(Joystick Button Number == 7)
      {  
        <!-- Windows solution -->
 view.panViewPitch(-1);
      }
      else
      { 
        <!-- others --> 
 view.panViewPitch(1);
      }
]]></script> 

But someone on irc.flightgear.org  told me, that this is more a hack than a 
solution, so i decided to use the other solution by adding a new property to 
the property system.

Best Regards,
 Oliver C.







_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to