1149 unit->prof_target_hi = profile->inittemp_hi; |
1149 unit->prof_target_hi = profile->inittemp_hi; |
1150 unit->prof_fridge_mode = 0; |
1150 unit->prof_fridge_mode = 0; |
1151 |
1151 |
1152 switch (unit->prof_state) { |
1152 switch (unit->prof_state) { |
1153 case PROFILE_OFF: |
1153 case PROFILE_OFF: |
1154 // unit->prof_target_lo = profile->inittemp_lo; |
|
1155 // unit->prof_target_hi = profile->inittemp_hi; |
|
1156 // unit->prof_fridge_mode = 0; |
|
1157 unit->prof_percent = 0; |
1154 unit->prof_percent = 0; |
1158 break; |
1155 break; |
1159 case PROFILE_PAUSE: |
1156 case PROFILE_PAUSE: |
1160 /* |
1157 /* |
1161 * Keep current temperature, measure pause time. For |
1158 * Keep current temperature, measure pause time. For |
1241 unit->prof_fridge_mode = 100 - (((run_minutes - (time_until_now * 60)) * 100) / (step->steptime * 60)); |
1238 unit->prof_fridge_mode = 100 - (((run_minutes - (time_until_now * 60)) * 100) / (step->steptime * 60)); |
1242 } else { |
1239 } else { |
1243 unit->prof_fridge_mode = step->fridge_mode; |
1240 unit->prof_fridge_mode = step->fridge_mode; |
1244 } |
1241 } |
1245 if (debug) |
1242 if (debug) |
1246 fprintf(stdout, "%d/%d/%d ", previous_fridge_mode, step->fridge_mode, unit->prof_fridge_mode); |
|
1247 |
|
1248 if (debug) |
|
1249 fprintf(stdout, "tempshift=%.1f..%.1f minutes=%d duration=%d temp_move=%.3f..%.3f ", |
1243 fprintf(stdout, "tempshift=%.1f..%.1f minutes=%d duration=%d temp_move=%.3f..%.3f ", |
1250 step->target_lo - previous_target_lo, |
1244 step->target_lo - previous_target_lo, |
1251 step->target_hi - previous_target_hi, |
1245 step->target_hi - previous_target_hi, |
1252 run_minutes - (time_until_now * 60), |
1246 run_minutes - (time_until_now * 60), |
1253 step->steptime * 60, unit->prof_target_lo, unit->prof_target_hi); |
1247 step->steptime * 60, unit->prof_target_lo, unit->prof_target_hi); |