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
     case OP_WAIT_TEMPERATURE:
159
     case OP_WAIT_TEMPERATURE:
160
         debug("workflow temp %.1f C", wf[wf_i].steps[step].val / 10.0);
160
         debug("workflow temp %.1f C", wf[wf_i].steps[step].val / 10.0);
161
         start_val = volcano_get_current_temp();
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
         break;
165
         break;
164
 
166
 
165
     case OP_PUMP_TIME:
167
     case OP_PUMP_TIME:
253
 
255
 
254
     case OP_WAIT_TEMPERATURE: {
256
     case OP_WAIT_TEMPERATURE: {
255
         uint16_t temp = volcano_get_current_temp();
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
         curr_val = temp;
264
         curr_val = temp;
257
         done = (temp >= (wf[wf_i].steps[step].val - 5));
265
         done = (temp >= (wf[wf_i].steps[step].val - 5));
258
         break;
266
         break;

Loading…
Cancel
Save