Stingray 537 Mongo Posted June 11, 2018 Share Posted June 11, 2018 I found the below thread with regards to the aforementioned subject and decided to give it a try. https://forums.eagle.ru/showthread.php?t=71838 Unfortunately I keep getting compile errors with the below lines. I'm not sure why. include "target.tmh" int main() { Configure(&HCougar, MODE_EXCLUDED); Configure(&T16000, MODE_EXCLUDED); Configure(&T16000L, MODE_EXCLUDED); Configure(&LMFD, MODE_EXCLUDED); Configure(&RMFD, MODE_EXCLUDED); Configure(&TFRPRudder, MODE_EXCLUDED); Configure(&TWCSThrottle, MODE_EXCLUDED); //Ghost script mode definition Configure(&Joystick, MODE_FILTERED); Configure(&Throttle, MODE_FILTERED); //Configure(&LMFD, MODE_FILTERED); //Configure(&RMFD, MODE_FILTERED) if(Init(&EventHandle)) return 1; SetShiftButton(&Joystick, S4); RotateDXAxis(DX_X_AXIS,DX_Y_AXIS, -15) SetKBRate(32, 50); SetKBLayout(KB_ENG); SetShiftButton(0, 0, 0, 0, 0, 0); MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Joystick, JOYX, 0, 12, 0, 3, 0); MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Joystick, JOYY, 0, 12, 0, 3, 0); MapAxis(&Throttle, SCX, MOUSE_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, SCX, 0, 0, 0, 0, 0); MapAxis(&Throttle, SCY, MOUSE_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, SCY, 0, 0, 0, 0, 0); MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, THR_RIGHT, 0, 0, 0, 0, 0); MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, THR_LEFT, 0, 0, 0, 0, 0); MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, THR_FC, 0, 0, 0, 2, 0); } int EventHandle(int type, alias o, int x) { if(&o == &Joystick & !o[s4]) GameOutput(&o, x, o[x]); DefaultMapping(&o, x); } Anyone that has more experience than me know what's wrong here? For the record, I'm making a new thread because the one I found is 7 years old and who knows if it's being monitored anymore. 537 Mongo CO vVF-161 Fightin' Stingrays Check us out on the web! Link to comment Share on other sites More sharing options...
Thermal Posted June 11, 2018 Share Posted June 11, 2018 (edited) Two things: What is the error msg? How much/which config do you need to remove to make it work? (thereby narrowing down what is causing your error) Edited June 11, 2018 by Thermal Link to comment Share on other sites More sharing options...
Stingray 537 Mongo Posted June 11, 2018 Author Share Posted June 11, 2018 Two things: What is the error msg? How much/which config do you need to remove to make it work? (thereby narrowing down what is causing your error)I can't remember the exact message off the top for my head, but when I comment out the code from the linked post, it compiles fine. I can leave in the Filtered Mode lines, and it compiles just fine too but when I try and compile the offset line, with or without the Shift Key line, it won't compile and I get an error. Sent from my Pixel XL using Tapatalk 537 Mongo CO vVF-161 Fightin' Stingrays Check us out on the web! Link to comment Share on other sites More sharing options...
Thermal Posted June 11, 2018 Share Posted June 11, 2018 You have two "SetShiftButton" commands, the second one looks wrong. Link to comment Share on other sites More sharing options...
Stingray 537 Mongo Posted June 11, 2018 Author Share Posted June 11, 2018 You have two "SetShiftButton" commands, the second one looks wrong.I didn't notice that before. When I get home I'll comment out the line that's all zeros and see if it'll compile then. Sent from my Pixel XL using Tapatalk 537 Mongo CO vVF-161 Fightin' Stingrays Check us out on the web! Link to comment Share on other sites More sharing options...
dimebug Posted June 11, 2018 Share Posted June 11, 2018 look like you forgot the ";" at the end of RotateDXAxis(DX_X_AXIS,DX_Y_AXIS, -15) it should be RotateDXAxis(DX_X_AXIS,DX_Y_AXIS, -15); Link to comment Share on other sites More sharing options...
Stingray 537 Mongo Posted June 12, 2018 Author Share Posted June 12, 2018 look like you forgot the ";" at the end of RotateDXAxis(DX_X_AXIS,DX_Y_AXIS, -15) it should be RotateDXAxis(DX_X_AXIS,DX_Y_AXIS, -15); That was definitely the issue. I added the semi-colon and it compiled no problem. Now the issue I'm running into is that the TDC nipple won't work when the script is running. The script as it is, is below. I commented out the Mouse nipple section to see if I could still use the other control mapping but it didn't work. Thoughts? include "target.tmh" int main() { Configure(&HCougar, MODE_EXCLUDED); Configure(&T16000, MODE_EXCLUDED); Configure(&T16000L, MODE_EXCLUDED); Configure(&LMFD, MODE_EXCLUDED); Configure(&RMFD, MODE_EXCLUDED); Configure(&TFRPRudder, MODE_EXCLUDED); Configure(&TWCSThrottle, MODE_EXCLUDED); //Ghost script mode definition Configure(&Joystick, MODE_FILTERED); Configure(&Throttle, MODE_FILTERED); //Configure(&LMFD, MODE_FILTERED); //Configure(&RMFD, MODE_FILTERED) if(Init(&EventHandle)) return 1; SetShiftButton(&Joystick, S4); RotateDXAxis(DX_X_AXIS,DX_Y_AXIS, -15); SetKBRate(32, 50); SetKBLayout(KB_ENG); SetShiftButton(0, 0, 0, 0, 0, 0); MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Joystick, JOYX, 0, 12, 0, 3, 0); MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Joystick, JOYY, 0, 12, 0, 3, 0); //MapAxis(&Throttle, SCX, MOUSE_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); //SetSCurve(&Throttle, SCX, 0, 0, 0, 0, 0); //MapAxis(&Throttle, SCY, MOUSE_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); //SetSCurve(&Throttle, SCY, 0, 0, 0, 0, 0); MapAxis(&Throttle, THR_RIGHT, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, THR_RIGHT, 0, 0, 0, 0, 0); MapAxis(&Throttle, THR_LEFT, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, THR_LEFT, 0, 0, 0, 0, 0); MapAxis(&Throttle, THR_FC, DX_SLIDER_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Throttle, THR_FC, 0, 0, 0, 2, 0); } int EventHandle(int type, alias o, int x) { if(&o == &Joystick & !o[s4]) GameOutput(&o, x, o[x]); DefaultMapping(&o, x); } 537 Mongo CO vVF-161 Fightin' Stingrays Check us out on the web! Link to comment Share on other sites More sharing options...
Frederf Posted June 12, 2018 Share Posted June 12, 2018 You've got 8 axes to play with. Try MapAxis(&Throttle, SCX, DX_XROT_AXIS); and see if the SCX moves the XROTation axis in the Device Analyzer or Windows' joy.cpl. The SCX and SCY normally bind to the throttle's X and Y axes but you've used those for the stick so it's not going to do anything without explicit instructions. Link to comment Share on other sites More sharing options...
Stingray 537 Mongo Posted June 13, 2018 Author Share Posted June 13, 2018 You've got 8 axes to play with. I had been also meaning to ask. What is the Slider 2 axis bound to? Between the stick and throttle I only count 7 axes. Sent from my Pixel XL using Tapatalk 537 Mongo CO vVF-161 Fightin' Stingrays Check us out on the web! Link to comment Share on other sites More sharing options...
Frederf Posted June 14, 2018 Share Posted June 14, 2018 Default throttle is SCX X SCY Y Left Throttle RZ Right Throttle Z Friction Control U Default joystick is JOYX X JOYY Y There are no default axis bindings for Thrustmaster Combined. There are automatic button bindings but no automatic axis bindings. Throttle and slider are known by different names by different software. Officially they are axes U and V. Sometimes you also see: Throttle, Slider Slider0, Slider1 Slider1, Slider2 S0, S1 Link to comment Share on other sites More sharing options...
Recommended Posts