mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-17 03:07:24 -05:00
Code Cleanup and Testing
Code Cleanup and Testing --Minor Tweaks and Clean Up
This commit is contained in:
@@ -4,23 +4,24 @@
|
||||
void
|
||||
processProVoice (dsd_opts * opts, dsd_state * state)
|
||||
{
|
||||
int i, j, dibit;
|
||||
//char datestr[32];
|
||||
int i, j, dibit, k;
|
||||
uint8_t lid[80];
|
||||
uint8_t lidbyte[10];
|
||||
uint8_t init[64];
|
||||
uint8_t initbyte[8];
|
||||
char imbe7100_fr1[7][24];
|
||||
char imbe7100_fr2[7][24];
|
||||
const int *w, *x;
|
||||
//struct tm timep;
|
||||
|
||||
if (opts->errorbars == 1)
|
||||
{
|
||||
//strftime (datestr, 31, "%Y-%m-%d-%H%M%S", &timep);
|
||||
//fprintf (stderr,"%s VOICE e:", datestr);
|
||||
fprintf (stderr,"VOICE e:");
|
||||
fprintf (stderr,"VOICE ");
|
||||
}
|
||||
|
||||
for (i = 0; i < 64; i++)
|
||||
{
|
||||
dibit = getDibit (opts, state);
|
||||
init[i] = dibit;
|
||||
#ifdef PROVOICE_DUMP
|
||||
fprintf (stderr,"%i", dibit);
|
||||
#endif
|
||||
@@ -28,11 +29,29 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
||||
#ifdef PROVOICE_DUMP
|
||||
fprintf (stderr," ");
|
||||
#endif
|
||||
|
||||
//init Bits (64)...MI?
|
||||
if (opts->payload == 1)
|
||||
{
|
||||
k = 0;
|
||||
fprintf (stderr, "\nInit 64 ");
|
||||
for(i = 0; i < 8; i++)
|
||||
{
|
||||
initbyte[i] = 0;
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
initbyte[i] = initbyte[i] << 1;
|
||||
initbyte[i] = initbyte[i] | init[k];
|
||||
k++;
|
||||
}
|
||||
fprintf (stderr, "%02X", initbyte[i]);
|
||||
}
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
// lid
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
dibit = getDibit (opts, state);
|
||||
lid[i] = dibit;
|
||||
#ifdef PROVOICE_DUMP
|
||||
fprintf (stderr,"%i", dibit);
|
||||
#endif
|
||||
@@ -44,6 +63,7 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
||||
for (i = 0; i < 64; i++)
|
||||
{
|
||||
dibit = getDibit (opts, state);
|
||||
lid[i+16] = dibit;
|
||||
#ifdef PROVOICE_DUMP
|
||||
fprintf (stderr,"%i", dibit);
|
||||
#endif
|
||||
@@ -51,6 +71,25 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
||||
#ifdef PROVOICE_DUMP
|
||||
fprintf (stderr," ");
|
||||
#endif
|
||||
//load lid (bits) into lidbyte
|
||||
if (opts->payload == 1)
|
||||
{
|
||||
k = 0;
|
||||
fprintf (stderr, "LID ");
|
||||
for(i = 0; i < 10; i++)
|
||||
{
|
||||
lidbyte[i] = 0;
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
lidbyte[i] = lidbyte[i] << 1;
|
||||
lidbyte[i] = lidbyte[i] | lid[k];
|
||||
k++;
|
||||
}
|
||||
fprintf (stderr, "%02X", lidbyte[i]);
|
||||
}
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
|
||||
// imbe frames 1,2 first half
|
||||
w = pW;
|
||||
@@ -282,7 +321,8 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
dibit = getDibit (opts, state);
|
||||
dibit = getDibit (opts, state); //HERE
|
||||
init[i] = dibit; //recycle
|
||||
#ifdef PROVOICE_DUMP
|
||||
fprintf (stderr,"%i", dibit);
|
||||
#endif
|
||||
@@ -290,7 +330,23 @@ processProVoice (dsd_opts * opts, dsd_state * state)
|
||||
#ifdef PROVOICE_DUMP
|
||||
fprintf (stderr," ");
|
||||
#endif
|
||||
|
||||
if (opts->payload == 1)
|
||||
{
|
||||
k = 0;
|
||||
fprintf (stderr, "16 bits? ");
|
||||
for(i = 0; i < 2; i++)
|
||||
{
|
||||
initbyte[i] = 0;
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
initbyte[i] = initbyte[i] << 1;
|
||||
initbyte[i] = initbyte[i] | init[k];
|
||||
k++;
|
||||
}
|
||||
fprintf (stderr, "%02X", initbyte[i]);
|
||||
}
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
// imbe frames 3,4 first half
|
||||
w = pW;
|
||||
x = pX;
|
||||
|
||||
Reference in New Issue
Block a user