24 #include <MD_Parola.h>
25 #include <MD_Parola_lib.h>
27 void MD_Parola::effectOpen(
bool bLightBar,
bool bIn)
30 static int16_t offset;
39 PRINT_STATE(
"I OPEN");
40 FSMPRINT(
" - limits R:", _limitRight);
41 FSMPRINT(
" L:", _limitLeft);
42 offset = 1 + (_limitLeft-_limitRight)/2;
43 FSMPRINT(
" O:", offset);
46 _D.setColumn(_limitLeft-offset, LIGHTBAR);
47 _D.setColumn(_limitRight+offset, LIGHTBAR);
53 PRINT_STATE(
"I OPEN");
54 FSMPRINT(
" - offset ", offset);
63 for (int16_t i=0; i<offset; i++)
65 _D.setColumn(_limitRight + i, 0);
66 _D.setColumn(_limitLeft - i, 0);
70 if (bLightBar && (offset >= 0))
72 _D.setColumn(_limitRight + offset, LIGHTBAR);
73 _D.setColumn(_limitLeft - offset, LIGHTBAR);
79 PRINT_STATE(
"I OPEN");
90 PRINT_STATE(
"O OPEN");
96 _D.setColumn(_limitLeft, LIGHTBAR);
97 _D.setColumn(_limitRight,LIGHTBAR);
103 PRINT_STATE(
"O OPEN");
104 FSMPRINT(
" - offset ", offset);
105 if (offset > (_limitLeft-_limitRight)/2)
111 _D.setColumn(_limitLeft-offset, 0);
112 _D.setColumn(_limitRight+offset, 0);
114 if (bLightBar && (offset <= (_limitLeft-_limitRight)/2))
116 _D.setColumn(_limitLeft-offset, LIGHTBAR);
117 _D.setColumn(_limitRight+offset,LIGHTBAR);
123 PRINT_STATE(
"O OPEN");