I posted this elsewhere, but here is a routine that will let you use the analog microstick for the flir, while allowing digital functionality for the radar slew. It also allows the range knob to act as an analog axis (comanche and hokum) or a digital zoom (apache and havoc). Logic codes X21 and X22 are turned on with the command for the Ground and Air Radar respectively, and turned off when reverting to a passive sensor.
MIX 3 X30 ^ X31
MIY 3 X32 ^ X33
DEF X34 X30 AND (X22 OR X21)
DEF X35 X31 AND (X22 OR X21)
DEF X36 X32 AND (X22 OR X21)
DEF X37 X33 AND (X22 OR X21)
BTN X34 /A Sensor_left
BTN X35 /A Sensor_right
BTN X36 /A Sensor_down
BTN X37 /A Sensor_Up
Rem doubles as analog and digital range, /I analog only for reset
RNG /I ^
/O 1 6 Increase_Range Decrease_Range ^Finally, here is the logical code for the T1 button. You can set delays to allow buttons to have separate functions based on the time held (or not held in this case as well). The T1 has four functions based on length of hold as well as S3 (shift function).
BTN T1 KD(X18) DLY(60) KU(X18) rem set for tap (lock)
DEF X4 NOT S3 AND NOT T1 AND X18
BTN X4 Target_lock_unlock
DEF X5 DELAY (300) NOT S3 AND T1
BTN X5 Sensor_center
BTN X20 FLIRGndStabilized
DEF X20 DELAY (300) T1 AND S3 AND NOT X21 AND NOT X22
BTN X23 Target_visual_lock_unlock
DEF X23 S3 AND NOT T1 AND X18
You;ll notice that T1 itself doesn't do anything except activate the X18 flag for 60ms. S3 notwithstanding, everything else is based on whether T1 is released within 60ms (tap), or held for 300ms (hold). Notice that the taps indicate X18 and that T1 is not pressed, which only occurs between the time that the T1 is released and the 60ms that starts when T1 is pressed..