mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-08-06 08:53:27 +02:00
highfly enhancements
This commit is contained in:
@@ -107,6 +107,8 @@ sentryIgnoreList =
|
||||
highFlyingAlert = True
|
||||
# Altitude in meters to trigger the alert
|
||||
highFlyingAlertAltitude = 2000
|
||||
# Channel to send Alert when the high flying node is detected
|
||||
highFlyingAlertChannel = 2
|
||||
|
||||
[bbs]
|
||||
enabled = True
|
||||
|
||||
@@ -1406,6 +1406,8 @@ async def start_rx():
|
||||
logger.debug(f"System: MOTD Enabled using {MOTD}")
|
||||
if sentry_enabled:
|
||||
logger.debug(f"System: Sentry Mode Enabled {sentry_radius}m radius reporting to channel:{secure_channel}")
|
||||
if highfly_enabled:
|
||||
logger.debug(f"System: HighFly Enabled using {highfly_altitude}m limit reporting to channel:{highfly_channel}")
|
||||
if store_forward_enabled:
|
||||
logger.debug(f"System: Store and Forward Enabled using limit: {storeFlimit}")
|
||||
if useDMForResponse:
|
||||
|
||||
@@ -237,6 +237,7 @@ try:
|
||||
email_sentry_alerts = config['sentry'].getboolean('emailSentryAlerts', False) # default False
|
||||
highfly_enabled = config['sentry'].getboolean('highFlyingAlert', True) # default True
|
||||
highfly_altitude = config['sentry'].getint('highFlyingAlertAltitude', 2000) # default 2000 meters
|
||||
highfly_channel = config['sentry'].getint('highFlyingAlertChannel', 2) # default 2
|
||||
|
||||
# location
|
||||
location_enabled = config['location'].getboolean('enabled', True)
|
||||
|
||||
+1
-1
@@ -982,7 +982,7 @@ def consumeMetadata(packet, rxNode=0):
|
||||
# if altitude is over 2000 send a log and message for high-flying nodes
|
||||
if position_data.get('altitude', 0) > highfly_altitude and highfly_enabled:
|
||||
logger.warning(f"System: High Altitude {position_data['altitude']}m on Device: {rxNode} NodeID: {nodeID}")
|
||||
send_message(f"High Altitude {position_data['altitude']}m on Device: {rxNode} NodeID: {nodeID}", secure_channel, 0, rxNode)
|
||||
send_message(f"High Altitude {position_data['altitude']}m on Device: {rxNode} NodeID: {nodeID}", highfly_channel, 0, rxNode)
|
||||
time.sleep(responseDelay)
|
||||
|
||||
# Keep the positionMetadata dictionary at a maximum size of 20
|
||||
|
||||
Reference in New Issue
Block a user