Improved LCD contrast handling

Based on MarlinFirmware/MarlinDev#200 from @eboston
This commit is contained in:
Scott Lahteine
2016-06-02 14:34:51 -07:00
parent b703fa9538
commit efa7209acf
4 changed files with 26 additions and 19 deletions

View File

@ -5636,7 +5636,7 @@ inline void gcode_M226() {
* M250: Read and optionally set the LCD contrast
*/
inline void gcode_M250() {
if (code_seen('C')) lcd_setcontrast(code_value_short() & 0x3F);
if (code_seen('C')) set_lcd_contrast(code_value_short());
SERIAL_PROTOCOLPGM("lcd contrast value: ");
SERIAL_PROTOCOL(lcd_contrast);
SERIAL_EOL;