From 9e1970eacac484867f16fbd961f850072cc0efd4 Mon Sep 17 00:00:00 2001 From: Manuel Kamper Date: Thu, 5 Jan 2023 17:23:40 +0000 Subject: [PATCH] fixed #25 --- Keypad.py | 2 +- main.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Keypad.py b/Keypad.py index 2dc5a98..87e7dc3 100644 --- a/Keypad.py +++ b/Keypad.py @@ -5,7 +5,7 @@ debounce_time = 0 class Keypad(): def __init__(self): - self.taste1 = Pin(21, Pin.IN, Pin.PULL_UP) + self.taste1 = Pin(20, Pin.IN, Pin.PULL_UP) self.taste2 = Pin(21, Pin.IN, Pin.PULL_UP) self.taste3 = Pin(18, Pin.IN, Pin.PULL_UP) self.taste4 = Pin(19, Pin.IN, Pin.PULL_UP) diff --git a/main.py b/main.py index 387013c..fcb0c49 100644 --- a/main.py +++ b/main.py @@ -82,7 +82,7 @@ def BuildScreen(): elif (subscreen == 7): ShowText("API key:", secrets['api'], "Up Dwn Ext") elif (subscreen == 8): - ShowText("CPU Frequency:", str(machine.freq()) + " Hz", "Up Dwn Ext") + ShowText("CPU Frequency:", str(machine.freq()/1000000) + " Hz", "Up Dwn Ext") elif (subscreen == 9): ShowText("Firmware vers.:", version, "Up Dwn Ext") elif (subscreen == 10): @@ -153,6 +153,7 @@ def TriggerDoor(): def set_global_exception(): def handle_exception(loop, context): Logger.LogMessage("Fatal error: " + str(context["exception"])) + #todo bei prod-version folgende Zeilen einkommentieren #import sys #sys.print_exception(context["exception"]) #sys.exit() @@ -246,7 +247,7 @@ async def APIHandling(reader, writer): elif (req[2] == "ping"): stateis = "OK" elif (req[2] == "stats"): - stateis = "IP address: " + Networking.GetIPAddress() + "
MAC address: " + Networking.GetMACAddress() + "
Hostname: " + configs['hostname'] + "
API Port: " + str(configs['api_port']) + "
Uptime (h:m): " + Uptime() + "
Date/Time: " + TimeUtils.DateTimeNow() + "
Version: " + version + "
GMT Timezone Offset (hours): " + str(configs['gmt_offset']) + "
Auto summertime: " + str(configs['auto_summertime']) + "
Display off time (mins): " + str(configs['displayoff']) + "
Log incoming bus messages: " + str(configs['log_incoming_bus_messages']) + "
Housekeep logfiles after days: " + str(configs['log_housekeeping_days']) + "
Message 'Front door ringing': " + configs['frontdoor_ringing_message'] + "
Message 'Door ringing': " + configs['door_ringing_message'] + "
Message 'Door opener triggered': " + configs['door_trigger_message'] + "
Message 'Light triggered': " + configs['light_trigger_message'] + stateis = "IP address: " + Networking.GetIPAddress() + "
MAC address: " + Networking.GetMACAddress() + "
Hostname: " + configs['hostname'] + "
API Port: " + str(configs['api_port']) + "
Uptime (h:m): " + Uptime() + "
Date/Time: " + TimeUtils.DateTimeNow() + "
Version: " + version + "
GMT Timezone Offset (hours): " + str(configs['gmt_offset']) + "
Auto summertime: " + str(configs['auto_summertime']) + "
Display off time (mins): " + str(configs['displayoff']) + "
Log incoming bus messages: " + str(configs['log_incoming_bus_messages']) + "
Housekeep logfiles after days: " + str(configs['log_housekeeping_days']) + "
Message 'Front door ringing': " + configs['frontdoor_ringing_message'] + "
Message 'Door ringing': " + configs['door_ringing_message'] + "
Message 'Door opener triggered': " + configs['door_trigger_message'] + "
Message 'Light triggered': " + configs['light_trigger_message'] + "
CPU frequency (MHz): " + str(machine.freq()/1000000) elif (req[2] == "reboot"): stateis = "Rebooting device now..." #todo reboot ausführen