reduced logging output for display
This commit is contained in:
		| @@ -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) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user