Move M145 to cpp

2.0.x
Scott Lahteine 7 years ago
parent b464887ea1
commit cbf40f7ee9

@ -369,10 +369,6 @@ bool pin_is_protected(const int8_t pin) {
return false;
}
#if ENABLED(ULTIPANEL)
#include "gcode/lcd/M145.h"
#endif
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
#include "gcode/units/M149.h"
#endif

@ -131,7 +131,6 @@ extern void gcode_M118();
extern void gcode_M119();
extern void gcode_M120();
extern void gcode_M121();
extern void gcode_M145();
extern void gcode_M149();
extern void gcode_M150();
extern void gcode_M163();
@ -544,11 +543,7 @@ void GcodeSuite::process_next_command() {
break;
#if ENABLED(ULTIPANEL)
case 145: // M145: Set material heatup parameters
gcode_M145();
break;
case 145: M145(); break; // M145: Set material heatup parameters
#endif
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)

@ -20,6 +20,13 @@
*
*/
#include "../../inc/MarlinConfig.h"
#if ENABLED(ULTIPANEL)
#include "../gcode.h"
#include "../../lcd/ultralcd.h"
/**
* M145: Set the heatup state for a material in the LCD menu
*
@ -28,7 +35,7 @@
* B<bed temp>
* F<fan speed>
*/
void gcode_M145() {
void GcodeSuite::M145() {
const uint8_t material = (uint8_t)parser.intval('S');
if (material >= COUNT(lcd_preheat_hotend_temp)) {
SERIAL_ERROR_START();
@ -52,3 +59,5 @@ void gcode_M145() {
#endif
}
}
#endif // ULTIPANEL
Loading…
Cancel
Save