Catchup to head
This commit is contained in:
@@ -82,12 +82,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(PROBING_HEATERS_OFF)
|
||||
#include "../../../module/temperature.h"
|
||||
#include "../../../module/printcounter.h"
|
||||
#endif
|
||||
|
||||
|
||||
#define G29_RETURN(b) return TERN_(G29_RETRY_AND_RECOVER, b)
|
||||
|
||||
// For manual probing values persist over multiple G29
|
||||
|
||||
@@ -90,7 +90,6 @@ void GcodeSuite::G29() {
|
||||
queue.inject_P(parser.seen_test('N') ? PSTR("G28" TERN(CAN_SET_LEVELING_AFTER_G28, "L0", "") "\nG29S2") : PSTR("G29S2"));
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
|
||||
return;
|
||||
TERN_(EXTENSIBLE_UI, ExtUI::onMeshLevelingStart());
|
||||
}
|
||||
state = MeshNext;
|
||||
|
||||
|
||||
@@ -195,9 +195,9 @@
|
||||
* None Home to all axes with no parameters.
|
||||
* With QUICK_HOME enabled XY will home together, then Z.
|
||||
*
|
||||
* O Home only if position is unknown
|
||||
*
|
||||
* Rn Raise by n mm/inches before homing
|
||||
* L<bool> Force leveling state ON (if possible) or OFF after homing (Requires RESTORE_LEVELING_AFTER_G28 or ENABLE_LEVELING_AFTER_G28)
|
||||
* O Home only if the position is not known and trusted
|
||||
* R<linear> Raise by n mm/inches before homing
|
||||
*
|
||||
* Cartesian/SCARA parameters
|
||||
*
|
||||
@@ -229,7 +229,7 @@ void GcodeSuite::G28() {
|
||||
#endif
|
||||
|
||||
// Home (O)nly if position is unknown
|
||||
if (!axes_should_home() && parser.boolval('O')) {
|
||||
if (!axes_should_home() && parser.seen_test('O')) {
|
||||
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("> homing not needed, skip");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(COOLANT_CONTROL)
|
||||
#if ANY(COOLANT_MIST, COOLANT_FLOOD, AIR_ASSIST)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/planner.h"
|
||||
@@ -37,51 +37,41 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ENABLED(COOLANT_FLOOD)
|
||||
#if EITHER(COOLANT_FLOOD, AIR_ASSIST)
|
||||
|
||||
#if ENABLED(AIR_ASSIST)
|
||||
#include "../../feature/spindle_laser.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M8: Flood Coolant On
|
||||
* M8: Flood Coolant / Air Assist ON
|
||||
*/
|
||||
void GcodeSuite::M8() {
|
||||
planner.synchronize(); // Wait for move to arrive
|
||||
WRITE(COOLANT_FLOOD_PIN, !(COOLANT_FLOOD_INVERT)); // Turn on Flood coolant
|
||||
planner.synchronize(); // Wait for move to arrive
|
||||
#if ENABLED(COOLANT_FLOOD)
|
||||
WRITE(COOLANT_FLOOD_PIN, !(COOLANT_FLOOD_INVERT)); // Turn on Flood coolant
|
||||
#endif
|
||||
#if ENABLED(AIR_ASSIST)
|
||||
cutter.air_assist_enable(); // Turn on Air Assist
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* M9: Coolant OFF
|
||||
* M9: Coolant / Air Assist OFF
|
||||
*/
|
||||
void GcodeSuite::M9() {
|
||||
planner.synchronize(); // Wait for move to arrive
|
||||
planner.synchronize(); // Wait for move to arrive
|
||||
#if ENABLED(COOLANT_MIST)
|
||||
WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT); // Turn off Mist coolant
|
||||
WRITE(COOLANT_MIST_PIN, COOLANT_MIST_INVERT); // Turn off Mist coolant
|
||||
#endif
|
||||
#if ENABLED(COOLANT_FLOOD)
|
||||
WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Turn off Flood coolant
|
||||
WRITE(COOLANT_FLOOD_PIN, COOLANT_FLOOD_INVERT); // Turn off Flood coolant
|
||||
#endif
|
||||
#if ENABLED(AIR_ASSIST)
|
||||
cutter.air_assist_disable(); // Turn off Air Assist
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // COOLANT_CONTROL
|
||||
|
||||
#if ENABLED(AIR_ASSIST)
|
||||
|
||||
#include "../gcode.h"
|
||||
#include "../../module/planner.h"
|
||||
#include "../../feature/spindle_laser.h"
|
||||
|
||||
/**
|
||||
* M8: Air Assist On
|
||||
*/
|
||||
void GcodeSuite::M8() {
|
||||
planner.synchronize();
|
||||
cutter.air_assist_enable(); // Turn on Air Assist pin
|
||||
}
|
||||
|
||||
/**
|
||||
* M9: Air Assist Off
|
||||
*/
|
||||
void GcodeSuite::M9() {
|
||||
planner.synchronize();
|
||||
cutter.air_assist_disable(); // Turn off Air Assist pin
|
||||
}
|
||||
|
||||
#endif // AIR_ASSIST
|
||||
#endif // COOLANT_MIST | COOLANT_FLOOD | AIR_ASSIST
|
||||
|
||||
@@ -67,8 +67,10 @@ void GcodeSuite::M907() {
|
||||
LOOP_LOGICAL_AXES(i) if (parser.seenval(axis_codes[i])) digipot_i2c.set_current(i, parser.value_float());
|
||||
// Additional extruders use B,C,D for channels 4,5,6.
|
||||
// TODO: Change these parameters because 'E' is used. B<index>?
|
||||
for (uint8_t i = E_AXIS + 1; i < DIGIPOT_I2C_NUM_CHANNELS; i++)
|
||||
if (parser.seenval('B' + i - (E_AXIS + 1))) digipot_i2c.set_current(i, parser.value_float());
|
||||
#if HAS_EXTRUDERS
|
||||
for (uint8_t i = E_AXIS + 1; i < DIGIPOT_I2C_NUM_CHANNELS; i++)
|
||||
if (parser.seenval('B' + i - (E_AXIS + 1))) digipot_i2c.set_current(i, parser.value_float());
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(HAS_MOTOR_CURRENT_DAC)
|
||||
|
||||
@@ -54,10 +54,15 @@ void GcodeSuite::M412() {
|
||||
else {
|
||||
SERIAL_ECHO_START();
|
||||
SERIAL_ECHOPGM("Filament runout ");
|
||||
serialprintln_onoff(runout.enabled);
|
||||
serialprint_onoff(runout.enabled);
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
SERIAL_ECHOLNPAIR("Filament runout distance (mm): ", runout.runout_distance());
|
||||
SERIAL_ECHOPAIR(" ; Distance ", runout.runout_distance(), "mm");
|
||||
#endif
|
||||
#if ENABLED(HOST_ACTION_COMMANDS)
|
||||
SERIAL_ECHOPGM(" ; Host handling ");
|
||||
serialprint_onoff(runout.host_handling);
|
||||
#endif
|
||||
SERIAL_EOL();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+15
-12
@@ -441,20 +441,23 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
|
||||
case 3: M3_M4(false); break; // M3: Turn ON Laser | Spindle (clockwise), set Power | Speed
|
||||
case 4: M3_M4(true ); break; // M4: Turn ON Laser | Spindle (counter-clockwise), set Power | Speed
|
||||
case 5: M5(); break; // M5: Turn OFF Laser | Spindle
|
||||
#if ENABLED(AIR_EVACUATION)
|
||||
case 10: M10(); break; // M10: Vacuum or Blower motor ON
|
||||
case 11: M11(); break; // M11: Vacuum or Blower motor OFF
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(COOLANT_CONTROL)
|
||||
#if ENABLED(COOLANT_MIST)
|
||||
case 7: M7(); break; // M7: Mist coolant ON
|
||||
#endif
|
||||
#if ENABLED(COOLANT_FLOOD)
|
||||
case 8: M8(); break; // M8: Flood coolant ON
|
||||
#endif
|
||||
case 9: M9(); break; // M9: Coolant OFF
|
||||
#if ENABLED(COOLANT_MIST)
|
||||
case 7: M7(); break; // M7: Coolant Mist ON
|
||||
#endif
|
||||
|
||||
#if EITHER(AIR_ASSIST, COOLANT_FLOOD)
|
||||
case 8: M8(); break; // M8: Air Assist / Coolant Flood ON
|
||||
#endif
|
||||
|
||||
#if EITHER(AIR_ASSIST, COOLANT_CONTROL)
|
||||
case 9: M9(); break; // M9: Air Assist / Coolant OFF
|
||||
#endif
|
||||
|
||||
#if ENABLED(AIR_EVACUATION)
|
||||
case 10: M10(); break; // M10: Vacuum or Blower motor ON
|
||||
case 11: M11(); break; // M11: Vacuum or Blower motor OFF
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
|
||||
|
||||
+15
-11
@@ -424,6 +424,7 @@ public:
|
||||
static uint8_t host_keepalive_interval;
|
||||
|
||||
static void host_keepalive();
|
||||
static inline bool host_keepalive_is_paused() { return busy_state >= PAUSED_FOR_USER; }
|
||||
|
||||
#define KEEPALIVE_STATE(N) REMEMBER(_KA_, gcode.busy_state, gcode.N)
|
||||
#else
|
||||
@@ -564,22 +565,25 @@ private:
|
||||
#if HAS_CUTTER
|
||||
static void M3_M4(const bool is_M4);
|
||||
static void M5();
|
||||
#if ENABLED(AIR_EVACUATION)
|
||||
static void M10();
|
||||
static void M11();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if ENABLED(COOLANT_CONTROL)
|
||||
#if ENABLED(COOLANT_MIST)
|
||||
static void M7();
|
||||
#endif
|
||||
#if ENABLED(COOLANT_FLOOD)
|
||||
static void M8();
|
||||
#endif
|
||||
#if ENABLED(COOLANT_MIST)
|
||||
static void M7();
|
||||
#endif
|
||||
|
||||
#if EITHER(AIR_ASSIST, COOLANT_FLOOD)
|
||||
static void M8();
|
||||
#endif
|
||||
|
||||
#if EITHER(AIR_ASSIST, COOLANT_CONTROL)
|
||||
static void M9();
|
||||
#endif
|
||||
|
||||
#if ENABLED(AIR_EVACUATION)
|
||||
static void M10();
|
||||
static void M11();
|
||||
#endif
|
||||
|
||||
#if ENABLED(EXTERNAL_CLOSED_LOOP_CONTROLLER)
|
||||
static void M12();
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
* version was tagged.
|
||||
*/
|
||||
#ifndef STRING_DISTRIBUTION_DATE
|
||||
#define STRING_DISTRIBUTION_DATE "2021-06-16"
|
||||
#define STRING_DISTRIBUTION_DATE "2021-06-18"
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -148,13 +148,11 @@ void BedMeshBase::_drawMesh(CommandProcessor &cmd, int16_t x, int16_t y, int16_t
|
||||
else
|
||||
b = val_dev / sq_max;
|
||||
}
|
||||
cmd.cmd(COLOR_RGB(
|
||||
#ifdef BED_MESH_POINTS_GRAY
|
||||
0x7F * (1.0f - b + r), 0x7F * (1.0f - b - r), 0x7F * (1.0f - r + b)
|
||||
#else
|
||||
0xFF * (1.0f - b), 0xFF * (1.0f - b - r), 0xFF * (1.0f - r)
|
||||
#endif
|
||||
));
|
||||
#ifdef BED_MESH_POINTS_GRAY
|
||||
cmd.cmd(COLOR_RGB((1.0f - b + r) * 0x7F, (1.0f - b - r) * 0x7F, (1.0f - r + b) * 0x7F));
|
||||
#else
|
||||
cmd.cmd(COLOR_RGB((1.0f - b) * 0xFF, (1.0f - b - r) * 0xFF, (1.0f - r) * 0xFF));
|
||||
#endif
|
||||
}
|
||||
cmd.cmd(VERTEX2F(TRANSFORM(x, y, HEIGHT(x, y))));
|
||||
}
|
||||
|
||||
@@ -60,45 +60,45 @@ static float meshGetter(uint8_t x, uint8_t y, void*) {
|
||||
xy_uint8_t pos;
|
||||
pos.x = x;
|
||||
pos.y = y;
|
||||
return getMeshPoint(pos) + (mydata.highlight.x != NONE && mydata.highlight == pos ? mydata.zAdjustment : 0);
|
||||
return ExtUI::getMeshPoint(pos) + (mydata.highlight.x != NONE && mydata.highlight == pos ? mydata.zAdjustment : 0);
|
||||
}
|
||||
|
||||
void BedMeshEditScreen::onEntry() {
|
||||
mydata.needSave = false;
|
||||
mydata.highlight.x = NONE;
|
||||
mydata.zAdjustment = 0;
|
||||
mydata.savedMeshLevelingState = getLevelingActive();
|
||||
mydata.savedEndstopState = getSoftEndstopState();
|
||||
mydata.savedMeshLevelingState = ExtUI::getLevelingActive();
|
||||
mydata.savedEndstopState = ExtUI::getSoftEndstopState();
|
||||
makeMeshValid();
|
||||
BaseScreen::onEntry();
|
||||
}
|
||||
|
||||
void BedMeshEditScreen::makeMeshValid() {
|
||||
bed_mesh_t &mesh = getMeshArray();
|
||||
bed_mesh_t &mesh = ExtUI::getMeshArray();
|
||||
GRID_LOOP(x, y) {
|
||||
if (isnan(mesh[x][y])) mesh[x][y] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void BedMeshEditScreen::onExit() {
|
||||
setLevelingActive(mydata.savedMeshLevelingState);
|
||||
setSoftEndstopState(mydata.savedEndstopState);
|
||||
ExtUI::setLevelingActive(mydata.savedMeshLevelingState);
|
||||
ExtUI::setSoftEndstopState(mydata.savedEndstopState);
|
||||
}
|
||||
|
||||
float BedMeshEditScreen::getHighlightedValue() {
|
||||
const float val = getMeshPoint(mydata.highlight);
|
||||
const float val = ExtUI::getMeshPoint(mydata.highlight);
|
||||
return (isnan(val) ? 0 : val) + mydata.zAdjustment;
|
||||
}
|
||||
|
||||
void BedMeshEditScreen::setHighlightedValue(float value) {
|
||||
setMeshPoint(mydata.highlight, value);
|
||||
ExtUI::setMeshPoint(mydata.highlight, value);
|
||||
}
|
||||
|
||||
void BedMeshEditScreen::moveToHighlightedValue() {
|
||||
if (getMeshValid()) {
|
||||
setLevelingActive(true);
|
||||
setSoftEndstopState(false);
|
||||
moveToMeshPoint(mydata.highlight, gaugeThickness + mydata.zAdjustment);
|
||||
if (ExtUI::getMeshValid()) {
|
||||
ExtUI::setLevelingActive(true);
|
||||
ExtUI::setSoftEndstopState(false);
|
||||
ExtUI::moveToMeshPoint(mydata.highlight, gaugeThickness + mydata.zAdjustment);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ bool BedMeshEditScreen::onTouchEnd(uint8_t tag) {
|
||||
|
||||
void BedMeshEditScreen::show() {
|
||||
// On entry, home if needed and save current mesh
|
||||
if (!isMachineHomed()) {
|
||||
if (!ExtUI::isMachineHomed()) {
|
||||
SpinnerDialogBox::enqueueAndWait_P(F("G28\nG29 S1"));
|
||||
// After the spinner, go to this screen.
|
||||
current_screen.forget();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#ifdef FTDI_LEVELING_MENU
|
||||
|
||||
#if ENABLED(BLTOUCH)
|
||||
#if BOTH(HAS_BED_PROBE,BLTOUCH)
|
||||
#include "../../../../feature/bltouch.h"
|
||||
#endif
|
||||
|
||||
@@ -132,3 +132,4 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) {
|
||||
}
|
||||
|
||||
#endif // FTDI_LEVELING_MENU
|
||||
|
||||
|
||||
@@ -34,53 +34,28 @@
|
||||
* Formats a temperature string (e.g. "100°C")
|
||||
*/
|
||||
void format_temp(char *str, const_celsius_float_t t1) {
|
||||
#ifdef TOUCH_UI_LCD_TEMP_PRECISION
|
||||
char num1[7];
|
||||
dtostrf(t1, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num1);
|
||||
sprintf_P(str, PSTR("%s" S_FMT), num1, GET_TEXT(MSG_UNITS_C));
|
||||
#else
|
||||
sprintf_P(str, PSTR("%3d" S_FMT), ROUND(t1), GET_TEXT(MSG_UNITS_C));
|
||||
#endif
|
||||
sprintf_P(str, PSTR("%3d" S_FMT), ROUND(t1), GET_TEXT(MSG_UNITS_C));
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats a temperature string for an idle heater (e.g. "100 °C / idle")
|
||||
*/
|
||||
void format_temp_and_idle(char *str, const_celsius_float_t t1) {
|
||||
#ifdef TOUCH_UI_LCD_TEMP_PRECISION
|
||||
char num1[7];
|
||||
dtostrf(t1, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num1);
|
||||
sprintf_P(str, PSTR("%s" S_FMT " / " S_FMT), num1, GET_TEXT(MSG_UNITS_C), GET_TEXT(MSG_IDLE));
|
||||
#else
|
||||
sprintf_P(str, PSTR("%3d" S_FMT " / " S_FMT), ROUND(t1), GET_TEXT(MSG_UNITS_C), GET_TEXT(MSG_IDLE));
|
||||
#endif
|
||||
sprintf_P(str, PSTR("%3d" S_FMT " / " S_FMT), ROUND(t1), GET_TEXT(MSG_UNITS_C), GET_TEXT(MSG_IDLE));
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats a temperature string for an active heater (e.g. "100 / 200°C")
|
||||
*/
|
||||
void format_temp_and_temp(char *str, const_celsius_float_t t1, const_celsius_float_t t2) {
|
||||
#ifdef TOUCH_UI_LCD_TEMP_PRECISION
|
||||
char num1[7], num2[7];
|
||||
dtostrf(t1, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num1);
|
||||
dtostrf(t2, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num2);
|
||||
sprintf_P(str, PSTR("%s / %s" S_FMT), num1, num2, GET_TEXT(MSG_UNITS_C));
|
||||
#else
|
||||
sprintf_P(str, PSTR("%3d / %3d" S_FMT), ROUND(t1), ROUND(t2), GET_TEXT(MSG_UNITS_C));
|
||||
#endif
|
||||
sprintf_P(str, PSTR("%3d / %3d" S_FMT), ROUND(t1), ROUND(t2), GET_TEXT(MSG_UNITS_C));
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats a temperature string for a material (e.g. "100°C (PLA)")
|
||||
*/
|
||||
void format_temp_and_material(char *str, const_celsius_float_t t1, const char *material) {
|
||||
#ifdef TOUCH_UI_LCD_TEMP_PRECISION
|
||||
char num1[7];
|
||||
dtostrf(t1, 4 + TOUCH_UI_LCD_TEMP_PRECISION, TOUCH_UI_LCD_TEMP_PRECISION, num1);
|
||||
sprintf_P(str, PSTR("%s" S_FMT " (" S_FMT ")"), num1, GET_TEXT(MSG_UNITS_C), material);
|
||||
#else
|
||||
sprintf_P(str, PSTR("%3d" S_FMT " (" S_FMT ")"), ROUND(t1), GET_TEXT(MSG_UNITS_C), material);
|
||||
#endif
|
||||
sprintf_P(str, PSTR("%3d" S_FMT " (" S_FMT ")"), ROUND(t1), GET_TEXT(MSG_UNITS_C), material);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,14 +36,9 @@ constexpr static ZOffsetScreenData &mydata = screen_data.ZOffsetScreen;
|
||||
|
||||
void ZOffsetScreen::onEntry() {
|
||||
mydata.z = SHEET_THICKNESS;
|
||||
mydata.softEndstopState = getSoftEndstopState();
|
||||
BaseNumericAdjustmentScreen::onEntry();
|
||||
}
|
||||
|
||||
void ZOffsetScreen::onExit() {
|
||||
setSoftEndstopState(mydata.softEndstopState);
|
||||
}
|
||||
|
||||
void ZOffsetScreen::onRedraw(draw_mode_t what) {
|
||||
widgets_t w(what);
|
||||
w.precision(2, BaseNumericAdjustmentScreen::DEFAULT_MIDRANGE).units(GET_TEXT_F(MSG_UNITS_MM));
|
||||
@@ -64,13 +59,12 @@ void ZOffsetScreen::move(float mm, int16_t steps) {
|
||||
setAxisPosition_mm(mydata.z, Z);
|
||||
}
|
||||
else {
|
||||
// Otherwise doing a manual adjustment, possibly during a print
|
||||
TERN_(BABYSTEPPING, babystepAxis_steps(steps, Z));
|
||||
// Otherwise doing a manual adjustment, possibly during a print.
|
||||
babystepAxis_steps(steps, Z);
|
||||
}
|
||||
}
|
||||
|
||||
void ZOffsetScreen::runWizard() {
|
||||
setSoftEndstopState(false);
|
||||
// Restore the default Z offset
|
||||
constexpr float offset[] = NOZZLE_TO_PROBE_OFFSET;
|
||||
setZOffset_mm(offset[Z_AXIS]);
|
||||
@@ -91,8 +85,8 @@ void ZOffsetScreen::runWizard() {
|
||||
}
|
||||
|
||||
bool ZOffsetScreen::onTouchHeld(uint8_t tag) {
|
||||
const int16_t steps = TERN(BABYSTEPPING, mmToWholeSteps(getIncrement(), Z), 0);
|
||||
const float increment = TERN(BABYSTEPPING, mmFromWholeSteps(steps, Z), getIncrement());
|
||||
const int16_t steps = mmToWholeSteps(getIncrement(), Z);
|
||||
const float increment = mmFromWholeSteps(steps, Z);
|
||||
switch (tag) {
|
||||
case 2: runWizard(); break;
|
||||
case 4: UI_DECREMENT(ZOffset_mm); move(-increment, -steps); break;
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
struct ZOffsetScreenData : public BaseNumericAdjustmentScreenData {
|
||||
float z;
|
||||
bool softEndstopState;
|
||||
};
|
||||
|
||||
class ZOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen<ZOFFSET_SCREEN_CACHE> {
|
||||
@@ -36,7 +35,6 @@ class ZOffsetScreen : public BaseNumericAdjustmentScreen, public CachedScreen<ZO
|
||||
static void runWizard();
|
||||
public:
|
||||
static void onEntry();
|
||||
static void onExit();
|
||||
static void onRedraw(draw_mode_t);
|
||||
static bool onTouchHeld(uint8_t tag);
|
||||
};
|
||||
|
||||
@@ -113,7 +113,6 @@ SCREEN_TABLE {
|
||||
DECL_SCREEN_IF_INCLUDED(COCOA_PREHEAT_MENU)
|
||||
DECL_SCREEN_IF_INCLUDED(COCOA_PREHEAT_SCREEN)
|
||||
DECL_SCREEN_IF_INCLUDED(COCOA_LOAD_CHOCOLATE_SCREEN)
|
||||
DECL_SCREEN_IF_INCLUDED(COCOA_LEVELING_MENU)
|
||||
DECL_SCREEN_IF_INCLUDED(COCOA_MOVE_XYZ_SCREEN)
|
||||
DECL_SCREEN_IF_INCLUDED(COCOA_MOVE_E_SCREEN)
|
||||
};
|
||||
|
||||
@@ -157,7 +157,6 @@ enum {
|
||||
#include "cocoa_press/load_chocolate.h"
|
||||
#include "cocoa_press/move_xyz_screen.h"
|
||||
#include "cocoa_press/move_e_screen.h"
|
||||
#include "cocoa_press/leveling_menu.h"
|
||||
|
||||
#else
|
||||
#include "generic/status_screen.h"
|
||||
@@ -207,9 +206,7 @@ enum {
|
||||
#endif
|
||||
|
||||
#if HAS_LEVELING
|
||||
#if DISABLED(TOUCH_UI_COCOA_PRESS)
|
||||
#include "generic/leveling_menu.h"
|
||||
#endif
|
||||
#include "generic/leveling_menu.h"
|
||||
#if HAS_BED_PROBE
|
||||
#include "generic/z_offset_screen.h"
|
||||
#endif
|
||||
|
||||
@@ -108,7 +108,6 @@ namespace Theme {
|
||||
|
||||
constexpr uint32_t bed_mesh_lines_rgb = accent_color_6;
|
||||
constexpr uint32_t bed_mesh_shadow_rgb = 0x444444;
|
||||
#define BED_MESH_POINTS_GRAY
|
||||
#else
|
||||
constexpr uint32_t theme_darkest = gray_color_1;
|
||||
constexpr uint32_t theme_dark = gray_color_2;
|
||||
|
||||
@@ -385,7 +385,8 @@ namespace ExtUI {
|
||||
return !thermalManager.tooColdToExtrude(extruder - E0);
|
||||
}
|
||||
|
||||
GcodeSuite::MarlinBusyState getMachineBusyState() { return TERN0(HOST_KEEPALIVE_FEATURE, GcodeSuite::busy_state); }
|
||||
GcodeSuite::MarlinBusyState getHostKeepaliveState() { return TERN0(HOST_KEEPALIVE_FEATURE, gcode.busy_state); }
|
||||
bool getHostKeepaliveIsPaused() { return TERN0(HOST_KEEPALIVE_FEATURE, gcode.host_keepalive_is_paused()); }
|
||||
|
||||
#if HAS_SOFTWARE_ENDSTOPS
|
||||
bool getSoftEndstopState() { return soft_endstop._enabled; }
|
||||
@@ -904,12 +905,6 @@ namespace ExtUI {
|
||||
|
||||
#endif // HAS_LEVELING
|
||||
|
||||
bool ui_cancel_operation;
|
||||
void ui_setUICancelOperation(const bool state) {
|
||||
ui_cancel_operation = state;
|
||||
}
|
||||
bool get_isUICanceled() { return ui_cancel_operation; }
|
||||
|
||||
#if ENABLED(HOST_PROMPT_SUPPORT)
|
||||
void setHostResponse(const uint8_t response) { host_response_handler(response); }
|
||||
#endif
|
||||
@@ -1035,13 +1030,13 @@ namespace ExtUI {
|
||||
TERN_(HAS_FAN, thermalManager.zero_fan_speeds());
|
||||
}
|
||||
|
||||
bool awaitingUserConfirm() { return (TERN0(HAS_RESUME_CONTINUE, wait_for_user) || getMachineBusyState() >= 3); }
|
||||
bool awaitingUserConfirm() {
|
||||
return TERN0(HAS_RESUME_CONTINUE, wait_for_user) || getHostKeepaliveIsPaused();
|
||||
}
|
||||
void setUserConfirmed() { TERN_(HAS_RESUME_CONTINUE, wait_for_user = false); }
|
||||
|
||||
#if M600_PURGE_MORE_RESUMABLE
|
||||
void setPauseMenuResponse(PauseMenuResponse response) {
|
||||
pause_menu_response = response;
|
||||
}
|
||||
void setPauseMenuResponse(PauseMenuResponse response) { pause_menu_response = response; }
|
||||
#endif
|
||||
|
||||
void printFile(const char *filename) {
|
||||
|
||||
@@ -82,7 +82,8 @@ namespace ExtUI {
|
||||
void injectCommands(char * const);
|
||||
bool commandsInQueue();
|
||||
|
||||
GcodeSuite::MarlinBusyState getMachineBusyState();
|
||||
GcodeSuite::MarlinBusyState getHostKeepaliveState();
|
||||
bool getHostKeepaliveIsPaused();
|
||||
|
||||
bool isHeaterIdle(const heater_t);
|
||||
bool isHeaterIdle(const extruder_t);
|
||||
@@ -193,8 +194,6 @@ namespace ExtUI {
|
||||
void setHostResponse(const uint8_t);
|
||||
#endif
|
||||
|
||||
void ui_setUICancelOperation(const bool);
|
||||
bool get_isUICanceled();
|
||||
inline void simulateUserClick() { ui.lcd_clicked = true; }
|
||||
|
||||
#if ENABLED(PRINTCOUNTER)
|
||||
@@ -221,10 +220,10 @@ namespace ExtUI {
|
||||
void setFeedrate_mm_s(const feedRate_t);
|
||||
void setMinFeedrate_mm_s(const feedRate_t);
|
||||
void setMinTravelFeedrate_mm_s(const feedRate_t);
|
||||
void setPrintingAcceleration_mm_s2(const_float_t );
|
||||
void setRetractAcceleration_mm_s2(const_float_t );
|
||||
void setTravelAcceleration_mm_s2(const_float_t );
|
||||
void setFeedrate_percent(const_float_t );
|
||||
void setPrintingAcceleration_mm_s2(const_float_t);
|
||||
void setRetractAcceleration_mm_s2(const_float_t);
|
||||
void setTravelAcceleration_mm_s2(const_float_t);
|
||||
void setFeedrate_percent(const_float_t);
|
||||
void setFlow_percent(const int16_t, const extruder_t);
|
||||
bool awaitingUserConfirm();
|
||||
void setUserConfirmed();
|
||||
@@ -240,7 +239,7 @@ namespace ExtUI {
|
||||
|
||||
#if HAS_JUNCTION_DEVIATION
|
||||
float getJunctionDeviation_mm();
|
||||
void setJunctionDeviation_mm(const_float_t );
|
||||
void setJunctionDeviation_mm(const_float_t);
|
||||
#else
|
||||
float getAxisMaxJerk_mm_s(const axis_t);
|
||||
float getAxisMaxJerk_mm_s(const extruder_t);
|
||||
@@ -267,7 +266,7 @@ namespace ExtUI {
|
||||
#endif
|
||||
|
||||
float getZOffset_mm();
|
||||
void setZOffset_mm(const_float_t );
|
||||
void setZOffset_mm(const_float_t);
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
float getProbeOffset_mm(const axis_t);
|
||||
@@ -279,11 +278,11 @@ namespace ExtUI {
|
||||
void setAxisBacklash_mm(const_float_t, const axis_t);
|
||||
|
||||
float getBacklashCorrection_percent();
|
||||
void setBacklashCorrection_percent(const_float_t );
|
||||
void setBacklashCorrection_percent(const_float_t);
|
||||
|
||||
#ifdef BACKLASH_SMOOTHING_MM
|
||||
float getBacklashSmoothing_mm();
|
||||
void setBacklashSmoothing_mm(const_float_t );
|
||||
void setBacklashSmoothing_mm(const_float_t);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -295,7 +294,7 @@ namespace ExtUI {
|
||||
|
||||
#if HAS_FILAMENT_RUNOUT_DISTANCE
|
||||
float getFilamentRunoutDistance_mm();
|
||||
void setFilamentRunoutDistance_mm(const_float_t );
|
||||
void setFilamentRunoutDistance_mm(const_float_t);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -305,7 +304,7 @@ namespace ExtUI {
|
||||
|
||||
#if DISABLED(CASE_LIGHT_NO_BRIGHTNESS)
|
||||
float getCaseLightBrightness_percent();
|
||||
void setCaseLightBrightness_percent(const_float_t );
|
||||
void setCaseLightBrightness_percent(const_float_t);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -321,8 +320,8 @@ namespace ExtUI {
|
||||
float getBedPIDValues_Kp();
|
||||
float getBedPIDValues_Ki();
|
||||
float getBedPIDValues_Kd();
|
||||
void setBedPIDValues(const_float_t, const_float_t , const_float_t );
|
||||
void startBedPIDTune(celsius_t );
|
||||
void setBedPIDValues(const_float_t, const_float_t , const_float_t);
|
||||
void startBedPIDTune(celsius_t);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
@@ -1290,9 +1290,10 @@ void MarlinUI::update() {
|
||||
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
#if ANY(HAS_LCD_MENU, EXTENSIBLE_UI)
|
||||
bool MarlinUI::lcd_clicked = false;
|
||||
#if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI)
|
||||
bool MarlinUI::lcd_clicked;
|
||||
#endif
|
||||
|
||||
#if HAS_STATUS_MESSAGE
|
||||
|
||||
////////////////////////////////////////////
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
#include "../module/printcounter.h"
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_LCD_MENU, EXTENSIBLE_UI) && ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE) && EITHER(HAS_LCD_MENU, EXTENSIBLE_UI)
|
||||
#include "../feature/pause.h"
|
||||
#include "../module/motion.h" // for active_extruder
|
||||
#endif
|
||||
@@ -526,9 +526,10 @@ public:
|
||||
|
||||
static constexpr bool on_status_screen() { return true; }
|
||||
FORCE_INLINE static void run_current_screen() { status_screen(); }
|
||||
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_LCD_MENU, EXTENSIBLE_UI)
|
||||
#if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI)
|
||||
static bool lcd_clicked;
|
||||
static inline bool use_click() {
|
||||
const bool click = lcd_clicked;
|
||||
@@ -540,7 +541,7 @@ public:
|
||||
static inline bool use_click() { return false; }
|
||||
#endif
|
||||
|
||||
#if ANY(HAS_LCD_MENU, EXTENSIBLE_UI) && ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE) && EITHER(HAS_LCD_MENU, EXTENSIBLE_UI)
|
||||
static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder);
|
||||
#else
|
||||
static inline void _pause_show_message() {}
|
||||
|
||||
@@ -3777,11 +3777,11 @@ void Temperature::isr() {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Temperature::wait_for_bed_heating(const bool no_wait_for_cooling/*=true*/) {
|
||||
if (isHeatingBed() || !no_wait_for_cooling ) {
|
||||
void Temperature::wait_for_bed_heating() {
|
||||
if (isHeatingBed()) {
|
||||
SERIAL_ECHOLNPGM("Wait for bed heating...");
|
||||
LCD_MESSAGEPGM(MSG_BED_HEATING);
|
||||
wait_for_bed(no_wait_for_cooling);
|
||||
wait_for_bed();
|
||||
ui.reset_status();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -731,7 +731,7 @@ class Temperature {
|
||||
OPTARG(G26_CLICK_CAN_CANCEL, const bool click_to_cancel=false)
|
||||
);
|
||||
|
||||
static void wait_for_bed_heating(const bool no_wait_for_cooling=true);
|
||||
static void wait_for_bed_heating();
|
||||
|
||||
static inline bool degBedNear(const celsius_t temp) {
|
||||
return ABS(wholeDegBed() - temp) < (TEMP_BED_HYSTERESIS);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
sd/**
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
||||
*
|
||||
@@ -30,11 +30,6 @@ sd/**
|
||||
#ifndef BOARD_CUSTOM_BUILD_FLAGS
|
||||
#define BOARD_CUSTOM_BUILD_FLAGS -DLPC_PINCFG_UART3_P4_28
|
||||
#endif
|
||||
// SD Connection
|
||||
//
|
||||
#ifndef SDCARD_CONNECTION
|
||||
#define SDCARD_CONNECTION ONBOARD
|
||||
#endif
|
||||
|
||||
//
|
||||
// EEPROM
|
||||
|
||||
@@ -246,13 +246,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
#elif ENABLED(DWIN_CREALITY_LCD)
|
||||
#define BEEPER_PIN EXP1_10_PIN
|
||||
#define BTN_EN1 EXP1_08_PIN
|
||||
#define BTN_EN2 EXP1_06_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
#undef SPEAKER
|
||||
#endif
|
||||
#endif // HAS_WIRED_LCD
|
||||
|
||||
//
|
||||
// SD Support
|
||||
//
|
||||
|
||||
@@ -21,10 +21,12 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#if ENABLED(ALLOW_MEGA1280) && NOT_TARGET(__AVR_ATmega1280__, __AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560 or 1280' in 'Tools > Board.'"
|
||||
#elif NOT_TARGET(__AVR_ATmega2560__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#if NOT_TARGET(__AVR_ATmega2560__)
|
||||
#if DISABLED(ALLOW_MEGA1280)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560' in 'Tools > Board.'"
|
||||
#elif NOT_TARGET(__AVR_ATmega1280__)
|
||||
#error "Oops! Select 'Arduino/Genuino Mega or Mega 2560 or 1280' in 'Tools > Board.'"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef ALLOW_MEGA1280
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
// Analog Pin Assignments
|
||||
//
|
||||
|
||||
#define ANALOG_OK(PN) ((PN) >= 0 && CAT(PN, u) < NUM_ANALOG_INPUTS)
|
||||
#define ANALOG_OK(PN) ((PN) >= 0 && (PN) < NUM_ANALOG_INPUTS)
|
||||
|
||||
#if defined(EXT_AUX_A0) && ANALOG_OK(EXT_AUX_A0)
|
||||
REPORT_NAME_ANALOG(__LINE__, EXT_AUX_A0)
|
||||
|
||||
@@ -411,6 +411,7 @@
|
||||
#define TOUCH_MOSI_PIN EXP1_08_PIN
|
||||
#define TOUCH_SCK_PIN EXP1_06_PIN
|
||||
#define TOUCH_CS_PIN EXP1_07_PIN
|
||||
#define BTN_ENC EXP1_09_PIN
|
||||
#define BTN_EN1 EXP2_08_PIN
|
||||
#define BTN_EN2 EXP2_06_PIN
|
||||
|
||||
|
||||
Reference in New Issue
Block a user