reduced logging output for display

This commit is contained in:
Ace 2020-12-05 00:16:57 +01:00
parent 697401f612
commit e3ca1628e1

View File

@ -6,7 +6,7 @@
# *---------------- # *----------------
# * | This version: V1.0 # * | This version: V1.0
# * | Date : 2019-06-21 # * | Date : 2019-06-21
# * | Info : # * | Info :
# ****************************************************************************** # ******************************************************************************
# Permission is hereby granted, free of charge, to any person obtaining a copy # Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documnetation files (the "Software"), to deal # of this software and associated documnetation files (the "Software"), to deal
@ -32,6 +32,8 @@ import logging
import sys import sys
import time import time
filename = os.path.basename(__file__).split('.py')[0]
logger = logging.getLogger(filename)
class RaspberryPi: class RaspberryPi:
# Pin definition # Pin definition
@ -73,10 +75,10 @@ class RaspberryPi:
return 0 return 0
def module_exit(self): def module_exit(self):
logging.debug("spi end") logger.debug("spi end")
#self.SPI.close() #removed as it causes some problems #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.RST_PIN, 0)
self.GPIO.output(self.DC_PIN, 0) self.GPIO.output(self.DC_PIN, 0)
@ -132,10 +134,10 @@ class JetsonNano:
return 0 return 0
def module_exit(self): def module_exit(self):
logging.debug("spi end") logger.debug("spi end")
self.SPI.SYSFS_software_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.RST_PIN, 0)
self.GPIO.output(self.DC_PIN, 0) self.GPIO.output(self.DC_PIN, 0)