From d0c413b0feea37958931a8728d7f27c8e3be3606 Mon Sep 17 00:00:00 2001 From: Brian Y Date: Sun, 15 Dec 2019 18:17:22 -0500 Subject: [PATCH] changed set_lut to use list of tuples instead of dictionary --- .../python/lib/waveshare_epd/epd2in7.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py index d17e6aa..d0eaf92 100644 --- a/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py +++ b/RaspberryPi&JetsonNano/python/lib/waveshare_epd/epd2in7.py @@ -277,15 +277,15 @@ class EPD: epdconfig.spi_writebyte2(data) def set_lut(self): - look_up_tables = { - LUT_FOR_VCOM: self.lut_vcom_dc, - LUT_WHITE_TO_WHITE: self.lut_ww, - LUT_BLACK_TO_WHITE: self.lut_bw, - LUT_WHITE_TO_BLACK: self.lut_wb, - LUT_BLACK_TO_BLACK: self.lut_bb - } + look_up_tables = [ + (LUT_FOR_VCOM, self.lut_vcom_dc), + (LUT_WHITE_TO_WHITE, self.lut_ww), + (LUT_BLACK_TO_WHITE, self.lut_bw), + (LUT_WHITE_TO_BLACK, self.lut_wb), + (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(LUT_FOR_VCOM) # vcom