Encapsulate common display code in a singleton (#12395)
* Encapsulate common LCD code in a singleton * Depend more UBL code on UBL_DEVEL_DEBUGGING - Since most users don't need the debugging on at all times, this helps reduce the default build size for UBL by over 2K, a little closer to fitting on 128K boards.
This commit is contained in:
parent
9da6809ac3
commit
a0c795b097
65 changed files with 1881 additions and 1997 deletions
|
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
void GcodeSuite::M145() {
|
||||
const uint8_t material = (uint8_t)parser.intval('S');
|
||||
if (material >= COUNT(lcd_preheat_hotend_temp)) {
|
||||
if (material >= COUNT(ui.preheat_hotend_temp)) {
|
||||
SERIAL_ERROR_START();
|
||||
SERIAL_ERRORLNPGM(MSG_ERR_MATERIAL_INDEX);
|
||||
}
|
||||
|
|
@ -45,16 +45,16 @@ void GcodeSuite::M145() {
|
|||
int v;
|
||||
if (parser.seenval('H')) {
|
||||
v = parser.value_int();
|
||||
lcd_preheat_hotend_temp[material] = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
|
||||
ui.preheat_hotend_temp[material] = constrain(v, EXTRUDE_MINTEMP, HEATER_0_MAXTEMP - 15);
|
||||
}
|
||||
if (parser.seenval('F')) {
|
||||
v = parser.value_int();
|
||||
lcd_preheat_fan_speed[material] = (uint8_t)constrain(v, 0, 255);
|
||||
ui.preheat_fan_speed[material] = (uint8_t)constrain(v, 0, 255);
|
||||
}
|
||||
#if TEMP_SENSOR_BED != 0
|
||||
if (parser.seenval('B')) {
|
||||
v = parser.value_int();
|
||||
lcd_preheat_bed_temp[material] = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15);
|
||||
ui.preheat_bed_temp[material] = constrain(v, BED_MINTEMP, BED_MAXTEMP - 15);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue