add first integration of direwolf for aprs
This commit is contained in:
parent
0c59caa230
commit
f49086a527
14
csdr.py
14
csdr.py
@ -117,6 +117,11 @@ class dsp(object):
|
|||||||
elif which == "ysf":
|
elif which == "ysf":
|
||||||
chain += "ysf_decoder --fifo {meta_pipe} | mbe_synthesizer -y -f -u {unvoiced_quality} | "
|
chain += "ysf_decoder --fifo {meta_pipe} | mbe_synthesizer -y -f -u {unvoiced_quality} | "
|
||||||
chain += "digitalvoice_filter -f | csdr agc_ff 160000 0.8 1 0.0000001 0.0005 | csdr convert_f_s16 | sox -t raw -r 8000 -e signed-integer -b 16 -c 1 --buffer 32 - -t raw -r {output_rate} -e signed-integer -b 16 -c 1 - "
|
chain += "digitalvoice_filter -f | csdr agc_ff 160000 0.8 1 0.0000001 0.0005 | csdr convert_f_s16 | sox -t raw -r 8000 -e signed-integer -b 16 -c 1 --buffer 32 - -t raw -r {output_rate} -e signed-integer -b 16 -c 1 - "
|
||||||
|
elif which == "packet":
|
||||||
|
chain += "csdr fmdemod_quadri_cf | "
|
||||||
|
chain += last_decimation_block
|
||||||
|
chain += "csdr convert_f_s16 | "
|
||||||
|
chain += "direwolf -r {audio_rate} - 1>&2"
|
||||||
elif which == "am":
|
elif which == "am":
|
||||||
chain += "csdr amdemod_cf | csdr fastdcblock_ff | "
|
chain += "csdr amdemod_cf | csdr fastdcblock_ff | "
|
||||||
chain += last_decimation_block
|
chain += last_decimation_block
|
||||||
@ -285,7 +290,7 @@ class dsp(object):
|
|||||||
return self.output_rate
|
return self.output_rate
|
||||||
|
|
||||||
def get_audio_rate(self):
|
def get_audio_rate(self):
|
||||||
if self.isDigitalVoice():
|
if self.isDigitalVoice() or self.isPacket():
|
||||||
return 48000
|
return 48000
|
||||||
return self.get_output_rate()
|
return self.get_output_rate()
|
||||||
|
|
||||||
@ -294,6 +299,11 @@ class dsp(object):
|
|||||||
demodulator = self.get_demodulator()
|
demodulator = self.get_demodulator()
|
||||||
return demodulator in ["dmr", "dstar", "nxdn", "ysf"]
|
return demodulator in ["dmr", "dstar", "nxdn", "ysf"]
|
||||||
|
|
||||||
|
def isPacket(self, demodulator = None):
|
||||||
|
if demodulator is None:
|
||||||
|
demodulator = self.get_demodulator()
|
||||||
|
return demodulator == "packet"
|
||||||
|
|
||||||
def set_output_rate(self,output_rate):
|
def set_output_rate(self,output_rate):
|
||||||
self.output_rate=output_rate
|
self.output_rate=output_rate
|
||||||
self.calculate_decimation()
|
self.calculate_decimation()
|
||||||
@ -407,7 +417,7 @@ class dsp(object):
|
|||||||
flowcontrol=int(self.samp_rate*2), start_bufsize=self.base_bufsize*self.decimation, nc_port=self.nc_port,
|
flowcontrol=int(self.samp_rate*2), start_bufsize=self.base_bufsize*self.decimation, nc_port=self.nc_port,
|
||||||
squelch_pipe=self.squelch_pipe, smeter_pipe=self.smeter_pipe, meta_pipe=self.meta_pipe, iqtee_pipe=self.iqtee_pipe, iqtee2_pipe=self.iqtee2_pipe,
|
squelch_pipe=self.squelch_pipe, smeter_pipe=self.smeter_pipe, meta_pipe=self.meta_pipe, iqtee_pipe=self.iqtee_pipe, iqtee2_pipe=self.iqtee2_pipe,
|
||||||
output_rate = self.get_output_rate(), smeter_report_every = int(self.if_samp_rate()/6000),
|
output_rate = self.get_output_rate(), smeter_report_every = int(self.if_samp_rate()/6000),
|
||||||
unvoiced_quality = self.get_unvoiced_quality())
|
unvoiced_quality = self.get_unvoiced_quality(), audio_rate = self.get_audio_rate())
|
||||||
|
|
||||||
logger.debug("[openwebrx-dsp-plugin:csdr] Command = %s", command)
|
logger.debug("[openwebrx-dsp-plugin:csdr] Command = %s", command)
|
||||||
my_env=os.environ.copy()
|
my_env=os.environ.copy()
|
||||||
|
@ -102,6 +102,9 @@
|
|||||||
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-ysf"
|
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-ysf"
|
||||||
style="display:none;" data-feature="digital_voice_digiham"
|
style="display:none;" data-feature="digital_voice_digiham"
|
||||||
onclick="demodulator_analog_replace('ysf');">YSF</div>
|
onclick="demodulator_analog_replace('ysf');">YSF</div>
|
||||||
|
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-packet"
|
||||||
|
style="display:none;" data-feature="packet"
|
||||||
|
onclick="demodulator_analog_replace('packet');">Packet</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="openwebrx-panel-line">
|
<div class="openwebrx-panel-line">
|
||||||
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-dig" onclick="demodulator_digital_replace_last();">DIG</div>
|
<div class="openwebrx-button openwebrx-demodulator-button" id="openwebrx-button-dig" onclick="demodulator_digital_replace_last();">DIG</div>
|
||||||
|
2322
htdocs/libmbe.js
Normal file
2322
htdocs/libmbe.js
Normal file
File diff suppressed because it is too large
Load Diff
BIN
htdocs/libmbe.wasm
Normal file
BIN
htdocs/libmbe.wasm
Normal file
Binary file not shown.
@ -443,6 +443,11 @@ function demodulator_default_analog(offset_frequency,subtype)
|
|||||||
{
|
{
|
||||||
this.low_cut=-3250;
|
this.low_cut=-3250;
|
||||||
this.high_cut=3250;
|
this.high_cut=3250;
|
||||||
|
}
|
||||||
|
else if(subtype=="packet")
|
||||||
|
{
|
||||||
|
this.low_cut=-4000;
|
||||||
|
this.high_cut=4000;
|
||||||
}
|
}
|
||||||
else if(subtype=="am")
|
else if(subtype=="am")
|
||||||
{
|
{
|
||||||
|
@ -17,7 +17,8 @@ class FeatureDetector(object):
|
|||||||
"sdrplay": [ "rx_tools" ],
|
"sdrplay": [ "rx_tools" ],
|
||||||
"hackrf": [ "hackrf_transfer" ],
|
"hackrf": [ "hackrf_transfer" ],
|
||||||
"digital_voice_digiham": [ "digiham", "sox" ],
|
"digital_voice_digiham": [ "digiham", "sox" ],
|
||||||
"digital_voice_dsd": [ "dsd", "sox" ]
|
"digital_voice_dsd": [ "dsd", "sox" ],
|
||||||
|
"packet": [ "direwolf" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
def feature_availability(self):
|
def feature_availability(self):
|
||||||
@ -101,4 +102,7 @@ class FeatureDetector(object):
|
|||||||
return self.command_is_runnable("dsd")
|
return self.command_is_runnable("dsd")
|
||||||
|
|
||||||
def has_sox(self):
|
def has_sox(self):
|
||||||
return self.command_is_runnable("sox")
|
return self.command_is_runnable("sox")
|
||||||
|
|
||||||
|
def has_direwolf(self):
|
||||||
|
return self.command_is_runnable("direwolf --help")
|
Loading…
Reference in New Issue
Block a user