Move M149 to cpp

This commit is contained in:
Scott Lahteine 2017-09-16 23:15:33 -05:00
parent cbf40f7ee9
commit 0c7ba52451
3 changed files with 10 additions and 9 deletions

View file

@ -369,10 +369,6 @@ bool pin_is_protected(const int8_t pin) {
return false;
}
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
#include "gcode/units/M149.h"
#endif
#if HAS_POWER_SWITCH
#include "gcode/control/M80.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_M149();
extern void gcode_M150();
extern void gcode_M163();
extern void gcode_M164();
@ -547,9 +546,7 @@ void GcodeSuite::process_next_command() {
#endif
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
case 149: // M149: Set temperature units
gcode_M149();
break;
case 149: M149(); break; // M149: Set temperature units
#endif
#if HAS_COLOR_LEDS

View file

@ -20,11 +20,19 @@
*
*/
#include "../../inc/MarlinConfig.h"
#if ENABLED(TEMPERATURE_UNITS_SUPPORT)
#include "../gcode.h"
/**
* M149: Set temperature units
*/
void gcode_M149() {
void GcodeSuite::M149() {
if (parser.seenval('C')) parser.set_input_temp_units(TEMPUNIT_C);
else if (parser.seenval('K')) parser.set_input_temp_units(TEMPUNIT_K);
else if (parser.seenval('F')) parser.set_input_temp_units(TEMPUNIT_F);
}
#endif // TEMPERATURE_UNITS_SUPPORT