Skip to content

Commit 1387145

Browse files
committed
Restore original M250.cpp
1 parent dc64a33 commit 1387145

File tree

1 file changed

+4
-33
lines changed

1 file changed

+4
-33
lines changed

Marlin/src/gcode/lcd/M250.cpp

+4-33
Original file line numberDiff line numberDiff line change
@@ -22,46 +22,17 @@
2222

2323
#include "../../inc/MarlinConfig.h"
2424

25-
#if HAS_LCD_CONTRAST || TFT_HAS_COLOR
25+
#if HAS_LCD_CONTRAST
2626

2727
#include "../gcode.h"
2828
#include "../../lcd/ultralcd.h"
29-
#include "../../lcd/dogm/ultralcd_DOGM.h"
3029

3130
/**
3231
* M250: Read and optionally set the LCD contrast
3332
*/
3433
void GcodeSuite::M250() {
35-
36-
#if HAS_LCD_CONTRAST
37-
if (parser.seen('C')) ui.set_contrast(parser.value_int());
38-
SERIAL_ECHOLNPAIR("LCD Contrast: ", ui.contrast);
39-
#endif // HAS_LCD_CONTRAST
40-
41-
//
42-
// Warning this component is still pretty stupid
43-
//
44-
45-
#if TFT_HAS_COLOR
46-
if (parser.seen('B'))
47-
{
48-
bg_color = parser.value_ushort();
49-
SERIAL_ECHOLNPAIR("TFT Background Color: ", bg_color);
50-
}
51-
52-
if (parser.seen('F'))
53-
{
54-
ui_color = parser.value_ushort();
55-
SERIAL_ECHOLNPAIR("TFT Foreground Color: ", ui_color);
56-
}
57-
58-
if (parser.seen('P'))
59-
{
60-
switchColorPreset(parser.value_byte());
61-
SERIAL_ECHOLN("Switched Color Preset: ");
62-
}
63-
#endif // TFT_HAS_COLOR
64-
34+
if (parser.seen('C')) ui.set_contrast(parser.value_int());
35+
SERIAL_ECHOLNPAIR("LCD Contrast: ", ui.contrast);
6536
}
6637

67-
#endif // HAS_LCD_CONTRAST || TFT_HAS_COLOR
38+
#endif // HAS_LCD_CONTRAST

0 commit comments

Comments
 (0)