From a5836f87762c2a9a50e79c14304230f0ac6e1170 Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Wed, 6 Sep 2023 16:19:49 -0400 Subject: [PATCH] Adding FAX options. --- CHANGELOG.md | 1 + csdr/chain/digimodes.py | 22 +++++++++++++++++----- debian/changelog | 1 + owrx/config/defaults.py | 3 +++ owrx/controllers/settings/decoding.py | 16 +++++++++++----- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52703300..fa2277fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ **1.2.29** - Added worldwide OpenWeatherMap support (needs key). - Added NFM to SSTV underlying modes (needs testing). +* Added configurable FAX options (post-processing, etc). - Added configurable aircraft data expiration times. - Improved aircraft data maintenance and merging. - Improved SWL bookmarks generation (via EIBI). diff --git a/csdr/chain/digimodes.py b/csdr/chain/digimodes.py index 1c84accf..77aa9f29 100644 --- a/csdr/chain/digimodes.py +++ b/csdr/chain/digimodes.py @@ -8,6 +8,7 @@ from pycsdr.types import Format from owrx.aprs.module import DirewolfModule from owrx.sstv import SstvParser from owrx.fax import FaxParser +from owrx.config import Config class AudioChopperDemodulator(ServiceDemodulator, DialFrequencyReceiver): def __init__(self, mode: str, parser: AudioChopperParser): @@ -155,12 +156,23 @@ class SstvDemodulator(ServiceDemodulator, DialFrequencyReceiver): class FaxDemodulator(ServiceDemodulator, DialFrequencyReceiver): def __init__(self, service: bool = False): - self.parser = FaxParser(service=service) - self.sampleRate = 12000 - self.lpm = 120 - self.dbgTime = 300000 + pm = Config.get() + self.parser = FaxParser(service=service) + self.sampleRate = 12000 + self.lpm = 120 + self.dbgTime = 300000 + self.postProcess = pm["fax_postprocess"] + self.color = pm["fax_color"] + self.am = pm["fax_am"] workers = [ - FaxDecoder(self.sampleRate, self.lpm, self.dbgTime), + FaxDecoder( + self.sampleRate, + self.lpm, + self.dbgTime, + postProcess = self.postProcess, + color = self.color, + am = self.am + ), self.parser ] super().__init__(workers) diff --git a/debian/changelog b/debian/changelog index 31f13b8d..d3d61a45 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ openwebrx (1.2.29) bullseye jammy; urgency=low * Added worldwide OpenWeatherMap support (needs key). * Added NFM to SSTV underlying modes (needs testing). + * Added configurable FAX options (post-processing, etc). * Added configurable aircraft data expiration times. * Improved aircraft data maintenance and merging. * Improved SWL bookmarks generation (via EIBI). diff --git a/owrx/config/defaults.py b/owrx/config/defaults.py index 481ad4f4..4e337c96 100644 --- a/owrx/config/defaults.py +++ b/owrx/config/defaults.py @@ -205,4 +205,7 @@ defaultConfig = PropertyLayer( adsb_ttl=900, vdl2_ttl=1800, hfdl_ttl=1800, + fax_postprocess=True, + fax_color=False, + fax_am=False ).readonly() diff --git a/owrx/controllers/settings/decoding.py b/owrx/controllers/settings/decoding.py index c2967a65..1cadd2a7 100644 --- a/owrx/controllers/settings/decoding.py +++ b/owrx/controllers/settings/decoding.py @@ -59,33 +59,39 @@ class DecodingSettingsController(SettingsFormController): NumberInput("digimodes_fft_size", "Digimodes FFT size", append="bins"), ), Section( - "Pager traffic", + "Pager messages", CheckboxInput( "paging_filter", "Filter out empty, numeric, or unreadable pager messages", ), ), Section( - "Aircraft traffic", + "Aircraft messages", NumberInput( "adsb_ttl", - "ADSB reports expiration time, in seconds", + "ADSB reports expiration time", validator=RangeValidator(30, 3600), append="s", ), NumberInput( "vdl2_ttl", - "VDL2 reports expiration time, in seconds", + "VDL2 reports expiration time", validator=RangeValidator(30, 3600), append="s", ), NumberInput( "hfdl_ttl", - "HFDL reports expiration time, in seconds", + "HFDL reports expiration time", validator=RangeValidator(30, 3600), append="s", ), ), + Section( + "Fax transmissions", + CheckboxInput("fax_postprocess", "Post-process received images to reduce noise"), + CheckboxInput("fax_color", "Receive color images"), + CheckboxInput("fax_am", "Use amplitude modulation"), + ), Section( "Decoding settings", NumberInput("decoding_queue_workers", "Number of decoding workers"),