24 #include <MD_Parola.h>
25 #include <MD_Parola_lib.h>
27 #define START_POSITION (effectSelect == SCROLL_RIGHT) ? _D.getColumnCount()-1 : 0
28 #define SCROLL_DIRECTION (effectSelect == SCROLL_RIGHT) ? MD_MAX72XX::TSR : MD_MAX72XX::TSL
30 void MD_Parola::effectHScroll(textEffect_t effectSelect,
bool bIn)
38 PRINT_STATE(
"I HSCROLL");
40 if ((_charCols = getFirstChar()) == 0)
50 PRINT_STATE(
"I HSCROLL");
53 _charCols = getNextChar();
54 FSMPRINT(
"\ncharCols ", _charCols);
63 FSMPRINTS(
", fall thru");
67 PRINT_STATE(
"I HSCROLL");
69 _D.transform(SCROLL_DIRECTION);
70 _D.setColumn(START_POSITION, _cBuf[_countCols++]);
71 FSMPRINTS(
", scroll");
74 if (_countCols == _charCols)
77 _fsmState = GET_NEXT_CHAR;
81 _countCols = (effectSelect ==
SCROLL_RIGHT ? _D.getColumnCount()-_limitLeft-1 : _limitLeft-_textLen);
82 FSMPRINT(
", filler count ", _countCols);
83 _fsmState = (_countCols <= 0) ? PAUSE : PUT_FILLER;
89 PRINT_STATE(
"I HSCROLL");
91 _D.transform(SCROLL_DIRECTION);
94 if (--_countCols == 0)
110 PRINT_STATE(
"O HSCROLL");
111 _fsmState = PUT_FILLER;
112 FSMPRINTS(
" falling thru");
116 PRINT_STATE(
"O HSCROLL");
117 _D.transform(SCROLL_DIRECTION);
120 for (uint16_t i=0; (i<_D.getColumnCount()) && b; i++)
121 b &= (_D.getColumn(i) == 0);
123 if (b) _fsmState = END;