2 Commitit

Tekijä SHA1 Viesti Päivämäärä
  Thomas Buck 471e4f99e1 battery limit color 1 vuosi sitten
  Thomas Buck e421199617 volcano workflow disconnect 1 vuosi sitten
2 muutettua tiedostoa jossa 2 lisäystä ja 6 poistoa
  1. 1
    1
      src/image.c
  2. 1
    5
      src/state_volcano_run.c

+ 1
- 1
src/image.c Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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");

Loading…
Peruuta
Tallenna