"/sim/current-view/goal-pitch-offset-deg"
};
+string axis_posdir[8]= { "right", "down/forward", "right", "forward", "forward", "forward", "left", "upward" };
+
+
bool half_range[8]={ false,false,false,true,true,true,false,false };
bool repeatable[8]={ false,false,false,false,false,false,true,true };
-bool invert[8]= { false,true,false,false,false,false,false,true };
+bool invert[8]= { false,false,false,false,false,false,false,false };
string button_humannames[8]= { "Left Brake", "Right Brake",
"Flaps Up", "Flaps Down",
- "Elevator Trim Up", "Elevator Trim Down",
+ "Elevator Trim Forward", "Elevator Trim Backward",
"Landing Gear Up", "Landing Gear Down"
};
bool button_boolean[8]={ false,false,false,false,false,false,true,true };
-float button_step[8]={ 1.0, 1.0, 0.34, -0.34, 0.001, -0.001, 0.0, 1.0 };
+float button_step[8]={ 1.0, 1.0, -0.34, 0.34, 0.001, -0.001, 0.0, 1.0 };
string button_repeat[8]={ "false", "false", "false", "false", "true", "true", "false", "false" };
for(control=0;control<=7;control++) {
cout << "Move the control you wish to use for " << axes_humannames[control]
- << endl;
+ << " " << axis_posdir[control] << endl;
+ cout << "Pressing a button skips this axis\n";
fflush( stdout );
jsi->getInput();
if (strcmp(answer,"n")==0) {
control--;
} else {
+ invert[control]=!jsi->getInputAxisPositive();
if (usexml) {
writeAxisXML( xfs[jsi->getInputJoystick()], control, jsi->getInputAxis() );
} else {
} else {
cout << "Press the button you wish to use for " << button_humannames[control] << endl;
}
+ cout << "Moving a joystick axis skips this button\n";
fflush( stdout );
jsi->getInput();
if(jsi->getInputButton() != -1) {
jsInput::~jsInput(void) {}
-int jsInput::getInput(void){
+int jsInput::getInput(){
bool gotit=false;
int i, current_button = 0, button_bits = 0;
joystick=axis=button=-1;
+ axis_positive=false;
if(pretty_display) {
printf ( "+----------------------------------------------\n" ) ;
gotit=true;
joystick=jss->getCurrentJoystickId();
axis=i;
+ axis_positive=(delta>0);
} else if( current_button != 0 ) {
gotit=true;
joystick=jss->getCurrentJoystickId();
ulMilliSecondSleep(1);
}
if(button_bits != 0) {
- for(int i=1;i<=31;i++) {
+ for(int i=0;i<=31;i++) {
if( ( button_bits & (1 << i) ) > 0 ) {
button=i;
break;