When scrolling, pixels are messed up on one side when scrolling RIGHT. Problem is ssd1306.cpp lines 181 + 182:
if( c < 127 ) m_aDispRam[c][row] = m_aDispRam[c-1][row];
if( col == 0 ) m_aDispRam[0][row] = end;
Both lines have incorrect tests in the if(). CHANGE BOTH AS FOLLOWS:
if( c > 0 ) m_aDispRam[c][row] = m_aDispRam[c-1][row];
if( c == 0 ) m_aDispRam[0][row] = end; // or just use else
i.e.
L181: test should be c>0 not <127
L182: test should use 'c' not 'col' (and could entirely be replaced with 'else')
https://github.com/Arcachofo/SimulIDE-dev/blame/74e5996741c599992146caa3b85643025b63d2b2/src/components/outputs/displays/ssd1306.cpp#L181
When scrolling, pixels are messed up on one side when scrolling RIGHT. Problem is ssd1306.cpp lines 181 + 182:
if( c < 127 ) m_aDispRam[c][row] = m_aDispRam[c-1][row]; if( col == 0 ) m_aDispRam[0][row] = end;
Both lines have incorrect tests in the if(). CHANGE BOTH AS FOLLOWS:if( c > 0 ) m_aDispRam[c][row] = m_aDispRam[c-1][row]; if( c == 0 ) m_aDispRam[0][row] = end; // or just use else
i.e. L181: test should be c>0 not <127 L182: test should use 'c' not 'col' (and could entirely be replaced with 'else')Adam.