24 #include <MD_Parola.h>
25 #include <MD_Parola_lib.h>
27 void MD_Parola::effectClose(
bool bLightBar,
bool bIn)
30 static int16_t offset;
39 PRINT_STATE(
"I CLOSE");
44 _D.setColumn(_limitLeft, LIGHTBAR);
45 _D.setColumn(_limitRight,LIGHTBAR);
51 PRINT_STATE(
"I CLOSE");
52 FSMPRINT(
" - offset ", offset);
56 const uint16_t halfWidth = (_limitLeft-_limitRight)/2;
58 if (offset > halfWidth)
64 for (uint16_t i=_limitRight+offset+1; i<_limitLeft-offset; i++)
68 if (bLightBar && (offset <= halfWidth))
70 _D.setColumn(_limitLeft - offset, LIGHTBAR);
71 _D.setColumn(_limitRight + offset, LIGHTBAR);
78 PRINT_STATE(
"I CLOSE");
90 PRINT_STATE(
"O CLOSE");
91 FSMPRINT(
" - limits R:", _limitRight);
92 FSMPRINT(
" L:", _limitLeft);
93 offset = (_limitLeft-_limitRight)/2;
94 FSMPRINT(
" O:", offset);
99 _D.setColumn(_limitLeft-offset, LIGHTBAR);
100 _D.setColumn(_limitRight+offset, LIGHTBAR);
102 _fsmState = PUT_CHAR;
106 PRINT_STATE(
"O CLOSE");
107 FSMPRINT(
" - offset ", offset);
114 _D.setColumn(_limitLeft - offset, 0);
115 _D.setColumn(_limitRight + offset, 0);
118 if (bLightBar && (offset >= 0))
120 _D.setColumn(_limitLeft - offset, LIGHTBAR);
121 _D.setColumn(_limitRight + offset, LIGHTBAR);
127 PRINT_STATE(
"O CLOSE");