mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-20 04:37:26 -05:00
Add M17 CAN Value to Ncurses; Misc;
This commit is contained in:
@@ -737,6 +737,7 @@ typedef struct
|
|||||||
|
|
||||||
unsigned long long int m17_dst;
|
unsigned long long int m17_dst;
|
||||||
unsigned long long int m17_src;
|
unsigned long long int m17_src;
|
||||||
|
uint8_t m17_can;
|
||||||
|
|
||||||
char m17_dst_csd[20];
|
char m17_dst_csd[20];
|
||||||
char m17_src_csd[20];
|
char m17_src_csd[20];
|
||||||
|
|||||||
@@ -467,6 +467,7 @@ noCarrier (dsd_opts * opts, dsd_state * state)
|
|||||||
|
|
||||||
state->m17_dst = 0;
|
state->m17_dst = 0;
|
||||||
state->m17_src = 0;
|
state->m17_src = 0;
|
||||||
|
state->m17_can = 0;
|
||||||
memset(state->m17_dst_csd, 0, sizeof(state->m17_dst_csd));
|
memset(state->m17_dst_csd, 0, sizeof(state->m17_dst_csd));
|
||||||
memset(state->m17_src_csd, 0, sizeof(state->m17_src_csd));
|
memset(state->m17_src_csd, 0, sizeof(state->m17_src_csd));
|
||||||
sprintf (state->m17_dst_str, "%s", "");
|
sprintf (state->m17_dst_str, "%s", "");
|
||||||
@@ -1069,6 +1070,7 @@ initState (dsd_state * state)
|
|||||||
|
|
||||||
state->m17_dst = 0;
|
state->m17_dst = 0;
|
||||||
state->m17_src = 0;
|
state->m17_src = 0;
|
||||||
|
state->m17_can = 0;
|
||||||
memset(state->m17_dst_csd, 0, sizeof(state->m17_dst_csd));
|
memset(state->m17_dst_csd, 0, sizeof(state->m17_dst_csd));
|
||||||
memset(state->m17_src_csd, 0, sizeof(state->m17_src_csd));
|
memset(state->m17_src_csd, 0, sizeof(state->m17_src_csd));
|
||||||
sprintf (state->m17_dst_str, "%s", "");
|
sprintf (state->m17_dst_str, "%s", "");
|
||||||
@@ -1467,6 +1469,10 @@ main (int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
fprintf (stderr,"MBElib Version: %s\n", versionstr);
|
fprintf (stderr,"MBElib Version: %s\n", versionstr);
|
||||||
|
|
||||||
|
#ifdef USE_CODEC2
|
||||||
|
fprintf (stderr,"CODEC2 Support Enabled\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
initOpts (&opts);
|
initOpts (&opts);
|
||||||
initState (&state);
|
initState (&state);
|
||||||
|
|
||||||
|
|||||||
@@ -2262,7 +2262,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
printw("%s", FM_bannerN[i]);
|
printw("%s", FM_bannerN[i]);
|
||||||
if (i == 1) printw (" ESC to Menu");
|
if (i == 1) printw (" ESC to Menu");
|
||||||
if (i == 2) printw (" 'q' to Quit ");
|
if (i == 2) printw (" 'q' to Quit ");
|
||||||
if (i == 4) printw (" MBElib %s", versionstr);
|
if (i == 4 && opts->frame_m17 == 0) printw (" MBElib %s", versionstr);
|
||||||
|
if (i == 4 && opts->frame_m17 == 1) printw (" CODEC2");
|
||||||
#ifdef AERO_BUILD
|
#ifdef AERO_BUILD
|
||||||
if (i == 5) printw (" %s ", "Aero Build");
|
if (i == 5) printw (" %s ", "Aero Build");
|
||||||
if (i == 6) printw (" v2.1b (20230726) \n");
|
if (i == 6) printw (" v2.1b (20230726) \n");
|
||||||
@@ -2492,14 +2493,13 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
{
|
{
|
||||||
|
|
||||||
printw ("| ");
|
printw ("| ");
|
||||||
printw ("M17 - ");
|
printw ("M17: ");
|
||||||
|
|
||||||
//insert data type and frame information
|
//insert data type and frame information
|
||||||
if (state->m17_str_dt == 0) printw("Reserved");
|
if (state->m17_str_dt == 0) printw("Reserved");
|
||||||
if (state->m17_str_dt == 1) printw("Data ");
|
if (state->m17_str_dt == 1) printw("Data ");
|
||||||
if (state->m17_str_dt == 2) printw("Voice (3200) ");
|
if (state->m17_str_dt == 2) printw("Voice (3200) ");
|
||||||
if (state->m17_str_dt == 3) printw("Voice (1600) + Data");
|
if (state->m17_str_dt == 3) printw("Voice (1600) + Data");
|
||||||
printw (" ");
|
|
||||||
|
|
||||||
printw ("\n");
|
printw ("\n");
|
||||||
printw ("| ");
|
printw ("| ");
|
||||||
@@ -2510,11 +2510,7 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
else if (state->m17_dst != 0 && state->m17_dst >= 0xEE6B28000000)
|
else if (state->m17_dst != 0 && state->m17_dst >= 0xEE6B28000000)
|
||||||
printw("RESERVED (%012llx) ", state->m17_dst);
|
printw("RESERVED (%012llx) ", state->m17_dst);
|
||||||
else
|
else
|
||||||
{
|
|
||||||
// for (i = 0; i < 9; i++)
|
|
||||||
// printw ("%c", state->m17_dst_csd[i]);
|
|
||||||
printw("%s", state->m17_dst_str);
|
printw("%s", state->m17_dst_str);
|
||||||
}
|
|
||||||
|
|
||||||
printw ("\n");
|
printw ("\n");
|
||||||
printw ("| ");
|
printw ("| ");
|
||||||
@@ -2523,15 +2519,17 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
if (state->m17_src != 0 && state->m17_src >= 0xEE6B28000000)
|
if (state->m17_src != 0 && state->m17_src >= 0xEE6B28000000)
|
||||||
printw("RESERVED (%012llx)", state->m17_src);
|
printw("RESERVED (%012llx)", state->m17_src);
|
||||||
else
|
else
|
||||||
{
|
|
||||||
// for (i = 0; i < 9; i++)
|
|
||||||
// printw ("%c", state->m17_src_csd[i]);
|
|
||||||
printw("%s", state->m17_src_str);
|
printw("%s", state->m17_src_str);
|
||||||
}
|
|
||||||
|
|
||||||
printw ("\n");
|
printw ("\n");
|
||||||
printw ("| ");
|
printw ("| ");
|
||||||
|
|
||||||
|
printw ("CAN: %02d ", state->m17_can);
|
||||||
|
|
||||||
|
printw ("\n");
|
||||||
|
printw ("| ");
|
||||||
|
|
||||||
|
|
||||||
//fill in any extra info, like Meta (IV, etc)
|
//fill in any extra info, like Meta (IV, etc)
|
||||||
if (state->m17_enc == 2)
|
if (state->m17_enc == 2)
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ void M17decodeLSF(dsd_state * state)
|
|||||||
state->m17_str_dt = lsf_dt;
|
state->m17_str_dt = lsf_dt;
|
||||||
state->m17_dst = lsf_dst;
|
state->m17_dst = lsf_dst;
|
||||||
state->m17_src = lsf_src;
|
state->m17_src = lsf_src;
|
||||||
|
state->m17_can = lsf_cn;
|
||||||
|
|
||||||
fprintf (stderr, "\n");
|
fprintf (stderr, "\n");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user