Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only issue MAXTEMP when heating #5082

Merged
merged 1 commit into from
Oct 26, 2016
Merged

Conversation

Fulg
Copy link
Contributor

@Fulg Fulg commented Oct 24, 2016

This is for #5075, my printer was randomly throwing MAXTEMP errors while idle and I could not figure out why. Throwing MAXTEMP only when heating allows me to use SHOW_TEMP_ADC_VALUES and debug the issue without the firmware going in a panic.

@@ -1809,7 +1809,7 @@ void Temperature::isr() {

for (uint8_t e = 0; e < COUNT(temp_dir); e++) {
const int tdir = temp_dir[e], rawtemp = current_temperature_raw[e] * tdir;
if (rawtemp > maxttemp_raw[e] * tdir) max_temp_error(e);
if (rawtemp > maxttemp_raw[e] * tdir && target_temperature[e] > 0.0f) max_temp_error(e);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I check for !is_preheating(e) like MINTEMP below? It didn't seem safe to add.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You got that right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants