From 04510bebe4dcc2aafd40354c6f803b8a8befbfc5 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 26 Jun 2024 14:56:34 -0700 Subject: [PATCH 1/2] dev --- README.md | 1 + requirements.txt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0730d3a..97dbdf3 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ pip install dadjokes dev enhancments if using visual studio ``` pip install mock +pip install unittest ``` diff --git a/requirements.txt b/requirements.txt index 52fff42..3b2eb90 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,5 @@ geopy maidenhead beautifulsoup4 dadjokes -mock \ No newline at end of file +mock +unittest \ No newline at end of file From 5ad8e09f00bc9bcb7322ecd7d8d1b4b6eed13193 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 26 Jun 2024 14:57:33 -0700 Subject: [PATCH 2/2] Update pong_bot.py --- pong_bot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pong_bot.py b/pong_bot.py index 20bb568..40e3943 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -3,6 +3,7 @@ # K7MHI Kelly Keeton 2024 import signal # for catching CTL+C +import time # for sleep, get some when you can :) from pubsub import pub # pip install pubsub import meshtastic.serial_interface #pip install meshtastic import meshtastic.tcp_interface @@ -66,6 +67,9 @@ def auto_response(message, snr, rssi, hop): bot_response = "Last 5 nodes heard:\n" + str(get_node_list()) else: bot_response = "I'm sorry, I'm afraid I can't do that." + + # wait a 700ms to avoid message collision from lora-ack + time.sleep(0.7) return bot_response