- Messages
- 189
- Country

Hello
I wrote the CallbackCode below for a KA51 switch . Pilot can adjust the gyro drift error with the bottom switch :
left : CCW (0)
spring back to center : no adjust (1)
right - CW (2)
The anim of the switch is works great, but the drift error changes only once for a click. Yes I know that it is normal
but I'd like to know how to get continous change until I hold down the mouse button.
Maybe I need a L: variable, which stepped in <CallbackCode> and put this value to GYRO_DRIFT_SET in the <Code> section ?
I wrote the CallbackCode below for a KA51 switch . Pilot can adjust the gyro drift error with the bottom switch :
left : CCW (0)
spring back to center : no adjust (1)
right - CW (2)
The anim of the switch is works great, but the drift error changes only once for a click. Yes I know that it is normal
Maybe I need a L: variable, which stepped in <CallbackCode> and put this value to GYRO_DRIFT_SET in the <Code> section ?

Code:
<CallbackCode>
(M:Event) 'LeftSingle' scmi 0 ==
if{ 0 (>L:ka51drift, enum) (>K:GYRO_DRIFT_INC) }
(M:Event) 'LeftRelease' scmi 0 ==
if{ 1 (>L:ka51drift, enum) }
(M:Event) 'RightSingle' scmi 0 ==
if{ 2 (>L:ka51drift, enum) (>K:GYRO_DRIFT_DEC) }
(M:Event) 'RightRelease' scmi 0 ==
if{ 1 (>L:ka51drift, enum) }
</CallbackCode>

