diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index bb753eaa4..9c52f0345 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -225,6 +225,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 08f7f9297..58679e0f8 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -2514,13 +2514,13 @@ inline void gcode_M17() { */ inline void gcode_M28() { char* codepos = strchr_pointer + 4; - char* starpos = strchr(strchr_pointer + 4, '*'); + char* starpos = strchr(codepos, '*'); if (starpos) { char* npos = strchr(cmdbuffer[bufindr], 'N'); strchr_pointer = strchr(npos, ' ') + 1; *(starpos) = '\0'; } - card.openFile(strchr_pointer + 4, false); + card.openFile(codepos, false); } /** diff --git a/Marlin/configurator/config/Configuration.h b/Marlin/configurator/config/Configuration.h index 8fc198a22..9c8a92c9c 100644 --- a/Marlin/configurator/config/Configuration.h +++ b/Marlin/configurator/config/Configuration.h @@ -234,6 +234,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index 27734b866..7025e87bb 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -197,7 +197,7 @@ static void lcd_implementation_status_screen() { u8g.drawBox(55, 50, (unsigned int)(71.f * card.percentDone() / 100.f), 2); } - u8g.setPrintPos(80,47); + u8g.setPrintPos(80,48); if (starttime != 0) { uint16_t time = (millis() - starttime) / 60000; u8g.print(itostr2(time/60)); @@ -231,26 +231,27 @@ static void lcd_implementation_status_screen() { } // X, Y, Z-Coordinates + #define XYZ_BASELINE 38 u8g.setFont(FONT_STATUSMENU); - u8g.drawBox(0,29,128,10); + u8g.drawBox(0,30,128,9); u8g.setColorIndex(0); // white on black - u8g.setPrintPos(2,37); + u8g.setPrintPos(2,XYZ_BASELINE); u8g.print('X'); - u8g.drawPixel(8,33); - u8g.drawPixel(8,35); - u8g.setPrintPos(10,37); + u8g.drawPixel(8,XYZ_BASELINE - 5); + u8g.drawPixel(8,XYZ_BASELINE - 3); + u8g.setPrintPos(10,XYZ_BASELINE); u8g.print(ftostr31ns(current_position[X_AXIS])); - u8g.setPrintPos(43,37); - lcd_printPGM(PSTR("Y")); - u8g.drawPixel(49,33); - u8g.drawPixel(49,35); - u8g.setPrintPos(51,37); + u8g.setPrintPos(43,XYZ_BASELINE); + u8g.print('Y'); + u8g.drawPixel(49,XYZ_BASELINE - 5); + u8g.drawPixel(49,XYZ_BASELINE - 3); + u8g.setPrintPos(51,XYZ_BASELINE); u8g.print(ftostr31ns(current_position[Y_AXIS])); - u8g.setPrintPos(83,37); + u8g.setPrintPos(83,XYZ_BASELINE); u8g.print('Z'); - u8g.drawPixel(89,33); - u8g.drawPixel(89,35); - u8g.setPrintPos(91,37); + u8g.drawPixel(89,XYZ_BASELINE - 5); + u8g.drawPixel(89,XYZ_BASELINE - 3); + u8g.setPrintPos(91,XYZ_BASELINE); u8g.print(ftostr31(current_position[Z_AXIS])); u8g.setColorIndex(1); // black on white @@ -259,13 +260,13 @@ static void lcd_implementation_status_screen() { u8g.setPrintPos(3,49); u8g.print(LCD_STR_FEEDRATE[0]); u8g.setFont(FONT_STATUSMENU); - u8g.setPrintPos(12,48); + u8g.setPrintPos(12,49); u8g.print(itostr3(feedmultiply)); u8g.print('%'); // Status line u8g.setFont(FONT_STATUSMENU); - u8g.setPrintPos(0,61); + u8g.setPrintPos(0,63); #ifndef FILAMENT_LCD_DISPLAY u8g.print(lcd_status_message); #else diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index ebd49f81b..980875caa 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -215,6 +215,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED // Felix Foil Heater #define DEFAULT_bedKp 103.37 diff --git a/Marlin/example_configurations/Felix/Configuration_DUAL.h b/Marlin/example_configurations/Felix/Configuration_DUAL.h index 5e990df03..bc3120302 100644 --- a/Marlin/example_configurations/Felix/Configuration_DUAL.h +++ b/Marlin/example_configurations/Felix/Configuration_DUAL.h @@ -215,6 +215,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED // Felix Foil Heater #define DEFAULT_bedKp 103.37 diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 2220f7511..090d0b047 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -231,6 +231,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 9400e4e49..f5c32705c 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -230,6 +230,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 7aafbf61d..7c14b78ad 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -254,6 +254,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 9654fa00d..88eaa884b 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -230,6 +230,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index e3c543b14..bc61694ed 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -258,6 +258,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index 5874d0475..c9471bdcf 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -259,6 +259,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 83a5152d0..5142d339d 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -228,6 +228,8 @@ Here are some standard links for getting your machine calibrated: // to increase the heat up rate. However, if changed, user must be aware of the safety concerns // of drawing too much current from the power supply. +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 09944999c..c52166677 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -230,6 +230,8 @@ Here are some standard links for getting your machine calibrated: // so you shouldn't use it unless you are OK with PWM on your bed. (see the comment on enabling PIDTEMPBED) #define MAX_BED_POWER 255 // limits duty cycle to bed; 255=full current +//#define PID_BED_DEBUG // Sends debug data to the serial port. + #ifdef PIDTEMPBED //120v 250W silicone heater into 4mm borosilicate (MendelMax 1.5+) //from FOPDT model - kp=.39 Tp=405 Tdead=66, Tc set to 79.2, aggressive factor of .15 (vs .1, 1, 10) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index c5ec723d9..24a2dc31c 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -551,6 +551,21 @@ float get_pid_output(int e) { pid_output = constrain(target_temperature_bed, 0, MAX_BED_POWER); #endif // PID_OPENLOOP + #ifdef PID_BED_DEBUG + SERIAL_ECHO_START; + SERIAL_ECHO(" PID_BED_DEBUG "); + SERIAL_ECHO(": Input "); + SERIAL_ECHO(current_temperature_bed); + SERIAL_ECHO(" Output "); + SERIAL_ECHO(pid_output); + SERIAL_ECHO(" pTerm "); + SERIAL_ECHO(pTerm_bed); + SERIAL_ECHO(" iTerm "); + SERIAL_ECHO(iTerm_bed); + SERIAL_ECHO(" dTerm "); + SERIAL_ECHOLN(dTerm_bed); + #endif //PID_BED_DEBUG + return pid_output; } #endif