mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-14 17:57:28 -05:00
Direct all prints to STDERR
Direct all prints to STDERR Take 2
This commit is contained in:
23
src/dstar.c
23
src/dstar.c
@@ -17,7 +17,7 @@
|
||||
|
||||
/*
|
||||
* Note: D-STAR support is fairly complete at this point.
|
||||
* The ambe3600x2450 decoder is similar butnot compatible with D-STAR voice frames.
|
||||
* The ambe3600x2450 decoder is similar butnot compatible with D-STAR voice frames.
|
||||
* The dstar interleave pattern is different as well.
|
||||
* GMSK modulation optimizations will also required to get a usable bit error
|
||||
*/
|
||||
@@ -40,11 +40,11 @@ void processDSTAR(dsd_opts * opts, dsd_state * state) {
|
||||
const int *w, *x;
|
||||
|
||||
if (opts->errorbars == 1) {
|
||||
printf("e:");
|
||||
fprintf (stderr, "e:");
|
||||
}
|
||||
|
||||
#ifdef DSTAR_DUMP
|
||||
printf ("\n");
|
||||
fprintf (stderr, "\n");
|
||||
#endif
|
||||
|
||||
if (state->synctype == 18) {
|
||||
@@ -74,7 +74,7 @@ void processDSTAR(dsd_opts * opts, dsd_state * state) {
|
||||
}
|
||||
if ((bitbuffer & 0x00FFFFFF) == 0x00AAB468) {
|
||||
// we're slipping bits
|
||||
printf("sync in voice after i=%d, restarting\n", i);
|
||||
fprintf (stderr, "sync in voice after i=%d, restarting\n", i);
|
||||
//ugh just start over
|
||||
i = 0;
|
||||
w = dW;
|
||||
@@ -101,7 +101,7 @@ void processDSTAR(dsd_opts * opts, dsd_state * state) {
|
||||
if ((bitbuffer & 0x00FFFFFF) == 0x00AAB468) {
|
||||
// looking if we're slipping bits
|
||||
if (i != 96) {
|
||||
printf("sync after i=%d\n", i);
|
||||
fprintf (stderr, "sync after i=%d\n", i);
|
||||
i = 96;
|
||||
}
|
||||
}
|
||||
@@ -114,31 +114,31 @@ void processDSTAR(dsd_opts * opts, dsd_state * state) {
|
||||
|
||||
if ((bitbuffer & 0x00FFFFFF) == 0x00AAB468) {
|
||||
//We got sync!
|
||||
//printf("Sync on framecount = %d\n", framecount);
|
||||
//fprintf (stderr, "Sync on framecount = %d\n", framecount);
|
||||
sync_missed = 0;
|
||||
} else if ((bitbuffer & 0x00FFFFFF) == 0xAAAAAA) {
|
||||
//End of transmission
|
||||
printf("End of transmission\n");
|
||||
fprintf (stderr, "End of transmission\n");
|
||||
goto end;
|
||||
} else if (framecount % 21 == 0) {
|
||||
printf("Missed sync on framecount = %d, value = %x/%x/%x\n",
|
||||
fprintf (stderr, "Missed sync on framecount = %d, value = %x/%x/%x\n",
|
||||
framecount, slowdata[0], slowdata[1], slowdata[2]);
|
||||
sync_missed++;
|
||||
} else if (framecount != 0 && (bitbuffer & 0x00FFFFFF) != 0x000000) {
|
||||
slowdata[0] ^= 0x70;
|
||||
slowdata[1] ^= 0x4f;
|
||||
slowdata[2] ^= 0x93;
|
||||
//printf("unscrambled- %s",slowdata);
|
||||
//fprintf (stderr, "unscrambled- %s",slowdata);
|
||||
|
||||
} else if (framecount == 0) {
|
||||
//printf("never scrambled-%s\n",slowdata);
|
||||
//fprintf (stderr, "never scrambled-%s\n",slowdata);
|
||||
}
|
||||
|
||||
framecount++;
|
||||
}
|
||||
|
||||
end: if (opts->errorbars == 1) {
|
||||
printf("\n");
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,4 +160,3 @@ void processDSTAR_HD(dsd_opts * opts, dsd_state * state) {
|
||||
processDSTAR(opts, state);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user