Skip to content

Commit

Permalink
Merge pull request #2 from MarlinFirmware/bugfix-2.0.x
Browse files Browse the repository at this point in the history
Bugfix 2.0.x - merge 20082019
  • Loading branch information
viniciusbn authored Aug 20, 2019
2 parents 0f7be63 + 33f6d77 commit 6f6c96b
Show file tree
Hide file tree
Showing 251 changed files with 6,107 additions and 515 deletions.
3 changes: 2 additions & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@
* -1 : thermocouple with AD595
* 0 : not used
* 1 : 100k thermistor - best choice for EPCOS 100k (4.7k pullup)
* 331 : (3.3V scaled thermistor 1 table)
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
Expand Down Expand Up @@ -402,7 +403,7 @@
* 998 : Dummy Table that ALWAYS reads 25°C or the temperature defined below.
* 999 : Dummy Table that ALWAYS reads 100°C or the temperature defined below.
*
* :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" }
* :{ '0':"Not used", '1':"100k / 4.7k - EPCOS", '331':"(3.3V thermistor 1)", '2':"200k / 4.7k - ATC Semitec 204GT-2", '3':"Mendel-parts / 4.7k", '4':"10k !! do not use for a hotend. Bad resolution at high temp. !!", '5':"100K / 4.7k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '501':"100K Zonestar (Tronxy X3A)", '512':"100k RPW-Ultra hotend thermistor", '6':"100k / 4.7k EPCOS - Not as accurate as Table 1", '7':"100k / 4.7k Honeywell 135-104LAG-J01", '8':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT", '9':"100k / 4.7k GE Sensing AL03006-58.2K-97-G1", '10':"100k / 4.7k RS 198-961", '11':"100k / 4.7k beta 3950 1%", '12':"100k / 4.7k 0603 SMD Vishay NTCS0603E3104FXT (calibrated for Makibox hot bed)", '13':"100k Hisens 3950 1% up to 300°C for hotend 'Simple ONE ' & hotend 'All In ONE'", '18':"ATC Semitec 204GT-2 (4.7k pullup) Dagoma.Fr - MKS_Base_DKU001327" '20':"Pt100 (Ultimainboard V2.x)", '201':"Pt100 (Overlord)", '51':"100k / 1k - EPCOS", '52':"200k / 1k - ATC Semitec 204GT-2", '55':"100k / 1k - ATC Semitec 104GT-2 (Used in ParCan & J-Head)", '60':"100k Maker's Tool Works Kapton Bed Thermistor beta=3950", '61':"100k Formbot / Vivedino 3950 350C thermistor 4.7k pullup", '66':"Dyze Design 4.7M High Temperature thermistor", '67':"Slice Engineering 450C High Temperature thermistor", '70':"the 100K thermistor found in the bq Hephestos 2", '71':"100k / 4.7k Honeywell 135-104LAF-J01", '147':"Pt100 / 4.7k", '1047':"Pt1000 / 4.7k", '110':"Pt100 / 1k (non-standard)", '1010':"Pt1000 / 1k (non standard)", '-4':"Thermocouple + AD8495", '-3':"Thermocouple + MAX31855 (only for sensor 0)", '-2':"Thermocouple + MAX6675 (only for sensor 0)", '-1':"Thermocouple + AD595", '998':"Dummy 1", '999':"Dummy 2", '1000':"Custom thermistor params" }
*/
#define TEMP_SENSOR_0 1
#define TEMP_SENSOR_1 0
Expand Down
1 change: 1 addition & 0 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,7 @@
#if ENABLED(POWER_LOSS_RECOVERY)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss
//#define POWER_LOSS_STATE HIGH // State of pin indicating power loss
//#define POWER_LOSS_PULL // Set pullup / pulldown as appropriate
//#define POWER_LOSS_PURGE_LEN 20 // (mm) Length of filament to purge on resume
//#define POWER_LOSS_RETRACT_LEN 10 // (mm) Length of filament to retract on fail. Requires backup power.

Expand Down
38 changes: 20 additions & 18 deletions Marlin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -277,42 +277,44 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1205)
else ifeq ($(HARDWARE_MOTHERBOARD),1300)
# Cartesio CN Controls V12
else ifeq ($(HARDWARE_MOTHERBOARD),1301)
# Cheaptronic v1.0
# Cartesio CN Controls V15
else ifeq ($(HARDWARE_MOTHERBOARD),1302)
# Cheaptronic v2.0
# Cheaptronic v1.0
else ifeq ($(HARDWARE_MOTHERBOARD),1303)
# Makerbot Mightyboard Revision E
# Cheaptronic v2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1304)
# Megatronics
# Makerbot Mightyboard Revision E
else ifeq ($(HARDWARE_MOTHERBOARD),1305)
# Megatronics v2.0
# Megatronics
else ifeq ($(HARDWARE_MOTHERBOARD),1306)
# Megatronics v3.0
# Megatronics v2.0
else ifeq ($(HARDWARE_MOTHERBOARD),1307)
# Megatronics v3.1
# Megatronics v3.0
else ifeq ($(HARDWARE_MOTHERBOARD),1308)
# Megatronics v3.2
# Megatronics v3.1
else ifeq ($(HARDWARE_MOTHERBOARD),1309)
# Elefu Ra Board (v3)
# Megatronics v3.2
else ifeq ($(HARDWARE_MOTHERBOARD),1310)
# Leapfrog
# Elefu Ra Board (v3)
else ifeq ($(HARDWARE_MOTHERBOARD),1311)
# Mega controller
# Leapfrog
else ifeq ($(HARDWARE_MOTHERBOARD),1312)
# Geeetech GT2560 Rev B for Mecreator2
# Mega controller
else ifeq ($(HARDWARE_MOTHERBOARD),1313)
# Geeetech GT2560 Rev. A
# Geeetech GT2560 Rev B for Mecreator2
else ifeq ($(HARDWARE_MOTHERBOARD),1314)
# Geeetech GT2560 Rev. A+ (with auto level probe)
# Geeetech GT2560 Rev. A
else ifeq ($(HARDWARE_MOTHERBOARD),1315)
# Geeetech GT2560 Rev B for A10(M/D)
# Geeetech GT2560 Rev. A+ (with auto level probe)
else ifeq ($(HARDWARE_MOTHERBOARD),1316)
# Geeetech GT2560 Rev B for A20(M/D)
# Geeetech GT2560 Rev B for A10(M/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1317)
# Einstart retrofit
# Geeetech GT2560 Rev B for A20(M/D)
else ifeq ($(HARDWARE_MOTHERBOARD),1318)
# Wanhao 0ne+ i3 Mini
# Einstart retrofit
else ifeq ($(HARDWARE_MOTHERBOARD),1319)
# Wanhao 0ne+ i3 Mini
else ifeq ($(HARDWARE_MOTHERBOARD),1320)

#
# ATmega1281, ATmega2561
Expand Down
23 changes: 14 additions & 9 deletions Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*/
#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)


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

#include <SPI.h>
Expand Down Expand Up @@ -73,16 +72,22 @@ void spiInit(uint8_t spiRate) {
// Use datarates Marlin uses
uint32_t clock;
switch (spiRate) {
case SPI_FULL_SPEED: clock = 20000000; break; // 13.9mhz=20000000 6.75mhz=10000000 3.38mhz=5000000 .833mhz=1000000
case SPI_HALF_SPEED: clock = 5000000; break;
case SPI_QUARTER_SPEED: clock = 2500000; break;
case SPI_EIGHTH_SPEED: clock = 1250000; break;
case SPI_SPEED_5: clock = 625000; break;
case SPI_SPEED_6: clock = 300000; break;
default:
clock = 4000000; // Default from the SPI library
case SPI_FULL_SPEED: clock = 20000000; break; // 13.9mhz=20000000 6.75mhz=10000000 3.38mhz=5000000 .833mhz=1000000
case SPI_HALF_SPEED: clock = 5000000; break;
case SPI_QUARTER_SPEED: clock = 2500000; break;
case SPI_EIGHTH_SPEED: clock = 1250000; break;
case SPI_SPEED_5: clock = 625000; break;
case SPI_SPEED_6: clock = 300000; break;
default:
clock = 4000000; // Default from the SPI library
}
spiConfig = SPISettings(clock, MSBFIRST, SPI_MODE0);
#if defined(MISO_PIN) && defined(SDSS) && defined(MOSI_PIN) && defined(SCK_PIN)
SPI.setMISO(MISO_PIN);
SPI.setSSEL(SDSS);
SPI.setMOSI(MOSI_PIN);
SPI.setSCLK(SCK_PIN);
#endif
SPI.begin();
}

Expand Down
8 changes: 6 additions & 2 deletions Marlin/src/Marlin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
#include "feature/host_actions.h"
#endif

#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER)
#if USE_BEEPER
#include "libs/buzzer.h"
#endif

Expand Down Expand Up @@ -702,7 +702,7 @@ void idle(
print_job_timer.tick();
#endif

#if HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER) && DISABLED(PCA9632_BUZZER)
#if USE_BEEPER
buzzer.tick();
#endif

Expand Down Expand Up @@ -886,6 +886,10 @@ void setup() {
runout.setup();
#endif

#if ENABLED(POWER_LOSS_RECOVERY)
recovery.setup();
#endif

setup_killpin();

#if HAS_TMC220x
Expand Down
38 changes: 20 additions & 18 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,24 +113,25 @@

#define BOARD_CNCONTROLS_11 1300 // Cartesio CN Controls V11
#define BOARD_CNCONTROLS_12 1301 // Cartesio CN Controls V12
#define BOARD_CHEAPTRONIC 1302 // Cheaptronic v1.0
#define BOARD_CHEAPTRONIC_V2 1303 // Cheaptronic v2.0
#define BOARD_MIGHTYBOARD_REVE 1304 // Makerbot Mightyboard Revision E
#define BOARD_MEGATRONICS 1305 // Megatronics
#define BOARD_MEGATRONICS_2 1306 // Megatronics v2.0
#define BOARD_MEGATRONICS_3 1307 // Megatronics v3.0
#define BOARD_MEGATRONICS_31 1308 // Megatronics v3.1
#define BOARD_MEGATRONICS_32 1309 // Megatronics v3.2
#define BOARD_ELEFU_3 1310 // Elefu Ra Board (v3)
#define BOARD_LEAPFROG 1311 // Leapfrog
#define BOARD_MEGACONTROLLER 1312 // Mega controller
#define BOARD_GT2560_REV_A 1313 // Geeetech GT2560 Rev. A
#define BOARD_GT2560_REV_A_PLUS 1314 // Geeetech GT2560 Rev. A+ (with auto level probe)
#define BOARD_GT2560_V3 1315 // Geeetech GT2560 Rev B for A10(M/D)
#define BOARD_GT2560_V3_MC2 1316 // Geeetech GT2560 Rev B for Mecreator2
#define BOARD_GT2560_V3_A20 1317 // Geeetech GT2560 Rev B for A20(M/D)
#define BOARD_EINSTART_S 1318 // Einstart retrofit
#define BOARD_WANHAO_ONEPLUS 1319 // Wanhao 0ne+ i3 Mini
#define BOARD_CNCONTROLS_15 1302 // Cartesio CN Controls V15
#define BOARD_CHEAPTRONIC 1303 // Cheaptronic v1.0
#define BOARD_CHEAPTRONIC_V2 1304 // Cheaptronic v2.0
#define BOARD_MIGHTYBOARD_REVE 1305 // Makerbot Mightyboard Revision E
#define BOARD_MEGATRONICS 1306 // Megatronics
#define BOARD_MEGATRONICS_2 1307 // Megatronics v2.0
#define BOARD_MEGATRONICS_3 1308 // Megatronics v3.0
#define BOARD_MEGATRONICS_31 1309 // Megatronics v3.1
#define BOARD_MEGATRONICS_32 1310 // Megatronics v3.2
#define BOARD_ELEFU_3 1311 // Elefu Ra Board (v3)
#define BOARD_LEAPFROG 1312 // Leapfrog
#define BOARD_MEGACONTROLLER 1313 // Mega controller
#define BOARD_GT2560_REV_A 1314 // Geeetech GT2560 Rev. A
#define BOARD_GT2560_REV_A_PLUS 1315 // Geeetech GT2560 Rev. A+ (with auto level probe)
#define BOARD_GT2560_V3 1316 // Geeetech GT2560 Rev B for A10(M/D)
#define BOARD_GT2560_V3_MC2 1317 // Geeetech GT2560 Rev B for Mecreator2
#define BOARD_GT2560_V3_A20 1318 // Geeetech GT2560 Rev B for A20(M/D)
#define BOARD_EINSTART_S 1319 // Einstart retrofit
#define BOARD_WANHAO_ONEPLUS 1320 // Wanhao 0ne+ i3 Mini

//
// ATmega1281, ATmega2561
Expand Down Expand Up @@ -290,6 +291,7 @@
#define BOARD_BLACK_STM32F407ZE 4205 // BLACK_STM32F407ZE
#define BOARD_STEVAL 4206 // STEVAL-3DP001V1 3D PRINTER BOARD
#define BOARD_BIGTREE_SKR_PRO_V1_1 4207 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
#define BOARD_BIGTREE_BTT002_V1_0 4208 // BigTreeTech BTT002 v1.0 (STM32F407VE)

//
// ARM Cortex M7
Expand Down
8 changes: 5 additions & 3 deletions Marlin/src/feature/leds/pca9632.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,15 @@ void pca9632_set_led_color(const LEDColor &color) {
}

#if ENABLED(PCA9632_BUZZER)
void pca9632_buzz(uint16_t const f, uint16_t d) {
UNUSED(f); UNUSED(d);

void pca9632_buzz(const long duration, const uint16_t freq) {
UNUSED(duration); UNUSED(freq);
uint8_t data[] = PCA9632_BUZZER_DATA;
Wire.beginTransmission(I2C_ADDRESS(PCA9632_ADDRESS));
Wire.write(data, sizeof(data));
Wire.endTransmission();
}
#endif

#endif // PCA9632_BUZZER

#endif // PCA9632
3 changes: 2 additions & 1 deletion Marlin/src/feature/leds/pca9632.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ typedef LEDColor LEDColor;
void pca9632_set_led_color(const LEDColor &color);

#if ENABLED(PCA9632_BUZZER)
void pca9632_buzz(uint16_t const, uint16_t);
#include <stdint.h>
void pca9632_buzz(const long, const uint16_t);
#endif
20 changes: 19 additions & 1 deletion Marlin/src/feature/power_loss_recovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@
*/

#include "../sd/cardreader.h"
#include "../inc/MarlinConfigPre.h"
#include "../inc/MarlinConfig.h"

#if ENABLED(MIXING_EXTRUDER)
#include "../feature/mixing.h"
#endif

#if !defined(POWER_LOSS_STATE) && PIN_EXISTS(POWER_LOSS)
#define POWER_LOSS_STATE HIGH
#endif

//#define DEBUG_POWER_LOSS_RECOVERY
//#define SAVE_EACH_CMD_MODE
//#define SAVE_INFO_INTERVAL_MS 0
Expand Down Expand Up @@ -110,6 +114,20 @@ class PrintJobRecovery {

static void init();

static inline void setup() {
#if PIN_EXISTS(POWER_LOSS)
#if ENABLED(POWER_LOSS_PULL)
#if POWER_LOSS_STATE == LOW
SET_INPUT_PULLUP(POWER_LOSS_PIN);
#else
SET_INPUT_PULLDOWN(POWER_LOSS_PIN);
#endif
#else
SET_INPUT(POWER_LOSS_PIN);
#endif
#endif
}

static bool enabled;
static void enable(const bool onoff);
static void changed();
Expand Down
5 changes: 3 additions & 2 deletions Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,8 @@
#define HAS_KILL (PIN_EXISTS(KILL))
#define HAS_SUICIDE (PIN_EXISTS(SUICIDE))
#define HAS_PHOTOGRAPH (PIN_EXISTS(PHOTOGRAPH))
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER) || ENABLED(PCA9632_BUZZER))
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || EITHER(LCD_USE_I2C_BUZZER, PCA9632_BUZZER))
#define USE_BEEPER (HAS_BUZZER && DISABLED(LCD_USE_I2C_BUZZER, PCA9632_BUZZER))
#define HAS_CASE_LIGHT (PIN_EXISTS(CASE_LIGHT) && ENABLED(CASE_LIGHT_ENABLE))

// Digital control
Expand Down Expand Up @@ -1570,7 +1571,7 @@
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 100
#endif
#else
#elif HAS_BUZZER
#ifndef LCD_FEEDBACK_FREQUENCY_HZ
#define LCD_FEEDBACK_FREQUENCY_HZ 5000
#endif
Expand Down
29 changes: 28 additions & 1 deletion Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,33 @@ void MarlinUI::init_lcd() {
lcd.clear();
}

bool MarlinUI::detected() {
return true
#if EITHER(LCD_I2C_TYPE_MCP23017, LCD_I2C_TYPE_MCP23008) && defined(DETECT_DEVICE)
&& lcd.LcdDetected() == 1
#endif
;
}

#if HAS_SLOW_BUTTONS
uint8_t MarlinUI::read_slow_buttons() {
#if ENABLED(LCD_I2C_TYPE_MCP23017)
// Reading these buttons this is likely to be too slow to call inside interrupt context
// so they are called during normal lcd_update
uint8_t slow_bits = lcd.readButtons()
#if !BUTTON_EXISTS(ENC)
<< B_I2C_BTN_OFFSET
#endif
;
#if ENABLED(LCD_I2C_VIKI)
if ((slow_bits & (B_MI | B_RI)) && PENDING(millis(), next_button_update_ms)) // LCD clicked
slow_bits &= ~(B_MI | B_RI); // Disable LCD clicked buttons if screen is updated
#endif // LCD_I2C_VIKI
return slow_bits;
#endif // LCD_I2C_TYPE_MCP23017
}
#endif

void MarlinUI::clear_lcd() { lcd.clear(); }

#if ENABLED(SHOW_BOOTSCREEN)
Expand Down Expand Up @@ -1063,7 +1090,7 @@ void MarlinUI::draw_status_screen() {

#if ENABLED(LCD_HAS_STATUS_INDICATORS)

static void MarlinUI::update_indicators() {
void MarlinUI::update_indicators() {
// Set the LEDS - referred to as backlights by the LiquidTWI2 library
static uint8_t ledsprev = 0;
uint8_t leds = 0;
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/lcd/dogm/ultralcd_DOGM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ void MarlinUI::set_font(const MarlinFont font_nr) {
}
}

bool MarlinUI::detected() { return true; }

#if ENABLED(SHOW_BOOTSCREEN)

#if ENABLED(SHOW_CUSTOM_BOOTSCREEN)
Expand Down
19 changes: 13 additions & 6 deletions Marlin/src/lcd/extensible_ui/ui_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
#include "../../libs/numtostr.h"
#endif

#if DO_SWITCH_EXTRUDER || EITHER(SWITCHING_NOZZLE, PARKING_EXTRUDER)
#if EXTRUDERS > 1
#include "../../module/tool_change.h"
#endif

Expand Down Expand Up @@ -267,8 +267,12 @@ namespace ExtUI {
return flags.manual_motion ? destination[axis] : current_position[axis];
}

float getAxisPosition_mm(const extruder_t) {
return flags.manual_motion ? destination[E_AXIS] : current_position[E_AXIS];
float getAxisPosition_mm(const extruder_t extruder) {
const uint8_t old_tool = active_extruder;
setActiveTool(extruder, true);
const float pos = flags.manual_motion ? destination[E_AXIS] : current_position[E_AXIS];
setActiveTool(old_tool, true);
return pos;
}

void setAxisPosition_mm(const float position, const axis_t axis) {
Expand Down Expand Up @@ -315,6 +319,9 @@ namespace ExtUI {
}
#endif

constexpr float max_manual_feedrate[XYZE] = MANUAL_FEEDRATE;
setFeedrate_mm_s(max_manual_feedrate[axis]);

if (!flags.manual_motion) set_destination_from_current();
destination[axis] = clamp(position, min, max);
flags.manual_motion = true;
Expand All @@ -323,6 +330,8 @@ namespace ExtUI {
void setAxisPosition_mm(const float position, const extruder_t extruder) {
setActiveTool(extruder, true);

constexpr float max_manual_feedrate[XYZE] = MANUAL_FEEDRATE;
setFeedrate_mm_s(max_manual_feedrate[E_AXIS]);
if (!flags.manual_motion) set_destination_from_current();
destination[E_AXIS] = position;
flags.manual_motion = true;
Expand Down Expand Up @@ -363,9 +372,7 @@ namespace ExtUI {
void setActiveTool(const extruder_t extruder, bool no_move) {
#if EXTRUDERS > 1
const uint8_t e = extruder - E0;
#if DO_SWITCH_EXTRUDER || EITHER(SWITCHING_NOZZLE, PARKING_EXTRUDER)
if (e != active_extruder) tool_change(e, no_move);
#endif
if (e != active_extruder) tool_change(e, no_move);
active_extruder = e;
#else
UNUSED(extruder);
Expand Down
Loading

0 comments on commit 6f6c96b

Please sign in to comment.