mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2025-10-28 01:09:26 +00:00
Add APRS-IS support
This commit is contained in:
15
main.py
15
main.py
@@ -6,6 +6,7 @@ from time import sleep
|
||||
|
||||
from core.cleanup import CleanupTimer
|
||||
from core.config import config
|
||||
from providers.aprsis import APRSIS
|
||||
from providers.dxcluster import DXCluster
|
||||
from providers.gma import GMA
|
||||
from providers.hema import HEMA
|
||||
@@ -17,7 +18,11 @@ from providers.wwbota import WWBOTA
|
||||
from providers.wwff import WWFF
|
||||
from server.webserver import WebServer
|
||||
|
||||
# Main control flag, switch False to stop main application thread
|
||||
# Globals
|
||||
spot_list = []
|
||||
status_data = {}
|
||||
providers = []
|
||||
cleanup_timer = None
|
||||
run = True
|
||||
|
||||
# Shutdown function
|
||||
@@ -51,6 +56,8 @@ def get_provider_from_config(config_providers_entry):
|
||||
return DXCluster(config_providers_entry["host"], config_providers_entry["port"])
|
||||
case "RBN":
|
||||
return RBN(config_providers_entry["port"])
|
||||
case "APRS-IS":
|
||||
return APRSIS()
|
||||
return None
|
||||
|
||||
|
||||
@@ -69,12 +76,6 @@ if __name__ == '__main__':
|
||||
# Shut down gracefully on SIGINT
|
||||
signal.signal(signal.SIGINT, shutdown)
|
||||
|
||||
# Set up spot list & status data areas
|
||||
spot_list = []
|
||||
status_data = {}
|
||||
|
||||
# Create data providers
|
||||
providers = []
|
||||
for entry in config["providers"]:
|
||||
providers.append(get_provider_from_config(entry))
|
||||
# Set up data providers
|
||||
|
||||
Reference in New Issue
Block a user