From b5b571c3b2fce0668908984df7182bd159830c72 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Wed, 24 Jul 2024 15:44:33 -0700 Subject: [PATCH] fixes --- mesh_bot.py | 18 +++++++++--------- pong_bot.py | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mesh_bot.py b/mesh_bot.py index c89c1b9..fb3c281 100755 --- a/mesh_bot.py +++ b/mesh_bot.py @@ -8,7 +8,7 @@ from pubsub import pub # pip install pubsub from modules.settings import * from modules.system import * -def auto_response(message, snr, rssi, hop, message_from_id, channel_number): +def auto_response(message, snr, rssi, hop, message_from_id, channel_number, deviceID): #Auto response to messages if "ping" in message.lower(): #Check if the user added @foo to the message @@ -55,7 +55,7 @@ def auto_response(message, snr, rssi, hop, message_from_id, channel_number): elif "cmd" in message.lower(): bot_response = help_message elif "sun" in message.lower(): - location = get_node_location(message_from_id) + location = get_node_location(message_from_id, deviceID) bot_response = get_sun(str(location[0]),str(location[1])) elif "hfcond" in message.lower(): bot_response = hf_band_conditions() @@ -64,31 +64,31 @@ def auto_response(message, snr, rssi, hop, message_from_id, channel_number): elif "lheard" in message.lower() or "sitrep" in message.lower(): bot_response = "Last heard:\n" + str(get_node_list()) elif "whereami" in message.lower(): - location = get_node_location(message_from_id) + location = get_node_location(message_from_id, deviceID) where = where_am_i(str(location[0]),str(location[1])) bot_response = where elif "tide" in message.lower(): - location = get_node_location(message_from_id) + location = get_node_location(message_from_id, deviceID) tide = get_tide(str(location[0]),str(location[1])) bot_response = tide elif "moon" in message.lower(): - location = get_node_location(message_from_id) + location = get_node_location(message_from_id, deviceID) moon = get_moon(str(location[0]),str(location[1])) bot_response = moon elif "wxalert" in message.lower(): - location = get_node_location(message_from_id) + location = get_node_location(message_from_id, deviceID) weatherAlert = getActiveWeatherAlertsDetail(str(location[0]),str(location[1])) bot_response = weatherAlert elif "wxa" in message.lower(): - location = get_node_location(message_from_id) + location = get_node_location(message_from_id, deviceID) weatherAlert = getWeatherAlerts(str(location[0]),str(location[1])) bot_response = weatherAlert elif "wxc" in message.lower(): - location = get_node_location(message_from_id) + location = get_node_location(message_from_id, deviceID) weather = get_weather(str(location[0]),str(location[1]),1) bot_response = weather elif "wx" in message.lower(): - location = get_node_location(message_from_id) + location = get_node_location(message_from_id, deviceID) weather = get_weather(str(location[0]),str(location[1])) bot_response = weather elif "joke" in message.lower(): diff --git a/pong_bot.py b/pong_bot.py index 7b5efac..f8b7cd7 100755 --- a/pong_bot.py +++ b/pong_bot.py @@ -8,7 +8,7 @@ from pubsub import pub # pip install pubsub from modules.settings import * from modules.system import * -def auto_response(message, snr, rssi, hop, message_from_id, channel_number): +def auto_response(message, snr, rssi, hop, message_from_id, channel_number, deviceID): # Auto response to messages if "ping" in message.lower(): # Check if the user added @foo to the message