kopia lustrzana https://github.com/projecthorus/radiosonde_auto_rx
clean-up
rodzic
1934171192
commit
d1f7fcfcdd
10
m10/m10x.c
10
m10/m10x.c
|
|
@ -34,7 +34,7 @@ int option_verbose = 0, // ausfuehrliche Anzeige
|
||||||
option_res = 0, // genauere Bitmessung
|
option_res = 0, // genauere Bitmessung
|
||||||
option_color = 0,
|
option_color = 0,
|
||||||
wavloaded = 0;
|
wavloaded = 0;
|
||||||
int inv = 1;
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/*
|
/*
|
||||||
|
|
@ -173,7 +173,6 @@ int read_bits_fsk(FILE *fp, int *bit, int *len) {
|
||||||
y0 = sample;
|
y0 = sample;
|
||||||
sample = read_signed_sample(fp);
|
sample = read_signed_sample(fp);
|
||||||
if (sample == EOF_INT) return EOF;
|
if (sample == EOF_INT) return EOF;
|
||||||
if (option_inv) sample = -sample; // 8bit: -sample-1
|
|
||||||
sample_count++;
|
sample_count++;
|
||||||
par_alt = par;
|
par_alt = par;
|
||||||
par = (sample >= 0) ? 1 : -1; // 8bit: 0..127,128..255 (-128..-1,0..127)
|
par = (sample >= 0) ? 1 : -1; // 8bit: 0..127,128..255 (-128..-1,0..127)
|
||||||
|
|
@ -189,8 +188,8 @@ int read_bits_fsk(FILE *fp, int *bit, int *len) {
|
||||||
|
|
||||||
*len = (int)(l+0.5);
|
*len = (int)(l+0.5);
|
||||||
|
|
||||||
if (inv > 0) *bit = (1+par_alt)/2; // oben 1, unten -1
|
if (!option_inv) *bit = (1+par_alt)/2; // oben 1, unten -1
|
||||||
else *bit = (1-par_alt)/2; // sdr#<rev1381?, invers: unten 1, oben -1
|
else *bit = (1-par_alt)/2; // sdr#<rev1381?, invers: unten 1, oben -1
|
||||||
// *bit = (1+inv*par_alt)/2; // ausser inv=0
|
// *bit = (1+inv*par_alt)/2; // ausser inv=0
|
||||||
|
|
||||||
/* Y-offset ? */
|
/* Y-offset ? */
|
||||||
|
|
@ -641,9 +640,6 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
if (!header_found) {
|
if (!header_found) {
|
||||||
header_found = compare2();
|
header_found = compare2();
|
||||||
if (header_found != 0) {
|
|
||||||
inv = header_found;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
frame_rawbits[pos] = 0x30 + bit; // Ascii
|
frame_rawbits[pos] = 0x30 + bit; // Ascii
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue