Skip to content

Commit

Permalink
cpu eating fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PiDiBi committed Jun 30, 2024
1 parent 02d6187 commit 23281b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion basic_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def auto_response(
bot_response = None
message = message.lower().strip()
if "ping" in message:
# Check if the user added @foo to the message
bot_response = "PONG, " + f"SNR:{snr} RSSI:{rssi} HOP {hop}"
if " " in message:
bot_response += " and copy: " + message.split(" ")[1]
Expand Down
3 changes: 3 additions & 0 deletions mesh_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Meshtastic Autoresponder MESH Bot

import signal
import time
from typing import List
from pubsub import pub
from basic_bot import BasicBot
Expand Down Expand Up @@ -58,7 +59,9 @@ def exit_handler(signum, frame):

while True:
# Catch CTL+C to exit
time.sleep(0.05)
signal.signal(signal.SIGINT, exit_handler)
time.sleep(0.05)
pass

# EOF

0 comments on commit 23281b2

Please sign in to comment.