From e3ca1628e13f3a45aa82b1eacd65e31a514e525f Mon Sep 17 00:00:00 2001 From: Ace Date: Sat, 5 Dec 2020 00:16:57 +0100 Subject: [PATCH] reduced logging output for display --- inkycal/display/drivers/epdconfig.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/inkycal/display/drivers/epdconfig.py b/inkycal/display/drivers/epdconfig.py index 7f50759..0e2fd7b 100644 --- a/inkycal/display/drivers/epdconfig.py +++ b/inkycal/display/drivers/epdconfig.py @@ -6,7 +6,7 @@ # *---------------- # * | This version: V1.0 # * | Date : 2019-06-21 -# * | Info : +# * | Info : # ****************************************************************************** # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documnetation files (the "Software"), to deal @@ -32,6 +32,8 @@ import logging import sys import time +filename = os.path.basename(__file__).split('.py')[0] +logger = logging.getLogger(filename) class RaspberryPi: # Pin definition @@ -73,10 +75,10 @@ class RaspberryPi: return 0 def module_exit(self): - logging.debug("spi end") + logger.debug("spi end") #self.SPI.close() #removed as it causes some problems - logging.debug("close 5V, Module enters 0 power consumption ...") + logger.debug("close 5V, Module enters 0 power consumption ...") self.GPIO.output(self.RST_PIN, 0) self.GPIO.output(self.DC_PIN, 0) @@ -132,10 +134,10 @@ class JetsonNano: return 0 def module_exit(self): - logging.debug("spi end") + logger.debug("spi end") self.SPI.SYSFS_software_spi_end() - logging.debug("close 5V, Module enters 0 power consumption ...") + logger.debug("close 5V, Module enters 0 power consumption ...") self.GPIO.output(self.RST_PIN, 0) self.GPIO.output(self.DC_PIN, 0)