add option to disable beacon

This commit is contained in:
KF7EEL 2021-04-24 11:22:04 -07:00
parent 4ef4e78599
commit 5aa8a14269
3 changed files with 14 additions and 9 deletions

View File

@ -3,6 +3,8 @@
'XYZ':{
# Mode of transfer, this case, message transfer
'mode':'msg_xfer',
# Public or Private auth
'auth_type':'public',
# Name of the server/network
'network_name':'My HBlink Server',
# URL to the dashboard of the server/network
@ -22,11 +24,10 @@
# Website for users to get info
'website':'http://hbl.ink',
},
'ABC':{
'HBL':{
'mode':'msg_xfer',
'network_name':'Regional HBlink Network 1',
'url':'http://localhost:8092/',
'user':'test_name',
'password':'passw0rd'
'auth_type':'public',
'network_name':'KF7EEL Development Server',
'url':'http://hbl.ink/d-aprs/',
}
}

View File

@ -136,7 +136,7 @@ APRS_FILTER: r/47/-120/500 t/m
# The following settings are only applicable if you are using the gps_data_beacon_igate script.
# They do not affect the operation gps_data itself.
# Time in minutes.
# Time in minutes. If time is set to 0, no beacon will be sent.
IGATE_BEACON_TIME = 45
IGATE_BEACON_COMMENT = HBLink3 D-APRS Gateway
IGATE_BEACON_ICON = /I
@ -188,7 +188,8 @@ SERVER_NAME: Test HBLink Network
# Title of the Dashboard
DASHBOARD_TITLE: HBLink3 D-APRS Dashboard
# Used for API, RSS feed link, etc
# Used for API, RSS feed link, etc. This MUST be accessible.
# Do not add a trailing /
DASHBOARD_URL: http://localhost:8092
# Logo used on dashboard page

View File

@ -885,6 +885,9 @@ def aprs_rx(aprs_rx_login, aprs_passcode, aprs_server, aprs_port, aprs_filter, u
else:
AIS.connect()
print('Connecting to APRS-IS')
if int(CONFIG['GPS_DATA']['IGATE_BEACON_TIME'] == 0:
logger.info('APRS beacon disabled')
if int(CONFIG['GPS_DATA']['IGATE_BEACON_TIME'] != 0:
aprs_beacon=task.LoopingCall(aprs_beacon_send)
aprs_beacon.start(int(CONFIG['GPS_DATA']['IGATE_BEACON_TIME'])*60)
AIS.consumer(aprs_process, raw=True, immortal=False)