changed set_lut to use list of tuples instead of dictionary
This commit is contained in:
parent
e3bdb4fe5c
commit
d0c413b0fe
1 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue