mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-15 02:07:24 -05:00
NCurses wide support and cmake
NCurses wide support and cmake
This commit is contained in:
@@ -557,6 +557,8 @@ sigfun (int sig)
|
||||
{
|
||||
exitflag = 1;
|
||||
signal (SIGINT, SIG_DFL);
|
||||
ncursesClose ();
|
||||
|
||||
#ifdef USE_RTLSDR
|
||||
rtlsdr_sighandler();
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,7 @@ unsigned long long sr_4 = 0; //
|
||||
unsigned long long sr_5 = 0; //
|
||||
unsigned long long sr_6 = 0; //
|
||||
*/
|
||||
char c; //getch key
|
||||
int tg; //last tg
|
||||
int rd; //last rid
|
||||
int rn; //last ran
|
||||
@@ -103,7 +104,7 @@ char * getTimeN(void) //get pretty hh:mm:ss timestamp
|
||||
void ncursesOpen ()
|
||||
{
|
||||
mbe_printVersion (versionstr);
|
||||
//setlocale(LC_ALL, "");
|
||||
setlocale(LC_ALL, "");
|
||||
initscr(); //Initialize NCURSES screen window
|
||||
start_color();
|
||||
init_pair(1, COLOR_YELLOW, COLOR_BLACK); //Yellow/Amber for frame sync/control channel, NV style
|
||||
@@ -131,15 +132,15 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
level = 0; //start each cycle with 0
|
||||
erase();
|
||||
//disabling until wide support can be built for LM, etc. $(ncursesw5-config --cflags --libs)
|
||||
//printw ("%s \n", FM_bannerN[0]); //top line in white
|
||||
printw ("%s \n", FM_bannerN[0]); //top line in white
|
||||
attron(COLOR_PAIR(4));
|
||||
//for (short int i = 1; i < 7; i++)
|
||||
//{ //following lines in cyan
|
||||
//printw("%s \n", FM_bannerN[i]);
|
||||
//}
|
||||
for (short int i = 1; i < 7; i++) //following lines in cyan
|
||||
{
|
||||
printw("%s \n", FM_bannerN[i]);
|
||||
}
|
||||
attroff(COLOR_PAIR(4));
|
||||
printw ("--Build Info------------------------------------------------------------------\n");
|
||||
//printw ("| %s \n", FM_bannerN[7]); //http link
|
||||
printw ("| %s \n", FM_bannerN[7]); //http link
|
||||
printw ("| Digital Speech Decoder: Florida Man Edition\n");
|
||||
printw ("| Github Build Version: %s \n", GIT_TAG);
|
||||
printw ("| mbelib version %s\n", versionstr);
|
||||
@@ -431,7 +432,17 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
||||
//printw ("%s %s\n", state->ftype, state->fsubtype); //some ftype strings have extra spaces in them
|
||||
//if (state->lastsynctype != -1) //is there a synctype 0?
|
||||
|
||||
|
||||
//while((c = getch()) != '~') {
|
||||
// printw ("%c\n",c);}
|
||||
//c = getch();
|
||||
/*
|
||||
if (c = getch() != '~')
|
||||
{
|
||||
printf ("%c\n",c);
|
||||
printf ("closing NCurses");
|
||||
ncursesClose();
|
||||
}
|
||||
*/
|
||||
//debug sr printw
|
||||
if (1==2) //disable this later on
|
||||
{
|
||||
|
||||
@@ -1043,6 +1043,7 @@ void rtlsdr_sighandler()
|
||||
{
|
||||
fprintf (stderr, "Signal caught, exiting!\n");
|
||||
fprintf (stderr, "Press CTRL + C again to close. Thanks. \n"); //Kindly remind user to double tap CTRL + C
|
||||
|
||||
rtlsdr_cancel_async(dongle.dev);
|
||||
//cleanup_rtlsdr_stream(); //thank the wraith for this one...if it works...didn't work
|
||||
//_Exit(1);
|
||||
@@ -1155,7 +1156,7 @@ void cleanup_rtlsdr_stream()
|
||||
demod_cleanup(&demod);
|
||||
output_cleanup(&output);
|
||||
controller_cleanup(&controller);
|
||||
|
||||
|
||||
rtlsdr_close(dongle.dev);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user