Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
845 B
1
Indexable
Never
IF control.stepPos <> control.prevPos THEN
    CASE control.stepPos OF
        0:
            CASE control.prevPos OF
                3: stepPos := stepPos + 1;
                1: stepPos := stepPos - 1;
            END_CASE;
        1:
            CASE control.prevPos OF
                0: stepPos := stepPos + 1;
                2: stepPos := stepPos - 1;
            END_CASE;
        2:
            CASE control.prevPos OF
                1: stepPos := stepPos + 1;
                3: stepPos := stepPos - 1;
            END_CASE;
        3:
            CASE control.prevPos OF
                2: stepPos := stepPos + 1;
                0: stepPos := stepPos - 1;
            END_CASE;
    END_CASE;
END_IF

IF stepPos <= 0 THEN
    switch := TRUE;
ELSE
    switch := FALSE;
END_IF

Angle := 0.36 * stepPos;
Leave a Comment