autoscroll() bug
Opened this issue · 0 comments
fsincere commented
I tried Screen.autoscroll() with MicroPython 1.17 on NUCLEO-L476RG board,
and Grove 16x2 LCD RGB backlight v4.0
It does not work.
Here is my fix :
def autoscroll(self, state):
if state:
# self.disp_ctrl |= self.LCD_ENTRYSHIFTINCREMENT
# self.cmd(self.LCD_DISPLAYCONTROL | self.disp_ctrl)
self.disp_mode |= self.LCD_ENTRYSHIFTINCREMENT
self.cmd(self.LCD_ENTRYMODESET | self.disp_mode)
else:
# self.disp_ctrl &= ~self.LCD_ENTRYSHIFTINCREMENT
# self.cmd(self.LCD_DISPLAYCONTROL | self.disp_ctrl)
self.disp_mode &= ~self.LCD_ENTRYSHIFTINCREMENT
self.cmd(self.LCD_ENTRYMODESET | self.disp_mode)