0% found this document useful (0 votes)
2 views1 page

Analog Prop Pitch Control Logic

The document outlines the control logic for an analog prop pitch system using a mag switch in shifted mode. It defines conditions for increasing and decreasing the prop pitch based on joystick inputs, with timers for faster movements. Additionally, it includes constraints to ensure the prop pitch remains within a specified range of 0 to 255.

Uploaded by

georgie.warren
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Analog Prop Pitch Control Logic

The document outlines the control logic for an analog prop pitch system using a mag switch in shifted mode. It defines conditions for increasing and decreasing the prop pitch based on joystick inputs, with timers for faster movements. Additionally, it includes constraints to ensure the prop pitch remains within a specified range of 0 to 255.

Uploaded by

georgie.warren
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

// 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

You might also like