From 1aa5235f1764a26a4f134f3a46d4575f6e796b99 Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 8 Jun 2001 05:49:32 +0000 Subject: [PATCH] Updated to work with David's new property naming conventions. --- src/Input/Makefile.am | 2 +- src/Input/fgjs.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Input/Makefile.am b/src/Input/Makefile.am index 25948add6..a5b1a4524 100644 --- a/src/Input/Makefile.am +++ b/src/Input/Makefile.am @@ -10,6 +10,6 @@ js_demo_LDADD = $(audio_LIBS) fgjs_SOURCES = fgjs.cxx jsinput.cxx jssuper.cxx -fgjs_LDADD = +fgjs_LDADD = $(audio_LIBS) INCLUDES += -I$(top_srcdir) -I$(top_srcdir)/src diff --git a/src/Input/fgjs.cxx b/src/Input/fgjs.cxx index 5745aa4d8..d875aff38 100644 --- a/src/Input/fgjs.cxx +++ b/src/Input/fgjs.cxx @@ -52,8 +52,8 @@ string button_humannames[7]= { "apply all brakes", "apply left brake", "apply nose-down trim" }; -string button_propnames[7]={ "/controls/brakes/all", "/controls/brakes/left", - "/controls/brakes/right", "/controls/flaps", +string button_propnames[7]={ "/controls/brakes/all", "/controls/brakes[0]", + "/controls/brakes[1]", "/controls/flaps", "/controls/flaps","/controls/elevator-trim", "/controls/elevator-trim" }; @@ -85,7 +85,7 @@ void waitForButton(jsSuper *jss, int wait_ms) { void writeAxisProperties(fstream &fs, int control,int joystick, int axis) { char jsDesc[25]; - snprintf(jsDesc,25,"--prop:/input/js%d/axis%d",joystick,axis); + snprintf(jsDesc,25,"--prop:/input/joysticks/js[%d]/axis[%d]",joystick,axis); fs << jsDesc << "/control=" << axes_propnames[control] << endl; fs << jsDesc << "/dead-band=0.02" << endl; @@ -103,7 +103,7 @@ void writeAxisProperties(fstream &fs, int control,int joystick, int axis) { void writeButtonProperties(fstream &fs, int property,int joystick, int button) { char jsDesc[25]; - snprintf(jsDesc,25,"--prop:/input/js%d/button%d",joystick,button); + snprintf(jsDesc,25,"--prop:/input/joysticks/js%d/button[%d]",joystick,button); fs << jsDesc << "/action=adjust" << endl; fs << jsDesc << "/control=" << button_propnames[property] << endl; -- 2.39.5