Browse Source

print message while discovering characteristics

Thomas Buck 1 year ago
parent
commit
02c5dca7cf
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      src/state_volcano_run.c

+ 11
- 0
src/state_volcano_run.c View File

79
 static void draw(struct menu_state *menu) {
79
 static void draw(struct menu_state *menu) {
80
     struct wf_state state = wf_status();
80
     struct wf_state state = wf_status();
81
 
81
 
82
+    if (state.status == WF_IDLE) {
83
+        if (wait_for_connect) {
84
+            snprintf(menu->buff, MENU_MAX_LEN,
85
+                     "Connecting\nand\nDiscovering");
86
+        } else if (wait_for_disconnect) {
87
+            snprintf(menu->buff, MENU_MAX_LEN,
88
+                     "Disconnecting");
89
+        }
90
+        return;
91
+    }
92
+
82
     int pos = 0;
93
     int pos = 0;
83
     pos += snprintf(menu->buff + pos, MENU_MAX_LEN - pos,
94
     pos += snprintf(menu->buff + pos, MENU_MAX_LEN - pos,
84
                     "step %d / %d\n", state.index, state.count);
95
                     "step %d / %d\n", state.index, state.count);

Loading…
Cancel
Save