Workaround for 300 bps receive

legacy
sh123 2022-08-04 12:41:35 +03:00
rodzic fa25b0e953
commit b4f985c5f2
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -143,7 +143,6 @@ public class Aprs implements Protocol {
if (data.length == 0) return;
AprsDataType dataType = new AprsDataType((char)data[0]);
AprsData aprsData = AprsDataFactory.fromBinary(src, dst, data);
Log.i(TAG, "onReceiveData() " + aprsData.isValid() + " " + dataType.getDataType() + " " + src + " " + dst);
if (aprsData != null && aprsData.isValid()) {
if (dataType.isTextMessage()) {
TextMessage textMessage = aprsData.toTextMessage();

Wyświetl plik

@ -60,7 +60,8 @@ public class SoundModem implements Transport, Runnable {
String type = _sharedPreferences.getString(PreferenceKeys.PORTS_SOUND_MODEM_TYPE, "1200");
_name = "SoundModem" + type;
if (type.equals("300")) {
_fskModem = Codec2.fskCreate(SAMPLE_RATE, 300, 1600, 200);
// XXX, use 230 tone spacing, <230 spacing for 300 bps does not work with codec2 fsk for receive
_fskModem = Codec2.fskCreate(SAMPLE_RATE, 300, 1600, disableRx ? 200 : 230);
} else {
_fskModem = Codec2.fskCreate(SAMPLE_RATE, 1200, 1200, 1000);
}

Wyświetl plik

@ -487,7 +487,7 @@ void fsk_demod_freq_est(struct FSK *fsk, COMP fsk_in[], float *freqs, int M) {
#ifdef USE_HANN_TABLE
hann = fsk->hann_table[i];
#else
hann = 0.5 - 0.5 * cosf(2.0 * M_PI * (float)i / (float) (fft_samps-1));
hann = 0.5 - 0.5 * cosf(2.0 * M_PI * (float)i / (float) (Ndft-1));
#endif
fftin[i].r = hann*fsk_in[i+a].real;
fftin[i].i = hann*fsk_in[i+a].imag;