mirror of https://github.com/lwvmobile/dsd-fme.git
More LZ Tweaks; #123
This commit is contained in:
parent
0a214af29b
commit
380657679e
|
|
@ -51,8 +51,8 @@ char * FM_banner[9] = {
|
||||||
" ██╔══██╗██╔════╝██╔══██╗ ███║ ╚════██║",
|
" ██╔══██╗██╔════╝██╔══██╗ ███║ ╚════██║",
|
||||||
" ██║ ██║╚█████╗ ██║ ██║ Lima ███║ ███╔═╝",
|
" ██║ ██║╚█████╗ ██║ ██║ Lima ███║ ███╔═╝",
|
||||||
" ██║ ██║ ╚═══██╗██║ ██║ Zulu ███║ ██╔══╝ ",
|
" ██║ ██║ ╚═══██╗██║ ██║ Zulu ███║ ██╔══╝ ",
|
||||||
" ██████╔╝██████╔╝██████╔╝ Edition III ████████╗███████╗",
|
" ██████╔╝██████╔╝██████╔╝ Edition IV ████████╗███████╗",
|
||||||
" ╚═════╝ ╚═════╝ ╚═════╝ Windows 32-bit╚═══════╝╚══════╝",
|
" ╚═════╝ ╚═════╝ ╚═════╝ ╚═══════╝╚══════╝",
|
||||||
" "
|
" "
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
|
|
@ -93,14 +93,18 @@ noCarrier (dsd_opts * opts, dsd_state * state)
|
||||||
//only do it here on the tweaks
|
//only do it here on the tweaks
|
||||||
#ifdef LIMAZULUTWEAKS
|
#ifdef LIMAZULUTWEAKS
|
||||||
state->nxdn_last_ran = -1;
|
state->nxdn_last_ran = -1;
|
||||||
|
state->nxdn_last_rid = 0;
|
||||||
|
state->nxdn_last_tg = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//experimental conventional frequency scanner mode
|
//experimental conventional frequency scanner mode
|
||||||
if (opts->scanner_mode == 1 && ( (time(NULL) - state->last_cc_sync_time) > opts->trunk_hangtime))
|
if (opts->scanner_mode == 1 && ( (time(NULL) - state->last_cc_sync_time) > opts->trunk_hangtime))
|
||||||
{
|
{
|
||||||
|
|
||||||
//always do this one -- makes sense during scanning
|
//always do these -- makes sense during scanning
|
||||||
state->nxdn_last_ran = -1;
|
state->nxdn_last_ran = -1;
|
||||||
|
state->nxdn_last_rid = 0;
|
||||||
|
state->nxdn_last_tg = 0;
|
||||||
|
|
||||||
if (state->lcn_freq_roll >= state->lcn_freq_count)
|
if (state->lcn_freq_roll >= state->lcn_freq_count)
|
||||||
{
|
{
|
||||||
|
|
@ -550,6 +554,9 @@ initOpts (dsd_opts * opts)
|
||||||
opts->use_ncurses_terminal = 0;
|
opts->use_ncurses_terminal = 0;
|
||||||
opts->ncurses_compact = 0;
|
opts->ncurses_compact = 0;
|
||||||
opts->ncurses_history = 1;
|
opts->ncurses_history = 1;
|
||||||
|
#ifdef LIMAZULUTWEAKS
|
||||||
|
opts->ncurses_compact = 1;
|
||||||
|
#endif
|
||||||
opts->payload = 0;
|
opts->payload = 0;
|
||||||
opts->inverted_dpmr = 0;
|
opts->inverted_dpmr = 0;
|
||||||
opts->dmr_mono = 0;
|
opts->dmr_mono = 0;
|
||||||
|
|
@ -1326,13 +1333,17 @@ main (int argc, char **argv)
|
||||||
char versionstr[25];
|
char versionstr[25];
|
||||||
mbe_printVersion (versionstr);
|
mbe_printVersion (versionstr);
|
||||||
|
|
||||||
|
#ifdef LIMAZULUTWEAKS
|
||||||
|
fprintf (stderr," Digital Speech Decoder: LimaZulu Edition IV\n");
|
||||||
|
#else
|
||||||
fprintf (stderr," Digital Speech Decoder: Florida Man Edition\n");
|
fprintf (stderr," Digital Speech Decoder: Florida Man Edition\n");
|
||||||
|
#endif
|
||||||
for (short int i = 1; i < 7; i++) {
|
for (short int i = 1; i < 7; i++) {
|
||||||
fprintf (stderr,"%s\n", FM_banner[i]);
|
fprintf (stderr,"%s\n", FM_banner[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf (stderr, "Github Build Version: %s \n", GIT_TAG);
|
fprintf (stderr, "Build Version: %s \n", GIT_TAG);
|
||||||
fprintf (stderr,"MBElib version %s\n", versionstr);
|
fprintf (stderr,"MBElib Version: %s\n", versionstr);
|
||||||
|
|
||||||
initOpts (&opts);
|
initOpts (&opts);
|
||||||
initState (&state);
|
initState (&state);
|
||||||
|
|
|
||||||
|
|
@ -41,19 +41,6 @@ int i = 0;
|
||||||
char versionstr[25];
|
char versionstr[25];
|
||||||
unsigned long long int call_matrix[33][6];
|
unsigned long long int call_matrix[33][6];
|
||||||
|
|
||||||
#ifdef LIMAZULUTWEAKS
|
|
||||||
char * FM_bannerN[9] = {
|
|
||||||
" ",
|
|
||||||
" ██████╗ ██████╗██████╗ ███╗ ███████╗",
|
|
||||||
" ██╔══██╗██╔════╝██╔══██╗ ███║ ╚════██║",
|
|
||||||
" ██║ ██║╚█████╗ ██║ ██║ ███║ ███╔═╝",
|
|
||||||
" ██║ ██║ ╚═══██╗██║ ██║ Lima ███║ ██╔══╝ ",
|
|
||||||
" ██████╔╝██████╔╝██████╔╝ Zulu ████████╗███████╗",
|
|
||||||
" ╚═════╝ ╚═════╝ ╚═════╝ Edition III ╚═══════╝╚══════╝",
|
|
||||||
" ",
|
|
||||||
" "
|
|
||||||
};
|
|
||||||
#else
|
|
||||||
char * FM_bannerN[9] = {
|
char * FM_bannerN[9] = {
|
||||||
" ",
|
" ",
|
||||||
" ██████╗ ██████╗██████╗ ███████╗███╗ ███╗███████╗ ",
|
" ██████╗ ██████╗██████╗ ███████╗███╗ ███╗███████╗ ",
|
||||||
|
|
@ -65,8 +52,6 @@ char * FM_bannerN[9] = {
|
||||||
" ",
|
" ",
|
||||||
" "
|
" "
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
char * SyncTypes[44] = {
|
char * SyncTypes[44] = {
|
||||||
"P25P1",
|
"P25P1",
|
||||||
|
|
@ -2073,14 +2058,23 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
if (opts->ncurses_compact == 1)
|
if (opts->ncurses_compact == 1)
|
||||||
{
|
{
|
||||||
printw ("------------------------------------------------------------------------------\n");
|
printw ("------------------------------------------------------------------------------\n");
|
||||||
printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", GIT_TAG);
|
// printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", GIT_TAG);
|
||||||
// printw ("| Digital Speech Decoder: Florida Man Edition - zDEV %s \n", "v2.0.0-100-gae58fab Win32");
|
printw ("| Digital Speech Decoder: Florida Man Edition - Aero %s \n", "v2.0.1-6 Win32");
|
||||||
|
printw ("------------------------------------------------------------------------------\n");
|
||||||
|
}
|
||||||
|
#elif LIMAZULUTWEAKS
|
||||||
|
if (opts->ncurses_compact == 1)
|
||||||
|
{
|
||||||
|
printw ("------------------------------------------------------------------------------\n");
|
||||||
|
printw ("| Digital Speech Decoder: LimaZulu Edition IV: The Voyage Home \n");
|
||||||
|
printw ("------------------------------------------------------------------------------\n");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (opts->ncurses_compact == 1)
|
if (opts->ncurses_compact == 1)
|
||||||
{
|
{
|
||||||
printw ("------------------------------------------------------------------------------\n");
|
printw ("------------------------------------------------------------------------------\n");
|
||||||
printw ("| Digital Speech Decoder: Florida Man Edition - zDEV %s \n", GIT_TAG);
|
printw ("| Digital Speech Decoder: Florida Man Edition - zDEV %s \n", GIT_TAG);
|
||||||
|
printw ("------------------------------------------------------------------------------\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (opts->ncurses_compact == 0)
|
if (opts->ncurses_compact == 0)
|
||||||
|
|
@ -2106,6 +2100,9 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
attron(COLOR_PAIR(4));
|
attron(COLOR_PAIR(4));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//fix color/pair issue when compact and trunking enabled
|
||||||
|
if (opts->ncurses_compact == 1 && opts->p25_trunk == 1) attron(COLOR_PAIR(4));
|
||||||
|
|
||||||
printw ("--Input Output----------------------------------------------------------------\n");
|
printw ("--Input Output----------------------------------------------------------------\n");
|
||||||
if (opts->audio_in_type == 0)
|
if (opts->audio_in_type == 0)
|
||||||
{
|
{
|
||||||
|
|
@ -3119,6 +3116,25 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||||
printw ("DCC [%02lld] ", call_matrix[9-j][4]);
|
printw ("DCC [%02lld] ", call_matrix[9-j][4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef LIMAZULUTWEAKS
|
||||||
|
//Group Name Labels from CSV import
|
||||||
|
for (int k = 0; k < state->group_tally; k++)
|
||||||
|
{
|
||||||
|
if (state->group_array[k].groupNumber == call_matrix[9-j][1])
|
||||||
|
{
|
||||||
|
attron(COLOR_PAIR(4));
|
||||||
|
printw ("[%s]", state->group_array[k].groupName);
|
||||||
|
printw ("[%s] ", state->group_array[k].groupMode);
|
||||||
|
}
|
||||||
|
else if (state->group_array[k].groupNumber == call_matrix[9-j][2])
|
||||||
|
{
|
||||||
|
attron(COLOR_PAIR(4));
|
||||||
|
printw ("[%s]", state->group_array[k].groupName);
|
||||||
|
printw ("[%s] ", state->group_array[k].groupMode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
printw ("%s ", getDateC(call_matrix[9-j][5]) ); //You're welcome
|
printw ("%s ", getDateC(call_matrix[9-j][5]) ); //You're welcome
|
||||||
printw ("%s \n", getTimeC(call_matrix[9-j][5]) ); //Remus
|
printw ("%s \n", getTimeC(call_matrix[9-j][5]) ); //Remus
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1129,56 +1129,9 @@ void NXDN_decode_VCALL(dsd_opts * opts, dsd_state * state, uint8_t * Message)
|
||||||
if (state->rkey_array[KeyID] != 0) state->R = state->rkey_array[KeyID];
|
if (state->rkey_array[KeyID] != 0) state->R = state->rkey_array[KeyID];
|
||||||
else if (state->rkey_array[DestinationID] != 0) state->R = state->rkey_array[DestinationID];
|
else if (state->rkey_array[DestinationID] != 0) state->R = state->rkey_array[DestinationID];
|
||||||
|
|
||||||
// #ifdef LIMAZULUTWEAKS
|
|
||||||
|
|
||||||
// //LimaZulu specific tweak, load keys from frequency value, if avalable -- untested
|
|
||||||
|
|
||||||
// long int freq = 0;
|
|
||||||
// uint8_t hash_bits[24];
|
|
||||||
// memset (hash_bits, 0, sizeof(hash_bits));
|
|
||||||
// uint16_t limazulu = 0;
|
|
||||||
|
|
||||||
// //if not available, then poll rigctl if its available
|
|
||||||
// if (opts->use_rigctl == 1)
|
|
||||||
// freq = GetCurrentFreq (opts->rigctl_sockfd);
|
|
||||||
|
|
||||||
// //if using rtl input, we can ask for the current frequency tuned
|
|
||||||
// else if (opts->audio_in_type == 3)
|
|
||||||
// freq = (long int)opts->rtlsdr_center_freq;
|
|
||||||
|
|
||||||
// //freq = 167831250; //hardset for testing
|
|
||||||
|
|
||||||
// //since a frequency value will be larger than the 16-bit max, we need to hash it first
|
|
||||||
// //the hash has to be run the same way as the import, so at a 24-bit depth, which hopefully
|
|
||||||
// //will not lead to any duplicate key loads due to multiple CRC16 collisions on a larger value?
|
|
||||||
// for (int i = 0; i < 24; i++)
|
|
||||||
// hash_bits[i] = ((freq << i) & 0x800000) >> 23; //load into array for CRC16
|
|
||||||
|
|
||||||
// if (freq) limazulu = ComputeCrcCCITT16d (hash_bits, 24);
|
|
||||||
// limazulu = limazulu & 0xFFFF; //make sure no larger than 16-bits
|
|
||||||
|
|
||||||
// fprintf (stderr, "%s", KCYN);
|
|
||||||
// if (freq) fprintf (stderr, "\n Freq: %ld - Freq Hash: %d", freq, limazulu);
|
|
||||||
// if (state->rkey_array[limazulu] != 0) fprintf (stderr, " - Key Loaded: %lld", state->rkey_array[limazulu]);
|
|
||||||
// fprintf (stderr, "%s", KNRM);
|
|
||||||
|
|
||||||
// if (state->rkey_array[limazulu] != 0)
|
|
||||||
// state->R = state->rkey_array[limazulu];
|
|
||||||
|
|
||||||
// #endif //end LIMAZULUTWEAKS
|
|
||||||
|
|
||||||
//Don't zero key if no keyloader
|
//Don't zero key if no keyloader
|
||||||
if (CipherType != 0x1 && state->keyloader == 1) state->R = 0;
|
if (CipherType != 0x1 && state->keyloader == 1) state->R = 0;
|
||||||
|
|
||||||
//NOTE: Broadcast Call appears to have values that aren't typical for VCALL,
|
|
||||||
//so not applying any settings below if CallType == 0 (BC Call)
|
|
||||||
|
|
||||||
//NOTE: Above note may be in error; its possible that the issues I was having
|
|
||||||
//was from not resetting the entire SACCH superframe after reading it, and
|
|
||||||
//the samples in question having interwoven ALIAS and VCALL, and bad settings
|
|
||||||
//coming from a missed SF Part of Frame, if not reset, we could skip a SF POF
|
|
||||||
//and still believe we have a good decode -- will need further testing #118
|
|
||||||
|
|
||||||
/* Print the "Cipher Type" */
|
/* Print the "Cipher Type" */
|
||||||
if(CipherType != 0 && MessageType == 0x1)
|
if(CipherType != 0 && MessageType == 0x1)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue