mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2025-12-06 07:12:04 +01:00
Merge branch 'develop' into FR-DoubleFilter
This commit is contained in:
commit
dda218f622
|
|
@ -18,6 +18,8 @@ import time
|
|||
import logging
|
||||
import threading
|
||||
from abc import ABC, abstractmethod
|
||||
from boswatch.utils import paths
|
||||
from boswatch.processManager import ProcessManager
|
||||
|
||||
logging.debug("- %s loaded", __name__)
|
||||
|
||||
|
|
@ -63,3 +65,23 @@ class InputBase(ABC):
|
|||
self._inputQueue.put_nowait((data, time.time()))
|
||||
logging.debug("Add received data to queue")
|
||||
print(data)
|
||||
|
||||
def getDecoderInstance(self, decoderConfig, StdIn):
|
||||
mmProc = ProcessManager(str(decoderConfig.get("path", default="multimon-ng")), textMode=True)
|
||||
if decoderConfig.get("fms", default=0):
|
||||
mmProc.addArgument("-a FMSFSK")
|
||||
if decoderConfig.get("zvei", default=0):
|
||||
mmProc.addArgument("-a ZVEI1")
|
||||
if decoderConfig.get("poc512", default=0):
|
||||
mmProc.addArgument("-a POCSAG512")
|
||||
if decoderConfig.get("poc1200", default=0):
|
||||
mmProc.addArgument("-a POCSAG1200")
|
||||
if decoderConfig.get("poc2400", default=0):
|
||||
mmProc.addArgument("-a POCSAG2400")
|
||||
if decoderConfig.get("char", default=0):
|
||||
mmProc.addArgument("-C " + str(decoderConfig.get("char")))
|
||||
mmProc.addArgument("-f alpha")
|
||||
mmProc.addArgument("-t raw -")
|
||||
mmProc.setStdin(StdIn)
|
||||
mmProc.setStderr(open(paths.LOG_PATH + "multimon-ng.log", "a"))
|
||||
return mmProc
|
||||
|
|
|
|||
|
|
@ -40,23 +40,7 @@ class LineInInput(InputBase):
|
|||
lineInProc.setStderr(open(paths.LOG_PATH + "asla.log", "a"))
|
||||
lineInProc.start()
|
||||
|
||||
mmProc = ProcessManager(str(lineInConfig.get("mmPath", default="multimon-ng")), textMode=True)
|
||||
if decoderConfig.get("fms", default=0):
|
||||
mmProc.addArgument("-a FMSFSK")
|
||||
if decoderConfig.get("zvei", default=0):
|
||||
mmProc.addArgument("-a ZVEI1")
|
||||
if decoderConfig.get("poc512", default=0):
|
||||
mmProc.addArgument("-a POCSAG512")
|
||||
if decoderConfig.get("poc1200", default=0):
|
||||
mmProc.addArgument("-a POCSAG1200")
|
||||
if decoderConfig.get("poc2400", default=0):
|
||||
mmProc.addArgument("-a POCSAG2400")
|
||||
if lineInConfig.get("mmChar"):
|
||||
mmProc.addArgument("-C " + str(lineInConfig.get("mmChar")))
|
||||
mmProc.addArgument("-f alpha")
|
||||
mmProc.addArgument("-t raw -")
|
||||
mmProc.setStdin(lineInProc.stdout)
|
||||
mmProc.setStderr(open(paths.LOG_PATH + "multimon-ng.log", "a"))
|
||||
mmProc = self.getDecoderInstance(decoderConfig, lineInProc.stdout)
|
||||
mmProc.start()
|
||||
|
||||
logging.info("start decoding")
|
||||
|
|
|
|||
|
|
@ -39,23 +39,7 @@ class PulseAudioInput(InputBase):
|
|||
PulseAudioProc.setStderr(open(paths.LOG_PATH + "pulseaudio.log", "a"))
|
||||
PulseAudioProc.start()
|
||||
|
||||
mmProc = ProcessManager(str(PulseAudioConfig.get("mmPath", default="multimon-ng")), textMode=True)
|
||||
if decoderConfig.get("fms", default=0):
|
||||
mmProc.addArgument("-a FMSFSK")
|
||||
if decoderConfig.get("zvei", default=0):
|
||||
mmProc.addArgument("-a ZVEI1")
|
||||
if decoderConfig.get("poc512", default=0):
|
||||
mmProc.addArgument("-a POCSAG512")
|
||||
if decoderConfig.get("poc1200", default=0):
|
||||
mmProc.addArgument("-a POCSAG1200")
|
||||
if decoderConfig.get("poc2400", default=0):
|
||||
mmProc.addArgument("-a POCSAG2400")
|
||||
if PulseAudioConfig.get("mmChar"):
|
||||
mmProc.addArgument("-C " + str(PulseAudioConfig.get("mmChar")))
|
||||
mmProc.addArgument("-f alpha")
|
||||
mmProc.addArgument("-t raw -")
|
||||
mmProc.setStdin(PulseAudioProc.stdout)
|
||||
mmProc.setStderr(open(paths.LOG_PATH + "multimon-ng.log", "a"))
|
||||
mmProc = self.getDecoderInstance(decoderConfig, PulseAudioProc.stdout)
|
||||
mmProc.start()
|
||||
|
||||
logging.info("start decoding")
|
||||
|
|
|
|||
|
|
@ -41,23 +41,7 @@ class SdrInput(InputBase):
|
|||
sdrProc.setStderr(open(paths.LOG_PATH + "rtl_fm.log", "a"))
|
||||
sdrProc.start()
|
||||
|
||||
mmProc = ProcessManager(str(sdrConfig.get("mmPath", default="multimon-ng")), textMode=True)
|
||||
if decoderConfig.get("fms", default=0):
|
||||
mmProc.addArgument("-a FMSFSK")
|
||||
if decoderConfig.get("zvei", default=0):
|
||||
mmProc.addArgument("-a ZVEI1")
|
||||
if decoderConfig.get("poc512", default=0):
|
||||
mmProc.addArgument("-a POCSAG512")
|
||||
if decoderConfig.get("poc1200", default=0):
|
||||
mmProc.addArgument("-a POCSAG1200")
|
||||
if decoderConfig.get("poc2400", default=0):
|
||||
mmProc.addArgument("-a POCSAG2400")
|
||||
if sdrConfig.get("mmChar"):
|
||||
mmProc.addArgument("-C " + str(sdrConfig.get("mmChar")))
|
||||
mmProc.addArgument("-f alpha")
|
||||
mmProc.addArgument("-t raw -")
|
||||
mmProc.setStdin(sdrProc.stdout)
|
||||
mmProc.setStderr(open(paths.LOG_PATH + "multimon-ng.log", "a"))
|
||||
mmProc = self.getDecoderInstance(decoderConfig, sdrProc.stdout)
|
||||
mmProc.start()
|
||||
|
||||
logging.info("start decoding")
|
||||
|
|
|
|||
|
|
@ -27,13 +27,9 @@ inputSource:
|
|||
squelch: 1
|
||||
gain: 100
|
||||
rtlPath: /usr/bin/rtl_fm
|
||||
mmPath: /opt/multimon/multimon-ng
|
||||
mmChar: DE
|
||||
lineIn:
|
||||
card: 1
|
||||
device: 0
|
||||
mmPath: /opt/multimon/multimon-ng
|
||||
mmChar: DE
|
||||
|
||||
decoder:
|
||||
fms: yes
|
||||
|
|
@ -41,3 +37,5 @@ decoder:
|
|||
poc512: yes
|
||||
poc1200: yes
|
||||
poc2400: yes
|
||||
Path: /opt/multimon/multimon-ng
|
||||
char: DE
|
||||
|
|
|
|||
|
|
@ -50,8 +50,6 @@ Mit `PulseAudio` wird ein PulseAudio-Sink an Multimon-NG weitergereicht, z.B. in
|
|||
|squelch|Einstellung der Rauschsperre|1|
|
||||
|gain|Verstärkung des Eingangssignals|100|
|
||||
|rtlPath|Pfad zur rtl_fm Binary|rtl_fm|
|
||||
|mmPath|Pfad zur multimon-ng Binary|multimon-ng|
|
||||
|mmChar|multimon-ng Char-Set|not set|
|
||||
|
||||
**Beispiel:**
|
||||
```yaml
|
||||
|
|
@ -63,16 +61,12 @@ inputSource:
|
|||
squelch: 1
|
||||
gain: 100
|
||||
rtlPath: /usr/bin/rtl-fm
|
||||
mmPath: /opt/multimon/multimon-ng
|
||||
mmChar: DE
|
||||
```
|
||||
|
||||
#### `lineIn:`
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|device|die device Id der Soundkarte|1|
|
||||
|mmPath|Pfad zur multimon-ng Binary|multimon-ng|
|
||||
|mmChar|multimon-ng Char-Set|not set|
|
||||
|
||||
**Device herausfinden**
|
||||
Durch eingabe des Befehls `aplay -l` werden alle Soundkarten ausgegeben. Das schaut ungefähr so aus:
|
||||
|
|
@ -113,16 +107,12 @@ inputSource:
|
|||
lineIn:
|
||||
card: 1
|
||||
device: 0
|
||||
mmPath: /opt/multimon/multimon-ng
|
||||
mmChar: DE
|
||||
```
|
||||
|
||||
#### `PulseAudio:`
|
||||
|Feld|Beschreibung|Default|
|
||||
|----|------------|-------|
|
||||
|device|Der Sinks-Name der Quelle|boswatch|
|
||||
|mmPath|Pfad zur multimon-ng Binary|multimon-ng|
|
||||
|mmChar|multimon-ng Char-Set|not set|
|
||||
|
||||
|
||||
**Device herausfinden**
|
||||
|
|
@ -140,8 +130,6 @@ inputSource:
|
|||
...
|
||||
PulseAudio:
|
||||
device: boswatch
|
||||
mmPath: /opt/multimon/multimon-ng
|
||||
mmChar: DE
|
||||
```
|
||||
---
|
||||
### `decoder:`
|
||||
|
|
@ -152,6 +140,20 @@ inputSource:
|
|||
|poc512|POCSAG Decoder (Bitrate 512)|no|
|
||||
|poc1200|POCSAG Decoder (Bitrate 1200)|no|
|
||||
|poc2400|POCSAG Decoder (Bitrate 2400)|no|
|
||||
|path|Pfad zur multimon-ng Binary|multimon-ng|
|
||||
|char|multimon-ng char-Set|not set|
|
||||
|
||||
**Beispiel:**
|
||||
```yaml
|
||||
decoder:
|
||||
fms: yes
|
||||
zvei: yes
|
||||
poc512: no
|
||||
poc1200: no
|
||||
poc2400: yes
|
||||
path: /opt/multimon/multimon-ng
|
||||
char: DE
|
||||
```
|
||||
|
||||
---
|
||||
## Server
|
||||
|
|
|
|||
Loading…
Reference in a new issue