I would like to be able to use the 8-way hat on my CH products 568 combatstick to be able to control the view direction such that each of the 8 positions would change the view angle by +-45 degrees relative to the positions next to the current position.
The hat appears as axises 4 and 5 with -32676, 0 and 32676 as the only values produced when looking at the output in the KDE Control Center -> Peripherals -> Joystick dialog. I have set this up so that I can move the view in 90 degree increments using the code below. But I don't know how to get this to detect when both axis are at either min and/or max value which is what would have to happen to be able to do 45 degree increments in the view angle. There would also have to be a way to detect when either axis was zero and I don't know how to code this either. I have looked for an example that does this or something similar and have not been able to find anything like this. Is it possible? If so can someone give me some hints? Hal <axis> <desc>View Direction</desc> <number> <unix>3</unix> <mac>3</mac> <windows>4</windows> </number> <low> <binding> <command>property-assign</command> <property>/sim/current-view/goal-heading-offset-deg</property> <value type="double">90.0</value> </binding> </low> <high> <command>property-assign</command> <property>/sim/current-view/goal-heading-offset-deg</property> <value type="double">-90.0</value> </binding> </high> </axis> <axis> <desc>View Direction</desc> <number> <unix>4</unix> <mac>4</mac> <windows>5</windows> </number> <low> <repeatable>false</repeatable> <binding> <command>property-assign</command> <property>/sim/current-view/goal-heading-offset-deg</property> <value type="double">0.0</value> </binding> </low> <high> <repeatable>false</repeatable> <binding> <command>property-assign</command> <property>/sim/current-view/goal-heading-offset-deg</property> <value type="double">180.0</value> </binding> </high> </axis> ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Flightgear-users mailing list Flightgear-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-users