From 2afa1234c7ff56e47ef37ef1f607e3763f6ff9a7 Mon Sep 17 00:00:00 2001 From: c vw Date: Thu, 23 Jul 2020 10:28:05 +0200 Subject: [PATCH] Do GPIO init before autostart. --- discovery.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/discovery.c b/discovery.c index 2f546ea..cfc7e0f 100644 --- a/discovery.c +++ b/discovery.c @@ -532,6 +532,11 @@ fprintf(stderr,"%p Protocol=%d name=%s\n",d,d->protocol,d->name); } } +#ifdef GPIO + controller=CONTROLLER2_V2; + gpio_set_defaults(controller); + gpio_restore_state(); +#endif g_print("%s: devices=%d autostart=%d\n",__FUNCTION__,devices,autostart); @@ -574,10 +579,6 @@ fprintf(stderr,"%p Protocol=%d name=%s\n",d,d->protocol,d->name); #endif #ifdef GPIO - controller=CONTROLLER2_V2; - gpio_set_defaults(controller); - gpio_restore_state(); - GtkWidget *gpio=gtk_combo_box_text_new(); gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(gpio),NULL,"No Controller"); gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(gpio),NULL,"Controller1"); -- 2.45.2