2 コミット

作成者 SHA1 メッセージ 日付
  Thomas Buck 471e4f99e1 battery limit color 8ヶ月前
  Thomas Buck e421199617 volcano workflow disconnect 8ヶ月前
2個のファイルの変更2行の追加6行の削除
  1. 1
    1
      src/image.c
  2. 1
    5
      src/state_volcano_run.c

+ 1
- 1
src/image.c ファイルの表示

@@ -90,7 +90,7 @@ void draw_splash(void) {
90 90
 }
91 91
 
92 92
 void draw_battery_indicator(void) {
93
-    static const float batt_warn_limit = 15.0f;
93
+    static const float batt_warn_limit = 0.0f;
94 94
     static char prev_s[30] = {0};
95 95
     static uint32_t prev_c = 0;
96 96
 

+ 1
- 5
src/state_volcano_run.c ファイルの表示

@@ -35,7 +35,6 @@ static bd_addr_t ble_addr = {0};
35 35
 static bd_addr_type_t ble_type = 0;
36 36
 static bool wait_for_connect = false;
37 37
 static bool wait_for_disconnect = false;
38
-static bool aborted = false;
39 38
 
40 39
 void state_volcano_run_index(uint16_t index) {
41 40
     wf_index = index;
@@ -50,7 +49,6 @@ static void volcano_buttons(enum buttons btn, bool state) {
50 49
     if (state && (btn == BTN_Y)) {
51 50
         if ((!wait_for_connect) && (!wait_for_disconnect)) {
52 51
             debug("workflow abort");
53
-            aborted = true;
54 52
             wf_reset();
55 53
             volcano_set_pump_state(false);
56 54
             volcano_set_heater_state(false);
@@ -67,8 +65,6 @@ void state_volcano_run_enter(void) {
67 65
     debug("workflow connect");
68 66
     ble_connect(ble_addr, ble_type);
69 67
     wait_for_connect = true;
70
-
71
-    aborted = false;
72 68
 }
73 69
 
74 70
 void state_volcano_run_exit(void) {
@@ -139,7 +135,7 @@ void state_volcano_run_run(void) {
139 135
     menu_run(draw, true);
140 136
 
141 137
     // auto disconnect when end of workflow is reached
142
-    if ((!wait_for_connect) && (!aborted)) {
138
+    if ((!wait_for_connect) && (!wait_for_disconnect)) {
143 139
         struct wf_state state = wf_status();
144 140
         if (state.status == WF_IDLE) {
145 141
             debug("workflow disconnect");

読み込み中…
キャンセル
保存