Created
May 9, 2011 17:51
-
-
Save anonymous/962970 to your computer and use it in GitHub Desktop.
Teacup reprap firmware patch: update temp_residency each 10ms instead of 250ms (when using INTERCOM).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -Naur a/temp.c b/temp.c | |
--- a/temp.c 2011-05-09 23:19:05.386655497 +0600 | |
+++ b/temp.c 2011-05-09 23:37:36.316164309 +0600 | |
@@ -271,8 +271,9 @@ | |
break; | |
} | |
temp_sensors_runtime[i].last_read_temp = temp; | |
+ } | |
- if (labs((int16_t)(temp - temp_sensors_runtime[i].target_temp)) < (TEMP_HYSTERESIS*4)) { | |
+ if (labs((int16_t)(temp_sensors_runtime[i].last_read_temp - temp_sensors_runtime[i].target_temp)) < (TEMP_HYSTERESIS*4)) { | |
if (temp_sensors_runtime[i].temp_residency < (TEMP_RESIDENCY_TIME*100)) | |
temp_sensors_runtime[i].temp_residency++; | |
} | |
@@ -283,7 +284,6 @@ | |
if (temp_sensors[i].heater < NUM_HEATERS) { | |
heater_tick(temp_sensors[i].heater, i, temp_sensors_runtime[i].last_read_temp, temp_sensors_runtime[i].target_temp); | |
} | |
- } | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment