Skip to content

Instantly share code, notes, and snippets.

/temp.c.patch

Created May 9, 2011
Embed
What would you like to do?
Teacup reprap firmware patch: update temp_residency each 10ms instead of 250ms (when using INTERCOM).
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
You can’t perform that action at this time.