Re: [Flightgear-devel] fixed xml for Saitek Cyborg Evo joystick

2004-08-06 Thread Erik Hofman
Dave Perry wrote:
I am attaching an edit of this file that should work with either Windows 
or Linux.  As of a few days ago, the CVS file did not work at all.
This has been committed now.
Thanks!
Erik
___
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d


[Flightgear-devel] fixed xml for Saitek Cyborg Evo joystick

2004-07-28 Thread Dave Perry
I am attaching an edit of this file that should work with either Windows 
or Linux.  As of a few days ago, the CVS file did not work at all.

Would a Windows person with this joystick try it and then it could be 
included in the release.
Dave P.




Saitek Cyborg USB Stick




	Aileron
	
		property-scale
		/controls/flight/aileron
		2
	



	Elevator
	
		property-scale
		/controls/flight/elevator
		-1.0
		2
	



	Throttle
	
		nasal
		controls.throttleAxis()
	



	Rudder
	
		property-scale
		/controls/flight/rudder
		2
	




	View Direction; Aileron Trim;
	
		4
		6
	
	
		true
		
			nasal
			
mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
if (mod == nil or mod == 0) {
	v = getprop("/sim/current-view/view-number");
	if (v == 0 or v == 4) {
		view.panViewDir(2);
	} else {
		view.panViewDir(2);
	}
} elsif (mod == 1) {
	controls.aileronTrim(-0.75);
} elsif (mod == 2) {
	controls.adjMixture(-2);
} elsif (mod == 3) {
	#
}
			
		
	
	
		true
		
			nasal
			
mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
if (mod == nil or mod == 0) {
	v = getprop("/sim/current-view/view-number");
	if (v == 0 or v == 4) {
		view.panViewDir(-2);
	} else {
		view.panViewDir(-2);
	}
} elsif (mod == 1) {
	controls.aileronTrim(0.75);
} elsif (mod == 2) {
	controls.adjMixture(2);
} elsif (mod == 3) {
	#
}
			
		
	



	View Elevation; Elevator Trim;
	
		5
		7
	
	
		true
		
			nasal
			
mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
if (mod == nil or mod == 0) {
	view.panViewPitch(2);
} elsif (mod == 1) {
	controls.elevatorTrim(0.75);
} elsif (mod == 2) {
	controls.adjPropeller(1);
} elsif (mod == 3) {
	#
}
			
		
	
	
		true
		
			nasal
			
mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
if (mod == nil or mod == 0) {
	view.panViewPitch(-2);
} elsif (mod == 1) {
	controls.elevatorTrim(-0.75);
} elsif (mod == 2) {
	controls.adjPropeller(-1);
} elsif (mod == 3) {
	#
}
			
		
	




 


	Brakes
	true
	
		nasal
		
			mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
			if (mod == nil or mod == 0) {
interpolate("/controls/gear/brake-left", 1, 0.075);
interpolate("/controls/gear/brake-right", 1, 0.075);
			} elsif (mod == 1) {
setprop("/controls/gear/brake-left", 1);
setprop("/controls/gear/brake-right", 1);
			} elsif (mod == 2) {
#
			} elsif (mod == 3) {
#
			}
		
	
	
	true
	
		nasal
		
			mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
			if (mod == nil or mod == 0) {
interpolate("/controls/gear/brake-left", 0, 0.075);
interpolate("/controls/gear/brake-right", 0, 0.075);
			} elsif (mod == 1) {
brake = !getprop("/controls/gear/brake-parking");
setprop("/controls/gear/brake-parking", brake);
if (brake) {
	gui.popupTip("Parking Brake ON");
} else {
	gui.popupTip("Parking Brake OFF");
}
setprop("/controls/gear/brake-left", 0);
setprop("/controls/gear/brake-right", 0);
			} elsif (mod == 2) {
speedbrake = !getprop("/controls/flight/speedbrake");
setprop("/controls/flight/speedbrake", speedbrake);
			} elsif (mod == 3) {
reverser = !getprop("/controls/engines/engine[0]/reverser");
props.setAll("/controls/engines/engine", "reverser", reverser);
if (reverser) {
	gui.popupTip("Thrust Reverser ON");
} else {
	gui.popupTip("Thrust Reverser OFF");
}
			}
		
	
	




	Reset view; toggle tail-wheel lock; reset trim
	
		1
		1
	
	false
	
		nasal
		
			mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
			if (mod == nil or mod == 0) {
view.resetView();
			} elsif (mod == 1) {
setprop("/controls/flight/elevator-trim", 0);
setprop("/controls/flight/aileron-trim", 0);
setprop("/controls/flight/rudder-trim", 0);
			} elsif (mod == 2) {
setprop("/sim/current-view/view-number", 0);
view.resetView();
			} elsif (mod == 3) {
twlock = !getprop("/controls/gear/tailwheel-lock");
setprop("/controls/gear/tailwheel-lock", twlock);
if (twlock) {
	gui.popupTip("Tail Wheel UNLOCKED");
} else {
	gui.popupTip("Tail Wheel LOCKED");
}
			}
		
	




	Flaps Up; Gear up
	false
	
		nasal
		
			mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
			if (mod == nil or mod == 0) {
controls.stepFlaps(-1);
			} elsif (mod == 1) {
setprop("/controls/gear/gear-down", 0);
			} elsif (mod == 2) {
view.increase();
			} elsif (mod == 3) {
#
			}
		
	




	Flaps Down; Gear down
	false
	
		nasal
		
			mod = getprop("/input/joysticks/js[0]/saitek-cyborg-evo-modifier");
			if (mod == nil or mod == 0) {
controls.stepFlaps(1);
			} elsif (mod == 1) {
setprop("/controls/gear/gear-down", 1);
			} elsif (mod == 2) {
view.decrease();
			} elsif (mod == 3) {
#
			}
		
	




	Prev