Browse Source

ensure set temperature in workflow and fix start temperature when cold

Thomas Buck 1 year ago
parent
commit
09f9cf19a2
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      src/workflow.c

+ 9
- 1
src/workflow.c View File

@@ -159,7 +159,9 @@ static void do_step(void) {
159 159
     case OP_WAIT_TEMPERATURE:
160 160
         debug("workflow temp %.1f C", wf[wf_i].steps[step].val / 10.0);
161 161
         start_val = volcano_get_current_temp();
162
-        volcano_set_target_temp(wf[wf_i].steps[step].val);
162
+        do {
163
+            volcano_set_target_temp(wf[wf_i].steps[step].val);
164
+        } while (volcano_get_target_temp() != wf[wf_i].steps[step].val);
163 165
         break;
164 166
 
165 167
     case OP_PUMP_TIME:
@@ -253,6 +255,12 @@ void wf_run(void) {
253 255
 
254 256
     case OP_WAIT_TEMPERATURE: {
255 257
         uint16_t temp = volcano_get_current_temp();
258
+
259
+        // volcano does not provide a temperature when cold
260
+        if (start_val == 0) {
261
+            start_val = temp;
262
+        }
263
+
256 264
         curr_val = temp;
257 265
         done = (temp >= (wf[wf_i].steps[step].val - 5));
258 266
         break;

Loading…
Cancel
Save