Skip to content

Commit

Permalink
Try to fix issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
hubmartin committed Sep 20, 2021
1 parent 9f7c691 commit 5ddebd3
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions client/waveshare_epd/epd7in5_V2.py
Expand Up @@ -128,14 +128,22 @@ def send_data2(self, data):
epdconfig.digital_write(self.cs_pin, 1)

def ReadBusy(self):
logger.debug("e-Paper busy")
logging.debug("e-Paper busy")
self.send_command(0x71)
busy = epdconfig.digital_read(self.busy_pin)
while(busy == 0):
iter = 0
while epdconfig.digital_read(self.busy_pin) == 0:
self.send_command(0x71)
busy = epdconfig.digital_read(self.busy_pin)
epdconfig.delay_ms(20)
logger.debug("e-Paper busy release")
epdconfig.delay_ms(100)
iter += 1
if iter > 150:
logging.debug("Forced e-paper busy release")
break
logging.debug("e-Paper busy release")
#busy = epdconfig.digital_read(self.busy_pin)
#while(busy == 0):
# self.send_command(0x71)
# busy = epdconfig.digital_read(self.busy_pin)
#epdconfig.delay_ms(200)

def SetLut(self, lut_vcom, lut_ww, lut_bw, lut_wb, lut_bb):
self.send_command(0x20)
Expand Down

0 comments on commit 5ddebd3

Please sign in to comment.