Revert "Adding original screen clearing LUT to help prevent burn-in"

This reverts commit dfcc2f6bf28528bcb659c1deece7140999c9c90a.
This commit is contained in:
Justin Richards 2019-10-27 19:36:29 -05:00
parent 92773a2b37
commit 7676b55b87

View File

@ -58,10 +58,10 @@ class EPD:
self.height = EPD_HEIGHT self.height = EPD_HEIGHT
lut_vcomDC = [ lut_vcomDC = [
0x99, 0x20, 0x20, 0x20, 0x20, 0x06, 0x00, 0x08, 0x00, 0x00, 0x00, 0x02,
0x00, 0x20, 0x20, 0x00, 0x00, 0x02, 0x60, 0x28, 0x28, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -69,46 +69,44 @@ class EPD:
] ]
lut_ww = [ lut_ww = [
0x66, 0x06, 0x06, 0x06, 0x06, 0x04, 0x40, 0x08, 0x00, 0x00, 0x00, 0x02,
0xAA, 0x32, 0x32, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
] ]
lut_bw = [ lut_bw = [
0x66, 0x06, 0x06, 0x06, 0x06, 0x04, 0x40, 0x17, 0x00, 0x00, 0x00, 0x02,
0xAA, 0x32, 0x32, 0x00, 0x00, 0x02, 0x90, 0x0F, 0x0F, 0x00, 0x00, 0x03,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x0A, 0x01, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x0E, 0x0E, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
] ]
lut_wb = [ lut_wb = [
0x99, 0x06, 0x06, 0x06, 0x06, 0x04, 0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
0x55, 0x42, 0x42, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
] ]
lut_bb = [ lut_bb = [
0x99, 0x06, 0x06, 0x06, 0x06, 0x04, 0x80, 0x08, 0x00, 0x00, 0x00, 0x02,
0x55, 0x42, 0x42, 0x00, 0x00, 0x02, 0x90, 0x28, 0x28, 0x00, 0x00, 0x00,
0x80, 0x14, 0x00, 0x00, 0x00, 0x01,
0x50, 0x12, 0x12, 0x00, 0x00, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, ]
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
]
lut_vcom1 = [ lut_vcom1 = [
0xA0, 0x10, 0x10, 0x00, 0x00, 0x02, 0xA0, 0x10, 0x10, 0x00, 0x00, 0x02,
@ -235,32 +233,16 @@ class EPD:
return 0 return 0
def SetFullReg(self): def SetFullReg(self):
self.send_command(0x00) # panel setting self.send_command(0x82)
self.send_data(0x9f) # LUT from OTP,128x296 self.send_data(0x00)
#self.send_command(0x82) self.send_command(0X50)
#self.send_data(0x00) self.send_data(0x97)
#self.send_command(0X50) # self.send_command(0x00) # panel setting
#self.send_data(0x97) # self.send_data(0x9f) # LUT from OTP,128x296
#self.send_command(0x20) # vcom
#for count in range(0, 44):
# self.send_data(self.lut_vcomDC[count])
#self.send_command(0x21) # ww --
#for count in range(0, 42):
# self.send_data(self.lut_ww[count])
#self.send_command(0x22) # bw r
#for count in range(0, 42):
# self.send_data(self.lut_bw[count])
#self.send_command(0x23) # wb w
#for count in range(0, 42):
# self.send_data(self.lut_wb[count])
#self.send_command(0x24) # bb b
#for count in range(0, 42):
# self.send_data(self.lut_bb[count])
def SetPartReg(self): def SetPartReg(self):
self.send_command(0x00) # panel setting # self.send_command(0x00) # panel setting
self.send_data(0xbf) # LUT from OTP,128x296 # self.send_data(0xbf) # LUT from OTP,128x296
self.send_command(0x82) self.send_command(0x82)
self.send_data(0x03) self.send_data(0x03)
self.send_command(0X50) self.send_command(0X50)
@ -354,17 +336,16 @@ class EPD:
def Clear(self): def Clear(self):
self.send_command(0x10) self.send_command(0x10)
for i in range(0, int(self.width * self.height / 8)): for i in range(0, int(self.width * self.height / 8)):
self.send_data(0xFF) self.send_data(0x00)
self.send_command(0x92) epdconfig.delay_ms(10)
self.send_command(0x13) self.send_command(0x13)
for i in range(0, int(self.width * self.height / 8)): for i in range(0, int(self.width * self.height / 8)):
self.send_data(0xFF) self.send_data(0x00)
self.send_command(0x92) epdconfig.delay_ms(10)
self.SetFullReg() self.SetFullReg()
self.send_command(0x12) # REFRESH self.TurnOnDisplay()
self.ReadBusy()
def sleep(self): def sleep(self):
self.send_command(0X50) self.send_command(0X50)