Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed timeout guard per button #82

Merged
merged 1 commit into from
Apr 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions dasshio/dasshio.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,6 @@ def arp_display(pkt):
for button in config["buttons"]:
button_address = button["address"].lower()
if mac == button_address:
last_pressed = timeout_guard[button_address]
guard_time = last_pressed + timedelta(seconds=int(button_timeout))
if current_time < guard_time:
logger.info("Packet captured from button " + button["name"] +
" ignored during guard time of " + str(button_timeout) + "s ...")
return True
timeout_guard[button_address] = current_time

logger.info(button["name"] + " button pressed!")

url_request = ""
Expand Down Expand Up @@ -121,7 +113,6 @@ def arp_display(pkt):
# Check config parameters
button_counter = 0
error = False
timeout_guard = {}

for button in config["buttons"]:
button_counter = button_counter + 1
Expand Down