Update mesh-bot.py

This commit is contained in:
SpudGunMan
2024-06-19 14:26:49 -07:00
parent 9622a1e8b8
commit e4c83b0b2a
+6 -2
View File
@@ -65,12 +65,16 @@ def auto_response(message,snr,rssi,hop,message_from_id):
elif "help" in message.lower():
bot_response = help_message
elif "sun" in message.lower():
suntime = get_sunrise_sunset(get_node_location(message_from_id))
location = get_node_location(message_from_id)
lat = location[0]
lon = location[1]
print (f"Using Reported Location: {location}")
suntime = get_sunrise_sunset(lat,lon)
bot_response = "Sunrise: " + suntime[0] + "\nSunset: " + suntime[1]
elif "hfcond" in message.lower():
bot_response = hf_band_conditions()
elif "solar" in message.lower():
bot_response = drap_xray_conditions() + "\n" + solar_conditions(get_node_location)
bot_response = drap_xray_conditions() + "\n" + solar_conditions()
elif "lheard" in message.lower():
bot_response = "Last 5 nodes heard: " + str(get_node_list())
else: