// Below is for analog prop pitch contol w/ mag switch contol in shifted mode.
CMS.B1 = (JS1.B4 AND JS2.B13); // Mags next in shift mode.
CMS.B2 = (JS1.B4 AND JS2.B15); // Mags prev in shift mode.
B1 = JS2.B13 AND NOT JS1.B4; // Prop pitch axis + variable
B2 = JS2.B15 AND NOT JS1.B4; // Prop pitch axis - variable
// Prop Axis vaiables for faster movement
TIMER ( ONDELAY, D1, 38 ) = JS2.B13 AND NOT JS1.B4;
TIMER ( ONDELAY, D2, 38 ) = JS2.B15 AND NOT JS1.B4;
SEQUENCE
IF (B1 AND NOT D1) THEN CMS.A1 = (CMS.A1 - 1);
ENDIF // Increase prop pitch
DELAY (1);
ENDSEQUENCE
SEQUENCE
IF (D1) THEN CMS.A1 = (CMS.A1 - 1);
ENDIF // Increase prop pitch faster
ENDSEQUENCE
SEQUENCE
IF ( B2 AND NOT D2 ) THEN CMS.A1 = (CMS.A1 + 1);
ENDIF // Decrease prop pitch
DELAY (1);
ENDSEQUENCE
SEQUENCE
IF ( D2 ) THEN CMS.A1 = (CMS.A1 + 1);
ENDIF // Decrease prop pitch
ENDSEQUENCE
IF ( [ CMS.A1 > 255 ] ) THEN CMS.A1 = 255; // If too high,
ENDIF // then set axis to the maximum allowable
IF ( [ CMS.A1 < 0 ] ) THEN CMS.A1 = 0; // If too low,
ENDIF // then set axis to the minium allowable