From f42a6e972b0cd0dc3f57921d98757559629c117e Mon Sep 17 00:00:00 2001 From: Ahmet Uludag Date: Fri, 22 Jan 2021 15:04:50 +0300 Subject: [PATCH] Removed class specific arguments from kwargs via "pop". Since this prevents "Serial" from initializing. --- Adafruit_Thermal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Adafruit_Thermal.py b/Adafruit_Thermal.py index 2043d5a..f2aac5b 100644 --- a/Adafruit_Thermal.py +++ b/Adafruit_Thermal.py @@ -72,7 +72,8 @@ def __init__(self, *args, **kwargs): # with the 'firmware=X' argument, where X is the major # version number * 100 + the minor version number (e.g. # pass "firmware=264" for version 2.64. - self.firmwareVersion = kwargs.get('firmware', 268) + self.firmwareVersion = kwargs.pop('firmware', 268) + heatTime = kwargs.pop('heattime', self.defaultHeatTime) if self.writeToStdout is False: # Calculate time to issue one byte to the printer. @@ -109,7 +110,6 @@ def __init__(self, *args, **kwargs): # may occur. The more heating interval, the more # clear, but the slower printing speed. - heatTime = kwargs.get('heattime', self.defaultHeatTime) self.writeBytes( 27, # Esc 55, # 7 (print settings)