diff --git a/conf/func_usbbtn.py b/conf/func_usbbtn.py index 51ead72..7cee0fe 100644 --- a/conf/func_usbbtn.py +++ b/conf/func_usbbtn.py @@ -84,6 +84,7 @@ def __init__(self): def source_led_blink(self): while True: + print(source) if source == 'Tuner': p = GPIO.PWM(TunerPin, 1000) # set Frequece to 1KHz p.start(0) # Duty Cycle = 0 diff --git a/main.py b/main.py index bb252da..ad81e0f 100755 --- a/main.py +++ b/main.py @@ -58,20 +58,20 @@ except (SystemExit): logger.info("Anwendung beendet") - destroy() + usbbtn.destroy_led_blink() exit() except (KeyboardInterrupt): logger.info("via Tastatur beendet") - destroy() + usbbtn.destroy_led_blink() exit() except Exception as e: logger.error("main crashed {0}".format(str(e))) logger.exception("Error") - destroy() + usbbtn.destroy_led_blink() raise except: logger.info("Unbekannter Fehler:", sys.exc_info()[0]) - destroy() + usbbtn.destroy_led_blink() raise # else: # pass