Move M250 to cpp

This commit is contained in:
Scott Lahteine 2017-09-17 03:23:20 -05:00
parent ebb9bd5419
commit 8584f7e390
3 changed files with 12 additions and 10 deletions

View file

@ -352,10 +352,6 @@ bool pin_is_protected(const int8_t pin) {
return false; return false;
} }
#if HAS_LCD_CONTRAST
#include "gcode/lcd/M250.h"
#endif
#if ENABLED(PREVENT_COLD_EXTRUSION) #if ENABLED(PREVENT_COLD_EXTRUSION)
#include "gcode/config/M302.h" #include "gcode/config/M302.h"
#endif #endif

View file

@ -119,7 +119,6 @@ void GcodeSuite::dwell(millis_t time) {
extern void gcode_M163(); extern void gcode_M163();
extern void gcode_M164(); extern void gcode_M164();
extern void gcode_M165(); extern void gcode_M165();
extern void gcode_M250();
extern void gcode_M302(); extern void gcode_M302();
extern void gcode_M350(); extern void gcode_M350();
extern void gcode_M351(); extern void gcode_M351();
@ -579,10 +578,8 @@ void GcodeSuite::process_next_command() {
#endif #endif
#if HAS_LCD_CONTRAST #if HAS_LCD_CONTRAST
case 250: // M250: Set LCD contrast case 250: M250(); break; // M250: Set LCD contrast
gcode_M250(); #endif
break;
#endif // HAS_LCD_CONTRAST
#if ENABLED(EXPERIMENTAL_I2CBUS) #if ENABLED(EXPERIMENTAL_I2CBUS)
case 260: M260(); break; // M260: Send data to an i2c slave case 260: M260(); break; // M260: Send data to an i2c slave

View file

@ -20,12 +20,21 @@
* *
*/ */
#include "../../inc/MarlinConfig.h"
#if HAS_LCD_CONTRAST
#include "../gcode.h"
#include "../../lcd/ultralcd.h"
/** /**
* M250: Read and optionally set the LCD contrast * M250: Read and optionally set the LCD contrast
*/ */
void gcode_M250() { void GcodeSuite::M250() {
if (parser.seen('C')) set_lcd_contrast(parser.value_int()); if (parser.seen('C')) set_lcd_contrast(parser.value_int());
SERIAL_PROTOCOLPGM("lcd contrast value: "); SERIAL_PROTOCOLPGM("lcd contrast value: ");
SERIAL_PROTOCOL(lcd_contrast); SERIAL_PROTOCOL(lcd_contrast);
SERIAL_EOL(); SERIAL_EOL();
} }
#endif // HAS_LCD_CONTRAST