chief Posted July 16, 2017 Posted July 16, 2017 (edited) I just wanted to set up the ka50 autopilot modes (descent and enroute mode) to the AP Laste (path, ALT?HDG/ALT) switch. So I would like the ALT to be descent mode, ALT/HDG to be basically off or nothing selected mode and the PATH to be enroute mode. Just like it is when you view it on the collective. SO heres what i did. In the target program I made the ALT and PUSH AND HOLD "D" since you have to do that in the cockpit. If I move the switch to the ALT/HDG I made it Release "D". Then if I move it to the PATH I want it to be the press and release (pulse) "R". When I move it back to ALT/HDG I want it to be another Pulse "R". So it the Event tester It works for the Descent side of things but when i go to enroute it DOES work when I move the switch forward and sends an "R" pulse. But then I move it back to the middle I dont get the "R" pulse to turn it off. Appreciate the help! Ok seems like the only problem I have it when I move the switch from the descent mode (the the switch is in the ALT position) and I want to stop the descent I move it to ALT/HDG and it stops the descent mode but now it engages ENROUTE mode because in that position I told it to press "R" but I only wanted it to press R if the switch is being moved from PATH to ALT/HDG. Edited July 16, 2017 by chief
Frederf Posted July 16, 2017 Posted July 16, 2017 This is my script for the same function. I used the speed brake switch due to its positioning and the spring-loaded descent behavior. MapKey(&Throttle, SPDF, PULSE+DX7); //Route Engage MapKeyR(&Throttle, SPDF, PULSE+DX7); //Route Disengage MapKey(&Throttle, SPDB, DX8); //Descent What you want is the MapKeyR on the PATH to kick out out of route mode and nothing bound to ALT/HDG. In this case the "R" pulse comes once on entering PATH and again on leaving it. Going to descent and neutral never pulses "R". It looks like you're using TARGET GUI which might not have that flexibility.
chief Posted July 16, 2017 Author Posted July 16, 2017 Hey thanks Frederf! I'll just use script to input that. Thanks a bunch!
chief Posted July 25, 2017 Author Posted July 25, 2017 I thought instead of opening another thread that I'd just keep posting my Q's here. Hopefully the experts can help me out. This is a Q for the mirage. So I am using the EAC switch as the autopilot ON/OFF switch. The sw beside it (RDR) I would like to use as the SELECTED ALT HOLD (RDRDIS) and ALTITUDE HOLD (NRM). By default I would always like to keep the switch in the RDRDIS position. What I would like to do is when I turn on the Autopilot with the EACON sw, I would like the software to see what position the RDRALTM sw is currently in and engage that selection. I don't want to have to move the RDRALTM sw to trigger an action. Is this possible? Hopefully that makes sense. In brief I want the TM to see that I am turning on the autopilot and then automatically look at which position the RDRALTM sw is in and engage that on the Autopilot. Thanks a bunch guys!
chief Posted July 25, 2017 Author Posted July 25, 2017 As well why would this: MapKey(&Throttle, PSB, PULSE+"y"); //RWR OFF MapKey(&Throttle, PSM, PULSE+L_CTL+"y"); //RWR TEST MapKey(&Throttle, PSF, PULSE+L_SHIFT+"y"); //RWR ON trigger this on the event tester...and this is moving the switch through the whole range , not just one click forward
Frederf Posted July 25, 2017 Posted July 25, 2017 (edited) MapKey(&Throttle, EACON, EXEC( [color=#d2691e]"if(Throttle[RDRNRM]) ActKey(KEYON+PULSE+DX1); else ActKey(KEYON+PULSE+DX2);"[/color] )); Should do it. Use 'y' not "y" Edited July 25, 2017 by Frederf 1
RightStuff Posted July 25, 2017 Posted July 25, 2017 As well why would this: MapKey(&Throttle, PSB, PULSE+"y"); //RWR OFF MapKey(&Throttle, PSM, PULSE+L_CTL+"y"); //RWR TEST MapKey(&Throttle, PSF, PULSE+L_SHIFT+"y"); //RWR ON trigger this on the event tester...and this is moving the switch through the whole range , not just one click forward Avoid the "L_"-modifiers. I'm quite sure there's an issue with them. I remember having had a similar problem with them while "R_"-modifiers are ok. But pls don't nail me on that: I'll have to verify this tomorrow again.
chief Posted July 25, 2017 Author Posted July 25, 2017 (edited) @Frederf thanks a million. Although that is total greek to me but I can usually decifer things by messing around. So I modified yours slightly for keypresses instead of DX designations. Like this: MapKey(&Throttle, EACON, EXEC("if(Throttle[RDRNRM]) ActKey(KEYON+PULSE+'h'); else ActKey(KEYON+PULSE+L_SHIFT+'h');")); I think it is working EXCEPT when I turn the autopilot on it doesn't trigger an "a" to turn the autopilot on in the event manager. @rightstuff. What Frederf said worked. I totally brain farted and didnt catch the "y " instead of 'y'. Stupid me Edited July 25, 2017 by chief
chief Posted August 13, 2017 Author Posted August 13, 2017 And another quick Q. why is it that I cant get it to press two special keys at the same time. eg. PULSE+HOME+DEL The event tester thinks I pressed and release LSHF
RightStuff Posted August 14, 2017 Posted August 14, 2017 And another quick Q. why is it that I cant get it to press two special keys at the same time. eg. PULSE+HOME+DEL The event tester thinks I pressed and release LSHF As HOME and DEL are "real" keys, you need to chain them to make their commands working: CHAIN(PULSE+HOME, PULSE+DEL) Acts as: press HOME, press DEL and then release HOME, release DEL. If you want to send the commands one after the other, you need so sequence them: SEQ(PULSE+HOME, PULSE+DEL) Acts as: press HOME, release HOME, and then press DEL, release DEL. Maybe a short delay between the two key-presses is neccessary: D(300) -> wait 300ms.
Recommended Posts