Merge pull request #1805 from DRracer/MK3

PFW-844
This commit is contained in:
Marek Běl 2019-05-10 13:41:59 +00:00 committed by GitHub
commit 084c6f2700
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

2
Firmware/temperature.cpp Normal file → Executable file
View File

@ -264,11 +264,13 @@ static void temp_runaway_stop(bool isPreheat, bool isBed);
soft_pwm_bed = (MAX_BED_POWER)/2;
timer02_set_pwm0(soft_pwm_bed << 1);
bias = d = (MAX_BED_POWER)/2;
target_temperature_bed = (int)temp; // to display the requested target bed temperature properly on the main screen
}
else
{
soft_pwm[extruder] = (PID_MAX)/2;
bias = d = (PID_MAX)/2;
target_temperature[extruder] = (int)temp; // to display the requested target extruder temperature properly on the main screen
}

View File

@ -1765,6 +1765,7 @@ void lcd_commands()
if (lcd_commands_step == 3 && !blocks_queued()) { //PID calibration
strcpy(cmd1, "M303 E0 S");
strcat(cmd1, ftostr3(pid_temp));
// setting the correct target temperature (for visualization) is done in PID_autotune
enquecommand(cmd1);
lcd_setstatuspgm(_i("PID cal. "));////MSG_PID_RUNNING c=20 r=1
lcd_commands_step = 2;
@ -1773,6 +1774,7 @@ void lcd_commands()
pid_tuning_finished = false;
custom_message_state = 0;
lcd_setstatuspgm(_i("PID cal. finished"));////MSG_PID_FINISHED c=20 r=1
setAllTargetHotends(0); // reset all hotends temperature including the number displayed on the main screen
if (_Kp != 0 || _Ki != 0 || _Kd != 0) {
strcpy(cmd1, "M301 P");
strcat(cmd1, ftostr32(_Kp));