ExtUI calls, gcode edit, edit menus etc

This commit is contained in:
InsanityAutomation
2024-03-11 16:35:33 -04:00
parent b10f7181e0
commit d2373b847a
7 changed files with 33 additions and 3 deletions
+5
View File
@@ -37,6 +37,7 @@
* S<material>
* H<hotend temp>
* B<bed temp>
* C<chamber temp>
* F<fan speed>
*/
void GcodeSuite::M145() {
@@ -53,6 +54,10 @@ void GcodeSuite::M145() {
if (parser.seenval('B'))
mat.bed_temp = constrain(parser.value_int(), BED_MINTEMP, BED_MAX_TARGET);
#endif
#if HAS_HEATED_CHAMBER
if (parser.seenval('C'))
mat.chamber_temp = constrain(parser.value_int(), CHAMBER_MINTEMP, CHAMBER_MAX_TARGET);
#endif
#if HAS_FAN
if (parser.seenval('F'))
mat.fan_speed = constrain(parser.value_int(), 0, 255);
+8 -1
View File
@@ -39,9 +39,16 @@
*/
void GcodeSuite::M141() {
if (DEBUGGING(DRYRUN)) return;
// Accept 'I' if temperature presets are defined
#if HAS_PREHEAT
if (parser.seenval('I')) {
const uint8_t index = parser.value_byte();
thermalManager.setTargetChamber(ui.material_preset[_MIN(index, PREHEAT_COUNT - 1)].chamber_temp);
return;
}
#endif
if (parser.seenval('S')) {
thermalManager.setTargetChamber(parser.value_celsius());
#if ENABLED(PRINTJOB_TIMER_AUTOSTART)
/**
* Stop the timer at the end of print. Hotend, bed target, and chamber
+3
View File
@@ -790,6 +790,9 @@ namespace ExtUI {
#if HAS_HEATED_BED
uint16_t getMaterial_preset_B(const uint16_t index) { return ui.material_preset[index].bed_temp; }
#endif
#if HAS_HEATED_CHAMBER
uint16_t getMaterial_preset_C(const uint16_t index) { return ui.material_preset[index].chamber_temp; }
#endif
#endif
feedRate_t getFeedrate_mm_s() { return feedrate_mm_s; }
+3
View File
@@ -188,6 +188,9 @@ namespace ExtUI {
#if HAS_HEATED_BED
uint16_t getMaterial_preset_B(const uint16_t);
#endif
#if HAS_HEATED_CHAMBER
uint16_t getMaterial_preset_C(const uint16_t);
#endif
#endif
// IDEX Machine Mode
+1
View File
@@ -132,6 +132,7 @@ namespace LanguageNarrow_en {
LSTR MSG_PREHEAT_M_END_E = _UxGT("Preheat $ End ~");
LSTR MSG_PREHEAT_M_ALL = _UxGT("Preheat $ All");
LSTR MSG_PREHEAT_M_BEDONLY = _UxGT("Preheat $ Bed");
LSTR MSG_PREHEAT_M_CHAMBER = _UxGT("Preheat $ Chmb");
LSTR MSG_PREHEAT_M_SETTINGS = _UxGT("Preheat $ Conf");
LSTR MSG_PREHEAT_HOTEND = _UxGT("Preheat Hotend");
@@ -418,6 +418,9 @@ void menu_advanced_settings();
#if HAS_HEATED_BED
EDIT_ITEM(int3, MSG_BED, &ui.material_preset[m].bed_temp, BED_MINTEMP, BED_MAX_TARGET);
#endif
#if HAS_HEATED_CHAMBER
EDIT_ITEM(int3, MSG_CHAMBER, &ui.material_preset[m].chamber_temp, CHAMBER_MINTEMP, CHAMBER_MAX_TARGET);
#endif
#if ENABLED(EEPROM_SETTINGS)
ACTION_ITEM(MSG_STORE_EEPROM, ui.store_settings);
#endif
+10 -2
View File
@@ -55,7 +55,8 @@
if (indb >= 0 && ui.material_preset[indb].bed_temp > 0) setTargetBed(ui.material_preset[indb].bed_temp);
#endif
#if HAS_HEATED_CHAMBER
if (indb >= 0 && ui.material_preset[indb].chamber_temp > 0) setTargetChamber(ui.material_preset[indb].chamber_temp);
if ((indb >= 0 && ui.material_preset[indb].chamber_temp > 0) && (indh >= 0 && ui.material_preset[indh].hotend_temp > 0)) // Preheat all selected
setTargetChamber(ui.material_preset[indb].chamber_temp);
#endif
#if HAS_FAN
if (indh >= 0) {
@@ -77,6 +78,9 @@
#if HAS_HEATED_BED
inline void _preheat_bed(const uint8_t m) { thermalManager.lcd_preheat(0, -1, m); }
#endif
#if HAS_HEATED_CHAMBER
inline void _preheat_chamber(const uint8_t m) { thermalManager.setTargetChamber(ui.material_preset[m].chamber_temp); }
#endif
#if HAS_COOLER
inline void _precool_laser(const uint8_t m, const uint8_t e) { thermalManager.lcd_preheat(e, m, -1); }
void do_precool_laser_m() { _precool_laser(editable.int8, thermalManager.temp_cooler.target); }
@@ -110,7 +114,7 @@
#if HOTENDS == 1
#if HAS_HEATED_BED
#if HAS_HEATED_BED || HAS_HEATED_CHAMBER
ACTION_ITEM_f(ui.get_preheat_label(m), MSG_PREHEAT_M, []{ _preheat_both(editable.int8, 0); });
ACTION_ITEM_f(ui.get_preheat_label(m), MSG_PREHEAT_M_END, do_preheat_end_m);
#else
@@ -132,6 +136,10 @@
ACTION_ITEM_f(ui.get_preheat_label(m), MSG_PREHEAT_M_BEDONLY, []{ _preheat_bed(editable.int8); });
#endif
#if HAS_HEATED_CHAMBER
ACTION_ITEM_f(ui.get_preheat_label(m), MSG_PREHEAT_M_CHAMBER, []{ _preheat_chamber(editable.int8); });
#endif
END_MENU();
}