瀏覽代碼

print message while discovering characteristics

Thomas Buck 1 年之前
父節點
當前提交
02c5dca7cf
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11
    0
      src/state_volcano_run.c

+ 11
- 0
src/state_volcano_run.c 查看文件

@@ -79,6 +79,17 @@ void state_volcano_run_exit(void) {
79 79
 static void draw(struct menu_state *menu) {
80 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 93
     int pos = 0;
83 94
     pos += snprintf(menu->buff + pos, MENU_MAX_LEN - pos,
84 95
                     "step %d / %d\n", state.index, state.count);

Loading…
取消
儲存