Move M145 to cpp

This commit is contained in:
Scott Lahteine 2017-09-16 23:11:35 -05:00
parent b464887ea1
commit cbf40f7ee9
3 changed files with 11 additions and 11 deletions

View file

@ -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

View file

@ -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)

View file

@ -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