pabletesoy Posted July 8, 2020 Posted July 8, 2020 Hello: I want (in Target script) to apply two functions to the same button. In the standard layer, the trim and in the Up layer, the mouse control, and the control the amount of movement with an Curce function: Somethis like this: MapKeyUMD(&Joystick, H1U, AXIS(MOUSE_Y_AXIS, -80, 20), R_SHIFT+DARROW); // Mouse Up, Tim Up SetSCurve(&Throttle, SCX, 0, 0, 0, 20, 0); // Control curve The question is: how can I apply a trim curve funtion and a mouse curve funtion? Thanks!
lxsapper Posted July 8, 2020 Posted July 8, 2020 Ok before I am able to help I need to get a few things clearer. You want this two functions to work on the Hat1 correct? Because the: SetSCurve(&Throttle, SCX, 0, 0, 0, 20, 0); // Control curve is for the X axis on the ministick. Are you also trying to do something on the mini-stick? Also the TARGET trim curve function is not meant for the game function (R_SHIFT+DARROW) so I assume that's the trimming you want to apply), the TARGET Trim is meant to change on the fly the way an axis responds, you can off set it, effectively trimming, or you can dynamically change the response curve. All of this is possible you just have to realize what is it you actually want to do.
pabletesoy Posted July 8, 2020 Author Posted July 8, 2020 Mmm...I don't know if I understand you ... what I want to do is use Hat 1 for the trim of the plane and to handle the mouse, depending on the layer. That is easy, the problem is that I want to control the curve of the movement of the mousebecause is very linear. When I use the curve function, I guess it is affecting the trim and the mouse, is itcorrect? what really whant is that the curve only affects the mouse. Sorry for my english!
pabletesoy Posted July 10, 2020 Author Posted July 10, 2020 May be a better way to ask is if it,s possible to use IOUMD with SetSCurve, so we can apply different curve configuations to each diferent action in the same buttom. I hope I explained myself this time.
Lange_666 Posted July 10, 2020 Posted July 10, 2020 (edited) I'm using something like this for the stick's X-axis (for use when refeuling). Each S1 button press in Out/Up (OU) switches to the next axis curve. Led's are there to see which curve is active. //Button S1 (OD): TrackIR Reset or VR_Center - (OU): TrackIR On/Off) - (IM): Change stick axis behaviour MapKeyIOUMD(&Joystick, S1, 0,// (IU): not used SEQ( // (OU) Change Stick Axis behaviour - open the sequence ......CHAIN( ...............EXEC( // curve 1, flatter then normal ......................."SetSCurve(&Joystick, JOYX, 0, 0, 0, 2, 0); SetSCurve(&Joystick, JOYY, 0, 0, 0, 2, 0);" ), ...LED(&Throttle, LED_ONOFF, LED_CURRENT+LED2), ...LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4) ), ......CHAIN( ...............EXEC( // curve 2, even flatter then curve 1 ......................."SetSCurve(&Joystick, JOYX, 0, 0, 0, 4, 0); SetSCurve(&Joystick, JOYY, 0, 0, 0, 4, 0);" ), ...LED(&Throttle, LED_ONOFF, LED_CURRENT+LED4), ...LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2) ), ......CHAIN( ...............EXEC( // reset to normal curve ......................."SetSCurve(&Joystick, JOYX, 0, 0, 0 ,0, 0); SetSCurve(&Joystick, JOYY, 0, 0, 0 ,0, 0);" ), ...LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2), ...LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4) )), //close the Sequence 0, // (IM): not used 0, // (OM): not used PULSE+TrackIR_On_Off, // (ID): PULSE+TrackIR_Center); // (OD) or VR_Center when in VR Edited July 10, 2020 by Lange_666 Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL. Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!
lxsapper Posted July 10, 2020 Posted July 10, 2020 (edited) @pabletesoy I think I know what you want, try this: MapKeyUMD(&Joystick, H1U, AXIS(MOUSE_Y_AXIS, -80, 20), R_SHIFT+DARROW, R_SHIFT+DARROW); //This will give you Trim in both M (standart) and D layers or this: MapKeyUMD(&Joystick, H1U, AXIS(MOUSE_Y_AXIS, -80, 20), R_SHIFT+DARROW, 0); //This will make the D layer a Null Command (no function) SetCustomCurve is only for axis inputs since you are using a digital input to control the mouse the rate of that movement is defined by the "-80, 20" numbers, play with those to get a different response. Let us know if it helped. Edited July 10, 2020 by lxsapper
pabletesoy Posted July 12, 2020 Author Posted July 12, 2020 Thanks to all for the feedback. The EXEC command is very interesting, I have opted for the Ixsapper option because is easy, but I am going to study the Lange 666 option for other cases later. Again thank you very much!
Recommended Posts