Explorar el Código

rename state_volcano_workflow to state_workflow

Thomas Buck hace 11 meses
padre
commit
0d40e4adde
Se han modificado 12 ficheros con 151 adiciones y 57 borrados
  1. 1
    1
      CMakeLists.txt
  2. 6
    0
      include/models.h
  3. 1
    1
      include/state.h
  4. 8
    8
      include/state_workflow.h
  5. 10
    0
      include/volcano.h
  6. 5
    5
      src/state.c
  7. 7
    7
      src/state_scan.c
  8. 15
    0
      src/state_settings.c
  9. 8
    8
      src/state_workflow.c
  10. 50
    4
      src/volcano.c
  11. 21
    7
      src/workflow.c
  12. 19
    16
      src/workflow_default.c

+ 1
- 1
CMakeLists.txt Ver fichero

@@ -83,7 +83,7 @@ target_sources(gadget PUBLIC
83 83
     src/state_scan.c
84 84
     src/workflow.c
85 85
     src/menu.c
86
-    src/state_volcano_workflow.c
86
+    src/state_workflow.c
87 87
     src/state_volcano_run.c
88 88
     src/crafty.c
89 89
     src/state_crafty.c

+ 6
- 0
include/models.h Ver fichero

@@ -27,6 +27,12 @@ enum known_devices {
27 27
     DEV_CRAFTY,
28 28
 };
29 29
 
30
+enum unit {
31
+    UNIT_C = 0,
32
+    UNIT_F,
33
+    UNIT_INVALID,
34
+};
35
+
30 36
 enum known_devices models_filter_name(const char *name);
31 37
 int8_t models_get_serial(const uint8_t *data, size_t data_len, char *buff, size_t buff_len);
32 38
 

+ 1
- 1
include/state.h Ver fichero

@@ -22,7 +22,7 @@
22 22
 enum system_state {
23 23
     STATE_INIT = 0,
24 24
     STATE_SCAN,
25
-    STATE_VOLCANO_WORKFLOW,
25
+    STATE_WORKFLOW,
26 26
     STATE_VOLCANO_RUN,
27 27
     STATE_CRAFTY,
28 28
     STATE_EDIT_WORKFLOW,

include/state_volcano_workflow.h → include/state_workflow.h Ver fichero

@@ -1,5 +1,5 @@
1 1
 /*
2
- * state_volcano_workflow.h
2
+ * state_workflow.h
3 3
  *
4 4
  * Copyright (c) 2023 Thomas Buck (thomas@xythobuz.de)
5 5
  *
@@ -16,15 +16,15 @@
16 16
  * See <http://www.gnu.org/licenses/>.
17 17
  */
18 18
 
19
-#ifndef __STATE_VOLCANO_WORKFLOW_H__
20
-#define __STATE_VOLCANO_WORKFLOW_H__
19
+#ifndef __STATE_WORKFLOW_H__
20
+#define __STATE_WORKFLOW_H__
21 21
 
22 22
 #include <stdbool.h>
23 23
 
24
-void state_volcano_wf_edit(bool edit);
24
+void state_wf_edit(bool edit);
25 25
 
26
-void state_volcano_wf_enter(void);
27
-void state_volcano_wf_exit(void);
28
-void state_volcano_wf_run(void);
26
+void state_wf_enter(void);
27
+void state_wf_exit(void);
28
+void state_wf_run(void);
29 29
 
30
-#endif // __STATE_VOLCANO_WORKFLOW_H__
30
+#endif // __STATE_WORKFLOW_H__

+ 10
- 0
include/volcano.h Ver fichero

@@ -22,6 +22,13 @@
22 22
 #include <stdint.h>
23 23
 #include <stdbool.h>
24 24
 
25
+#include "models.h"
26
+
27
+enum volcano_state {
28
+    VOLCANO_STATE_HEATER = (1 << 0),
29
+    VOLCANO_STATE_PUMP = (1 << 1),
30
+};
31
+
25 32
 // returns < 0 on error
26 33
 int8_t volcano_discover_characteristics(void);
27 34
 
@@ -36,4 +43,7 @@ int8_t volcano_set_target_temp(uint16_t v);
36 43
 int8_t volcano_set_heater_state(bool value);
37 44
 int8_t volcano_set_pump_state(bool value);
38 45
 
46
+enum unit volcano_get_unit(void);
47
+enum volcano_state volcano_get_state(void);
48
+
39 49
 #endif // __VOLCANO_H__

+ 5
- 5
src/state.c Ver fichero

@@ -19,7 +19,7 @@
19 19
 #include "config.h"
20 20
 #include "log.h"
21 21
 #include "state_scan.h"
22
-#include "state_volcano_workflow.h"
22
+#include "state_workflow.h"
23 23
 #include "state_volcano_run.h"
24 24
 #include "state_crafty.h"
25 25
 #include "state_edit_workflow.h"
@@ -48,10 +48,10 @@ static const struct state states[STATE_INVALID + 1] = {
48 48
         .exit = state_scan_exit,
49 49
         .run = state_scan_run,
50 50
     }, {
51
-        .name = stringify(STATE_VOLCANO_WORKFLOW),
52
-        .enter = state_volcano_wf_enter,
53
-        .exit = state_volcano_wf_exit,
54
-        .run = state_volcano_wf_run,
51
+        .name = stringify(STATE_WORKFLOW),
52
+        .enter = state_wf_enter,
53
+        .exit = state_wf_exit,
54
+        .run = state_wf_run,
55 55
     }, {
56 56
         .name = stringify(STATE_VOLCANO_RUN),
57 57
         .enter = state_volcano_run_enter,

+ 7
- 7
src/state_scan.c Ver fichero

@@ -26,7 +26,7 @@
26 26
 #include "models.h"
27 27
 #include "menu.h"
28 28
 #include "state.h"
29
-#include "state_volcano_workflow.h"
29
+#include "state_workflow.h"
30 30
 #include "state_volcano_run.h"
31 31
 #include "state_crafty.h"
32 32
 #include "state_scan.h"
@@ -50,8 +50,8 @@ static void enter_cb(int selection) {
50 50
         if (devs++ == selection) {
51 51
             if (dev == DEV_VOLCANO) {
52 52
                 state_volcano_run_target(results[i].addr, results[i].type);
53
-                state_volcano_wf_edit(false);
54
-                state_switch(STATE_VOLCANO_WORKFLOW);
53
+                state_wf_edit(false);
54
+                state_switch(STATE_WORKFLOW);
55 55
             } else if (dev == DEV_CRAFTY) {
56 56
                 state_crafty_target(results[i].addr, results[i].type);
57 57
                 state_switch(STATE_CRAFTY);
@@ -70,8 +70,8 @@ static void enter_cb(int selection) {
70 70
 static void edit_cb(int selection) {
71 71
     UNUSED(selection);
72 72
 
73
-    state_volcano_wf_edit(true);
74
-    state_switch(STATE_VOLCANO_WORKFLOW);
73
+    state_wf_edit(true);
74
+    state_switch(STATE_WORKFLOW);
75 75
 }
76 76
 
77 77
 void state_scan_enter(void) {
@@ -180,8 +180,8 @@ void state_scan_run(void) {
180 180
         if ((now - auto_connect_time) >= VOLCANO_AUTO_CONNECT_TIMEOUT_MS) {
181 181
             state_volcano_run_target(results[auto_connect_idx].addr,
182 182
                                      results[auto_connect_idx].type);
183
-            state_volcano_wf_edit(false);
184
-            state_switch(STATE_VOLCANO_WORKFLOW);
183
+            state_wf_edit(false);
184
+            state_switch(STATE_WORKFLOW);
185 185
 
186 186
             auto_connect_time = 0;
187 187
         }

+ 15
- 0
src/state_settings.c Ver fichero

@@ -22,6 +22,7 @@
22 22
 #include "config.h"
23 23
 #include "log.h"
24 24
 #include "menu.h"
25
+#include "mem.h"
25 26
 #include "state.h"
26 27
 #include "state_settings.h"
27 28
 
@@ -29,7 +30,20 @@ static void enter_cb(int selection) {
29 30
     switch (selection) {
30 31
     case 0:
31 32
         // Auto Connect
33
+        break;
32 34
 
35
+    case 1:
36
+        // Brightness
37
+        break;
38
+
39
+    case 2:
40
+        // Workflows
41
+        break;
42
+
43
+    case 3:
44
+        // Reset
45
+        mem_load_defaults();
46
+        break;
33 47
     }
34 48
 }
35 49
 
@@ -52,6 +66,7 @@ static void draw(struct menu_state *menu) {
52 66
     ADD_STATIC_ELEMENT("Auto Connect");
53 67
     ADD_STATIC_ELEMENT("Brightness");
54 68
     ADD_STATIC_ELEMENT("Workflows");
69
+    ADD_STATIC_ELEMENT("Reset");
55 70
 
56 71
     if (menu->selection < 0) {
57 72
         menu->selection = 0;

src/state_volcano_workflow.c → src/state_workflow.c Ver fichero

@@ -1,5 +1,5 @@
1 1
 /*
2
- * state_volcano_workflow.c
2
+ * state_workflow.c
3 3
  *
4 4
  * Copyright (c) 2023 Thomas Buck (thomas@xythobuz.de)
5 5
  *
@@ -27,7 +27,7 @@
27 27
 #include "state.h"
28 28
 #include "state_volcano_run.h"
29 29
 #include "state_edit_workflow.h"
30
-#include "state_volcano_workflow.h"
30
+#include "state_workflow.h"
31 31
 
32 32
 static bool edit_mode = false;
33 33
 
@@ -71,11 +71,11 @@ static void exit_cb(void) {
71 71
     state_switch(STATE_SCAN);
72 72
 }
73 73
 
74
-void state_volcano_wf_edit(bool edit) {
74
+void state_wf_edit(bool edit) {
75 75
     edit_mode = edit;
76 76
 }
77 77
 
78
-void state_volcano_wf_enter(void) {
78
+void state_wf_enter(void) {
79 79
     if (edit_mode) {
80 80
         menu_init(enter_cb, lower_cb, upper_cb, exit_cb);
81 81
     } else {
@@ -87,7 +87,7 @@ void state_volcano_wf_enter(void) {
87 87
 #endif // VOLCANO_AUTO_CONNECT_TIMEOUT_MS
88 88
 }
89 89
 
90
-void state_volcano_wf_exit(void) {
90
+void state_wf_exit(void) {
91 91
     menu_deinit();
92 92
 }
93 93
 
@@ -103,7 +103,7 @@ static void draw(struct menu_state *menu) {
103 103
 
104 104
         if (i == menu->selection) {
105 105
 #ifdef VOLCANO_AUTO_CONNECT_TIMEOUT_MS
106
-            if ((auto_connect_time != 0) && (!menu_got_input)) {
106
+            if ((auto_connect_time != 0) && (!menu_got_input) && (!edit_mode)) {
107 107
                 uint32_t now = to_ms_since_boot(get_absolute_time());
108 108
                 uint32_t diff = now - auto_connect_time;
109 109
                 pos += snprintf(menu->buff + pos, MENU_MAX_LEN - pos,
@@ -132,11 +132,11 @@ static void draw(struct menu_state *menu) {
132 132
     }
133 133
 }
134 134
 
135
-void state_volcano_wf_run(void) {
135
+void state_wf_run(void) {
136 136
     menu_run(draw, false);
137 137
 
138 138
 #ifdef VOLCANO_AUTO_CONNECT_TIMEOUT_MS
139
-    if ((auto_connect_time != 0) && (!menu_got_input)) {
139
+    if ((auto_connect_time != 0) && (!menu_got_input) && (!edit_mode)) {
140 140
         uint32_t now = to_ms_since_boot(get_absolute_time());
141 141
         if ((now - auto_connect_time) >= VOLCANO_AUTO_CONNECT_TIMEOUT_MS) {
142 142
             state_volcano_run_index(0);

+ 50
- 4
src/volcano.c Ver fichero

@@ -21,7 +21,11 @@
21 21
 #include "ble.h"
22 22
 #include "volcano.h"
23 23
 
24
-// Volcano UUIDs are always the same, except for the 4th byte
24
+#define UUID_SRVC_1       0x10
25
+#define UUID_GET_STATE    0x0C
26
+#define UUID_GET_UNIT     0x0D
27
+
28
+#define UUID_SRVC_2       0x11
25 29
 #define UUID_WRITE_SRVC   0x00
26 30
 #define UUID_CURRENT_TEMP 0x01
27 31
 #define UUID_TARGET_TEMP  0x03
@@ -30,17 +34,20 @@
30 34
 #define UUID_PUMP_ON      0x13
31 35
 #define UUID_PUMP_OFF     0x14
32 36
 
33
-// "101100xx-5354-4f52-5a26-4249434b454c"
37
+// "10xx00xx-5354-4f52-5a26-4249434b454c"
34 38
 static uint8_t uuid_base[16] = {
35
-    0x10, 0x11, 0x00, 0xFF, 0x53, 0x54, 0x4f, 0x52,
39
+    0x10, 0xFF, 0x00, 0xFF, 0x53, 0x54, 0x4f, 0x52,
36 40
     0x5a, 0x26, 0x42, 0x49, 0x43, 0x4b, 0x45, 0x4c,
37 41
 };
38 42
 static uint8_t uuid_base2[16] = {
39
-    0x10, 0x11, 0x00, 0xFF, 0x53, 0x54, 0x4f, 0x52,
43
+    0x10, 0xFF, 0x00, 0xFF, 0x53, 0x54, 0x4f, 0x52,
40 44
     0x5a, 0x26, 0x42, 0x49, 0x43, 0x4b, 0x45, 0x4c,
41 45
 };
42 46
 
43 47
 int8_t volcano_discover_characteristics(void) {
48
+    uuid_base[1] = UUID_SRVC_2;
49
+    uuid_base2[1] = UUID_SRVC_2;
50
+
44 51
     uuid_base[3] = UUID_WRITE_SRVC;
45 52
     int8_t r;
46 53
 
@@ -78,6 +85,7 @@ int8_t volcano_discover_characteristics(void) {
78 85
 }
79 86
 
80 87
 int16_t volcano_get_current_temp(void) {
88
+    uuid_base[1] = UUID_SRVC_2;
81 89
     uuid_base[3] = UUID_CURRENT_TEMP;
82 90
 
83 91
     uint8_t buff[4];
@@ -106,6 +114,8 @@ int16_t volcano_get_target_temp(void) {
106 114
 }
107 115
 
108 116
 int8_t volcano_set_target_temp(uint16_t value) {
117
+    uuid_base[1] = UUID_SRVC_2;
118
+    uuid_base2[1] = UUID_SRVC_2;
109 119
     uuid_base[3] = UUID_WRITE_SRVC;
110 120
     uuid_base2[3] = UUID_TARGET_TEMP;
111 121
 
@@ -121,6 +131,8 @@ int8_t volcano_set_target_temp(uint16_t value) {
121 131
 }
122 132
 
123 133
 int8_t volcano_set_heater_state(bool value) {
134
+    uuid_base[1] = UUID_SRVC_2;
135
+    uuid_base2[1] = UUID_SRVC_2;
124 136
     uuid_base[3] = UUID_WRITE_SRVC;
125 137
 
126 138
     if (value) {
@@ -138,6 +150,8 @@ int8_t volcano_set_heater_state(bool value) {
138 150
 }
139 151
 
140 152
 int8_t volcano_set_pump_state(bool value) {
153
+    uuid_base[1] = UUID_SRVC_2;
154
+    uuid_base2[1] = UUID_SRVC_2;
141 155
     uuid_base[3] = UUID_WRITE_SRVC;
142 156
 
143 157
     if (value) {
@@ -153,3 +167,35 @@ int8_t volcano_set_pump_state(bool value) {
153 167
     }
154 168
     return r;
155 169
 }
170
+
171
+enum unit volcano_get_unit(void) {
172
+    uuid_base[1] = UUID_SRVC_1;
173
+    uuid_base[3] = UUID_GET_UNIT;
174
+
175
+    uint8_t buff[4];
176
+    int32_t r = ble_read(uuid_base, buff, sizeof(buff));
177
+    if (r != sizeof(buff)) {
178
+        debug("ble_read unexpected value %ld", r);
179
+        return UNIT_INVALID;
180
+    }
181
+
182
+    uint32_t *v = (uint32_t *)buff;
183
+    return (*v & 0x200) ? UNIT_F : UNIT_C;
184
+}
185
+
186
+enum volcano_state volcano_get_state(void) {
187
+    uuid_base[1] = UUID_SRVC_1;
188
+    uuid_base[3] = UUID_GET_STATE;
189
+
190
+    uint8_t buff[4];
191
+    int32_t r = ble_read(uuid_base, buff, sizeof(buff));
192
+    if (r != sizeof(buff)) {
193
+        debug("ble_read unexpected value %ld", r);
194
+        return 0xFF;
195
+    }
196
+
197
+    uint32_t *v = (uint32_t *)buff;
198
+    uint32_t heater = (*v & 0x0020);
199
+    uint32_t pump = (*v & 0x2000);
200
+    return (heater ? VOLCANO_STATE_HEATER : 0) | (pump ? VOLCANO_STATE_PUMP : 0);
201
+}

+ 21
- 7
src/workflow.c Ver fichero

@@ -16,6 +16,8 @@
16 16
  * See <http://www.gnu.org/licenses/>.
17 17
  */
18 18
 
19
+#define WF_CONFIRM_WRITES
20
+
19 21
 #include <stdio.h>
20 22
 
21 23
 #include "config.h"
@@ -24,6 +26,15 @@
24 26
 #include "volcano.h"
25 27
 #include "workflow.h"
26 28
 
29
+#ifdef WF_CONFIRM_WRITES
30
+#define DO_WHILE(x, y) \
31
+    do {               \
32
+        x;             \
33
+    } while (y)
34
+#else // WF_CONFIRM_WRITES
35
+#define DO_WHILE(x, y) x
36
+#endif // WF_CONFIRM_WRITES
37
+
27 38
 static enum wf_status status = WF_IDLE;
28 39
 static uint16_t wf_i = 0;
29 40
 static uint16_t step = 0;
@@ -37,13 +48,13 @@ static void do_step(void) {
37 48
     case OP_WAIT_TEMPERATURE:
38 49
         debug("workflow temp %.1f C", mem_data()->wf[wf_i].steps[step].val / 10.0);
39 50
         start_val = volcano_get_current_temp();
40
-        do {
41
-            volcano_set_target_temp(mem_data()->wf[wf_i].steps[step].val);
42
-        } while (volcano_get_target_temp() != mem_data()->wf[wf_i].steps[step].val);
51
+        DO_WHILE(volcano_set_target_temp(mem_data()->wf[wf_i].steps[step].val),
52
+                 volcano_get_target_temp() != mem_data()->wf[wf_i].steps[step].val);
43 53
         break;
44 54
 
45 55
     case OP_PUMP_TIME:
46
-        volcano_set_pump_state(true);
56
+        DO_WHILE(volcano_set_pump_state(true),
57
+                 !(volcano_get_state() & VOLCANO_STATE_PUMP));
47 58
         start_t = to_ms_since_boot(get_absolute_time());
48 59
         start_val = 0;
49 60
         debug("workflow pump %.3f s", mem_data()->wf[wf_i].steps[step].val / 1000.0);
@@ -204,7 +215,8 @@ void wf_start(uint16_t index) {
204 215
      * this means we heat for some seconds before changing the setpoint.
205 216
      * should not be a problem in practice.
206 217
      */
207
-    volcano_set_heater_state(true);
218
+    DO_WHILE(volcano_set_heater_state(true),
219
+             !(volcano_get_state() & VOLCANO_STATE_HEATER));
208 220
     volcano_discover_characteristics();
209 221
 
210 222
     do_step();
@@ -251,13 +263,15 @@ void wf_run(void) {
251 263
 
252 264
     if (done) {
253 265
         if (mem_data()->wf[wf_i].steps[step].op == OP_PUMP_TIME) {
254
-            volcano_set_pump_state(false);
266
+            DO_WHILE(volcano_set_pump_state(false),
267
+                     volcano_get_state() & VOLCANO_STATE_PUMP);
255 268
         }
256 269
 
257 270
         step++;
258 271
         if (step >= mem_data()->wf[wf_i].count) {
259 272
             status = WF_IDLE;
260
-            volcano_set_heater_state(false);
273
+            DO_WHILE(volcano_set_heater_state(false),
274
+                     volcano_get_state() & VOLCANO_STATE_HEATER);
261 275
             debug("workflow finished");
262 276
         } else {
263 277
             do_step();

+ 19
- 16
src/workflow_default.c Ver fichero

@@ -23,51 +23,54 @@
23 23
     { .op = OP_WAIT_TIME, .val = 1000 }, \
24 24
     { .op = OP_PUMP_TIME, .val = 1000 }
25 25
 
26
+#define NOTIFICATIONS NOTIFY, NOTIFY
27
+#define NOTIFICATIONS_LENGTH (2 * 2)
28
+
26 29
 const uint16_t wf_default_count = 5;
27 30
 
28 31
 const struct workflow wf_default_data[] = {
29 32
     {
30
-        .name = "XXL",
33
+        .name = "Default",
31 34
         .author = "xythobuz",
32 35
         .steps = {
33 36
             { .op = OP_WAIT_TEMPERATURE, .val = 1850 },
34 37
             { .op = OP_WAIT_TIME, .val = 10000 },
35
-            { .op = OP_PUMP_TIME, .val = 8000 },
38
+            { .op = OP_PUMP_TIME, .val = 5000 },
36 39
 
37 40
             { .op = OP_WAIT_TEMPERATURE, .val = 1950 },
38 41
             { .op = OP_WAIT_TIME, .val = 5000 },
39
-            { .op = OP_PUMP_TIME, .val = 25000 },
42
+            { .op = OP_PUMP_TIME, .val = 20000 },
40 43
 
41 44
             { .op = OP_WAIT_TEMPERATURE, .val = 2050 },
42 45
             { .op = OP_WAIT_TIME, .val = 5000 },
43
-            { .op = OP_PUMP_TIME, .val = 25000 },
46
+            { .op = OP_PUMP_TIME, .val = 20000 },
44 47
 
45
-            NOTIFY, NOTIFY, NOTIFY, NOTIFY,
48
+            NOTIFICATIONS,
46 49
 
47 50
             { .op = OP_SET_TEMPERATURE, .val = 1900 },
48 51
         },
49
-        .count = 18,
52
+        .count = 10 + NOTIFICATIONS_LENGTH,
50 53
     }, {
51
-        .name = "Default",
54
+        .name = "XXL",
52 55
         .author = "xythobuz",
53 56
         .steps = {
54 57
             { .op = OP_WAIT_TEMPERATURE, .val = 1850 },
55 58
             { .op = OP_WAIT_TIME, .val = 10000 },
56
-            { .op = OP_PUMP_TIME, .val = 5000 },
59
+            { .op = OP_PUMP_TIME, .val = 8000 },
57 60
 
58 61
             { .op = OP_WAIT_TEMPERATURE, .val = 1950 },
59 62
             { .op = OP_WAIT_TIME, .val = 5000 },
60
-            { .op = OP_PUMP_TIME, .val = 20000 },
63
+            { .op = OP_PUMP_TIME, .val = 25000 },
61 64
 
62 65
             { .op = OP_WAIT_TEMPERATURE, .val = 2050 },
63 66
             { .op = OP_WAIT_TIME, .val = 5000 },
64
-            { .op = OP_PUMP_TIME, .val = 20000 },
67
+            { .op = OP_PUMP_TIME, .val = 25000 },
65 68
 
66
-            NOTIFY, NOTIFY, NOTIFY, NOTIFY,
69
+            NOTIFICATIONS,
67 70
 
68 71
             { .op = OP_SET_TEMPERATURE, .val = 1900 },
69 72
         },
70
-        .count = 18,
73
+        .count = 10 + NOTIFICATIONS_LENGTH,
71 74
     }, {
72 75
         .name = "Vorbi",
73 76
         .author = "Rinor",
@@ -105,11 +108,11 @@ const struct workflow wf_default_data[] = {
105 108
             { .op = OP_WAIT_TIME, .val = 5000 },
106 109
             { .op = OP_PUMP_TIME, .val = 20000 },
107 110
 
108
-            NOTIFY, NOTIFY, NOTIFY, NOTIFY,
111
+            NOTIFICATIONS,
109 112
 
110 113
             { .op = OP_SET_TEMPERATURE, .val = 1900 },
111 114
         },
112
-        .count = 18,
115
+        .count = 10 + NOTIFICATIONS_LENGTH,
113 116
     }, {
114 117
         .name = "Hotty",
115 118
         .author = "xythobuz",
@@ -126,10 +129,10 @@ const struct workflow wf_default_data[] = {
126 129
             { .op = OP_WAIT_TIME, .val = 5000 },
127 130
             { .op = OP_PUMP_TIME, .val = 20000 },
128 131
 
129
-            NOTIFY, NOTIFY, NOTIFY, NOTIFY,
132
+            NOTIFICATIONS,
130 133
 
131 134
             { .op = OP_SET_TEMPERATURE, .val = 1900 },
132 135
         },
133
-        .count = 18,
136
+        .count = 10 + NOTIFICATIONS_LENGTH,
134 137
     },
135 138
 };

Loading…
Cancelar
Guardar