From 1f7a6873fbe564714950ccbca9b1270090d40c82 Mon Sep 17 00:00:00 2001 From: DL1YCF Date: Sun, 22 Aug 2021 14:29:22 +0200 Subject: [PATCH] Using the new "status text" interface of WDSP --- main.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index cd13802..1d03f5f 100644 --- a/main.c +++ b/main.c @@ -176,7 +176,6 @@ gboolean main_delete (GtkWidget *widget) { static int init(void *data) { char wisdom_directory[1024]; - int counter; g_print("%s\n",__FUNCTION__); @@ -200,23 +199,17 @@ static int init(void *data) { char *c=getcwd(wisdom_directory, sizeof(wisdom_directory)); strcpy(&wisdom_directory[strlen(wisdom_directory)],"/"); g_print("Securing wisdom file in directory: %s\n", wisdom_directory); + status_text("Checking FFTW Wisdom file ..."); wisdom_running=1; - counter=0; pthread_create(&wisdom_thread_id, NULL, wisdom_thread, wisdom_directory); while (wisdom_running) { - if (counter++ < 10) { - status_text("Checking FFTW Wisdom file ..."); - } else { - // if it takes longer than 1 sec, assume that WDSP - // is (re-) creating the wisdom file - status_text("Creating FFTW Wisdom file ..."); - } // wait for the wisdom thread to complete, meanwhile // handling any GTK events. usleep(100000); // 100ms while (gtk_events_pending ()) { gtk_main_iteration (); } + status_text(wisdom_get_status()); } g_idle_add(ext_discovery,NULL); -- 2.45.2