From 629989ce22633314f6e840111f1e59837248a9c5 Mon Sep 17 00:00:00 2001 From: Ace Date: Fri, 5 Jan 2024 22:31:38 +0100 Subject: [PATCH] fix not-updating problem This fixes an issue after a driver update where Inkycal would only run for the first run, but not continue rendering images. Cause was an error in the waveshare driver code --- inkycal/display/drivers/epdconfig.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/inkycal/display/drivers/epdconfig.py b/inkycal/display/drivers/epdconfig.py index 8eb40e6..c21941f 100644 --- a/inkycal/display/drivers/epdconfig.py +++ b/inkycal/display/drivers/epdconfig.py @@ -107,22 +107,22 @@ class RaspberryPi: self.SPI.mode = 0b00 return 0 - def module_exit(self): + def module_exit(self, cleanup=False): logger.debug("spi end") self.SPI.close() self.GPIO_RST_PIN.off() self.GPIO_DC_PIN.off() self.GPIO_PWR_PIN.off() - - self.GPIO_RST_PIN.close() - self.GPIO_DC_PIN.close() - # self.GPIO_CS_PIN.close() - self.GPIO_PWR_PIN.close() - self.GPIO_BUSY_PIN.close() - logger.debug("close 5V, Module enters 0 power consumption ...") + if cleanup: + self.GPIO_RST_PIN.close() + self.GPIO_DC_PIN.close() + # self.GPIO_CS_PIN.close() + self.GPIO_PWR_PIN.close() + self.GPIO_BUSY_PIN.close() + class JetsonNano: # Pin definition