2021-04-29 13:28:18 +00:00
|
|
|
from owrx.controllers.settings import SettingsFormController, SettingsBreadcrumb
|
|
|
|
from owrx.form.section import Section
|
2021-04-29 13:17:21 +00:00
|
|
|
from owrx.form.input.converter import OptionalConverter
|
|
|
|
from owrx.form.input.aprs import AprsBeaconSymbols, AprsAntennaDirections
|
|
|
|
from owrx.form.input import TextInput, CheckboxInput, DropdownInput, NumberInput
|
2021-04-18 15:49:13 +00:00
|
|
|
from owrx.breadcrumb import Breadcrumb, BreadcrumbItem
|
2021-02-15 14:49:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ReportingController(SettingsFormController):
|
|
|
|
def getTitle(self):
|
2021-04-18 15:49:13 +00:00
|
|
|
return "Spotting and reporting"
|
|
|
|
|
|
|
|
def get_breadcrumb(self) -> Breadcrumb:
|
|
|
|
return SettingsBreadcrumb().append(BreadcrumbItem("Spotting and reporting", "settings/reporting"))
|
2021-02-15 14:49:44 +00:00
|
|
|
|
|
|
|
def getSections(self):
|
|
|
|
return [
|
|
|
|
Section(
|
|
|
|
"APRS-IS reporting",
|
|
|
|
CheckboxInput(
|
|
|
|
"aprs_igate_enabled",
|
2021-02-21 23:57:02 +00:00
|
|
|
"Send received APRS data to APRS-IS",
|
2021-04-07 14:23:13 +00:00
|
|
|
infotext="Due to limits of the APRS-IS network, reporting will only work for background decoders"
|
2021-02-15 14:49:44 +00:00
|
|
|
),
|
|
|
|
TextInput(
|
|
|
|
"aprs_callsign",
|
|
|
|
"APRS callsign",
|
|
|
|
infotext="This callsign will be used to send data to the APRS-IS network",
|
|
|
|
),
|
|
|
|
TextInput("aprs_igate_server", "APRS-IS server"),
|
|
|
|
TextInput("aprs_igate_password", "APRS-IS network password"),
|
|
|
|
CheckboxInput(
|
|
|
|
"aprs_igate_beacon",
|
2021-02-21 23:57:02 +00:00
|
|
|
"Send the receiver position to the APRS-IS network",
|
2021-02-15 14:49:44 +00:00
|
|
|
infotext="Please check that your receiver location is setup correctly before enabling the beacon",
|
|
|
|
),
|
|
|
|
DropdownInput(
|
|
|
|
"aprs_igate_symbol",
|
|
|
|
"APRS beacon symbol",
|
|
|
|
AprsBeaconSymbols,
|
|
|
|
),
|
|
|
|
TextInput(
|
|
|
|
"aprs_igate_comment",
|
|
|
|
"APRS beacon text",
|
|
|
|
infotext="This text will be sent as APRS comment along with your beacon",
|
|
|
|
converter=OptionalConverter(),
|
|
|
|
),
|
|
|
|
NumberInput(
|
|
|
|
"aprs_igate_height",
|
|
|
|
"Antenna height",
|
|
|
|
infotext="Antenna height above average terrain (HAAT)",
|
|
|
|
append="m",
|
|
|
|
converter=OptionalConverter(),
|
|
|
|
),
|
|
|
|
NumberInput(
|
|
|
|
"aprs_igate_gain",
|
|
|
|
"Antenna gain",
|
|
|
|
append="dBi",
|
|
|
|
converter=OptionalConverter(),
|
|
|
|
),
|
|
|
|
DropdownInput("aprs_igate_dir", "Antenna direction", AprsAntennaDirections),
|
|
|
|
),
|
|
|
|
Section(
|
|
|
|
"pskreporter settings",
|
|
|
|
CheckboxInput(
|
|
|
|
"pskreporter_enabled",
|
2021-02-21 23:57:02 +00:00
|
|
|
"Enable sending spots to pskreporter.info",
|
2021-02-15 14:49:44 +00:00
|
|
|
),
|
|
|
|
TextInput(
|
|
|
|
"pskreporter_callsign",
|
|
|
|
"pskreporter callsign",
|
|
|
|
infotext="This callsign will be used to send spots to pskreporter.info",
|
|
|
|
),
|
|
|
|
TextInput(
|
|
|
|
"pskreporter_antenna_information",
|
|
|
|
"Antenna information",
|
|
|
|
infotext="Antenna description to be sent along with spots to pskreporter",
|
|
|
|
converter=OptionalConverter(),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Section(
|
|
|
|
"WSPRnet settings",
|
|
|
|
CheckboxInput(
|
|
|
|
"wsprnet_enabled",
|
2021-02-21 23:57:02 +00:00
|
|
|
"Enable sending spots to wsprnet.org",
|
2021-02-15 14:49:44 +00:00
|
|
|
),
|
|
|
|
TextInput(
|
|
|
|
"wsprnet_callsign",
|
|
|
|
"wsprnet callsign",
|
|
|
|
infotext="This callsign will be used to send spots to wsprnet.org",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
]
|