changed set_lut to use list of tuples instead of dictionary

This commit is contained in:
Brian Y 2019-12-15 18:17:22 -05:00
commit d0c413b0fe

View file

@ -277,15 +277,15 @@ class EPD:
epdconfig.spi_writebyte2(data) epdconfig.spi_writebyte2(data)
def set_lut(self): def set_lut(self):
look_up_tables = { look_up_tables = [
LUT_FOR_VCOM: self.lut_vcom_dc, (LUT_FOR_VCOM, self.lut_vcom_dc),
LUT_WHITE_TO_WHITE: self.lut_ww, (LUT_WHITE_TO_WHITE, self.lut_ww),
LUT_BLACK_TO_WHITE: self.lut_bw, (LUT_BLACK_TO_WHITE, self.lut_bw),
LUT_WHITE_TO_BLACK: self.lut_wb, (LUT_WHITE_TO_BLACK, self.lut_wb),
LUT_BLACK_TO_BLACK: self.lut_bb (LUT_BLACK_TO_BLACK, self.lut_bb)
} ]
for command, lut in look_up_tables.items(): for (command, lut) in look_up_tables:
self.send_command_and_data(command, data=lut) self.send_command_and_data(command, data=lut)
# self.send_command(LUT_FOR_VCOM) # vcom # self.send_command(LUT_FOR_VCOM) # vcom