Browse Source

Merge pull request #14 from X-Dron/PR

Sergey1560 Sync
pull/38/head
X-Dron 4 years ago
committed by GitHub
parent
commit
c9348d19d3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 41
      Marlin/Configuration.h
  2. 42
      Marlin/Configuration_adv.h
  3. 2
      Marlin/src/feature/bedlevel/abl/abl.cpp
  4. 1
      Marlin/src/gcode/gcode.cpp
  5. 42
      Marlin/src/inc/Conditionals_LCD.h
  6. 2
      Marlin/src/lcd/menu/menu_motion.cpp
  7. 8
      Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp
  8. 8
      Marlin/src/module/motion.cpp
  9. 3
      Marlin/src/module/stepper.cpp
  10. 8
      Marlin/src/module/temperature.cpp
  11. 10
      Marlin/src/sd/cardreader.cpp
  12. 26
      README.md

41
Marlin/Configuration.h

@ -756,11 +756,11 @@
* Override with M203
* X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_FEEDRATE { 200, 200, 4, 70 }
#define DEFAULT_MAX_FEEDRATE { 200, 200, 4, 50 }
//#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
#define LIMITED_MAX_FR_EDITING // Limit edit via M203 or LCD to DEFAULT_MAX_FEEDRATE * 2
#if ENABLED(LIMITED_MAX_FR_EDITING)
#define MAX_FEEDRATE_EDIT_VALUES { 600, 600, 10, 50 } // ...or, set your own edit limits
#define MAX_FEEDRATE_EDIT_VALUES { 300, 300, 10, 70 } // ...or, set your own edit limits
#endif
/**
@ -769,11 +769,12 @@
* Override with M201
* X, Y, Z, E0 [, E1[, E2...]]
*/
#define DEFAULT_MAX_ACCELERATION { 1300, 1300, 100, 800 }
#define LIMITED_MAX_ACCEL_EDITING // Limit edit via M201 or LCD to DEFAULT_MAX_ACCELERATION * 2
#if ENABLED(LIMITED_MAX_ACCEL_EDITING)
#define MAX_ACCEL_EDIT_VALUES { 2000, 2000, 100, 1000 } // ...or, set your own edit limits
#define MAX_ACCEL_EDIT_VALUES { 5000, 5000, 100, 5000 } // ...or, set your own edit limits
#endif
/**
@ -785,8 +786,9 @@
* M204 T Travel Acceleration
*/
// @efim-a-efim - decreased E0 acceleration to make it less noisy (yes, even with TMC2208 drivers)
#define DEFAULT_ACCELERATION 1200 // X, Y, Z and E acceleration for printing moves
#define DEFAULT_RETRACT_ACCELERATION 800 // E acceleration for retracts
#define DEFAULT_RETRACT_ACCELERATION 2000 // E acceleration for retracts
#define DEFAULT_TRAVEL_ACCELERATION 1200 // X, Y, Z acceleration for travel (non printing) moves
/**
@ -807,11 +809,11 @@
#define LIMITED_JERK_EDITING // Limit edit via M205 or LCD to DEFAULT_aJERK * 2
#if ENABLED(LIMITED_JERK_EDITING)
#define MAX_JERK_EDIT_VALUES { 20, 20, 2, 20 } // ...or, set your own edit limits
#define MAX_JERK_EDIT_VALUES { 30, 30, 2, 20 } // ...or, set your own edit limits
#endif
#endif
#define DEFAULT_EJERK 7 // May be used by Linear Advance
#define DEFAULT_EJERK 8 // May be used by Linear Advance
/**
* Junction Deviation Factor
@ -884,7 +886,7 @@
* Use G29 repeatedly, adjusting the Z height at each point with movement commands
* or (with LCD_BED_LEVELING) the LCD controller.
*/
//#define PROBE_MANUALLY
#define PROBE_MANUALLY
//#define MANUAL_PROBE_START_Z 0.2
/**
@ -908,7 +910,7 @@
/**
* The BLTouch probe uses a Hall effect sensor and emulates a servo.
*/
#define BLTOUCH
//#define BLTOUCH
/**
* Pressure sensor with a BLTouch-like interface
@ -995,12 +997,13 @@
* | [-] |
* O-- FRONT --+
*/
#define NOZZLE_TO_PROBE_OFFSET { 37, -20, 0 }
#define NOZZLE_TO_PROBE_OFFSET { 0, 0, 0 }
// Most probes should stay away from the edges of the bed, but
// with NOZZLE_AS_PROBE this can be negative for a wider probing area.
#define PROBING_MARGIN 5
// X and Y axis travel speed (mm/min) between probes
#define XY_PROBE_SPEED 3000
@ -1044,11 +1047,12 @@
#define Z_PROBE_LOW_POINT -2 // Farthest distance below the trigger-point to go before stopping
// For M851 give a range for adjusting the Z probe offset
#define Z_PROBE_OFFSET_RANGE_MIN -5
#define Z_PROBE_OFFSET_RANGE_MAX 5
// Enable the M48 repeatability test to test probe accuracy
#define Z_MIN_PROBE_REPEATABILITY_TEST
//#define Z_MIN_PROBE_REPEATABILITY_TEST
// Before deploy/stow pause for user confirmation
//#define PAUSE_BEFORE_DEPLOY_STOW
@ -1139,7 +1143,7 @@
// @section homing
//#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
#define NO_MOTION_BEFORE_HOMING // Inhibit movement until all axes have been homed
//#define UNKNOWN_Z_NO_RAISE // Don't raise Z (lower the bed) if Z is "unknown." For beds that fall when Z is powered off.
@ -1160,6 +1164,7 @@
#define X_BED_SIZE 250
#define Y_BED_SIZE 206
// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS -2
@ -1182,7 +1187,7 @@
#if ENABLED(MIN_SOFTWARE_ENDSTOPS)
#define MIN_SOFTWARE_ENDSTOP_X
#define MIN_SOFTWARE_ENDSTOP_Y
//#define MIN_SOFTWARE_ENDSTOP_Z
#define MIN_SOFTWARE_ENDSTOP_Z
#endif
// Max software endstops constrain movement within maximum coordinate bounds
@ -1194,7 +1199,7 @@
#endif
#if EITHER(MIN_SOFTWARE_ENDSTOPS, MAX_SOFTWARE_ENDSTOPS)
//#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#define SOFT_ENDSTOPS_MENU_ITEM // Enable/Disable software endstops from the LCD
#endif
/**
@ -1204,9 +1209,9 @@
* RAMPS-based boards use SERVO3_PIN for the first runout sensor.
* For other boards you may need to define FIL_RUNOUT_PIN, FIL_RUNOUT2_PIN, etc.
*/
//#define FILAMENT_RUNOUT_SENSOR
#define FILAMENT_RUNOUT_SENSOR
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
#define FIL_RUNOUT_ENABLED_DEFAULT true // Enable the sensor on startup. Override with M412 followed by M500.
#define FIL_RUNOUT_ENABLED_DEFAULT false // Enable the sensor on startup. Override with M412 followed by M500.
#define NUM_RUNOUT_SENSORS 1 // Number of sensors, up to one per extruder. Define a FIL_RUNOUT#_PIN for each.
#define FIL_RUNOUT_STATE HIGH // Pin state indicating that filament is NOT present.
//#define FIL_RUNOUT_PULLUP // Use internal pullup for filament runout pins.
@ -1219,7 +1224,7 @@
// After a runout is detected, continue printing this length of filament
// before executing the runout script. Useful for a sensor at the end of
// a feed tube. Requires 4 bytes SRAM per sensor, plus 4 bytes overhead.
//#define FILAMENT_RUNOUT_DISTANCE_MM 25
#define FILAMENT_RUNOUT_DISTANCE_MM 500
#ifdef FILAMENT_RUNOUT_DISTANCE_MM
// Enable this option to use an encoder disc that toggles the runout pin
@ -1284,7 +1289,7 @@
* Turn on with the command 'M111 S32'.
* NOTE: Requires a lot of PROGMEM!
*/
//#define DEBUG_LEVELING_FEATURE
#define DEBUG_LEVELING_FEATURE
#if ANY(MESH_BED_LEVELING, AUTO_BED_LEVELING_BILINEAR, AUTO_BED_LEVELING_UBL)
// Gradually reduce leveling correction until a set height is reached,

42
Marlin/Configuration_adv.h

@ -371,7 +371,7 @@
* Hotend Idle Timeout
* Prevent filament in the nozzle from charring and causing a critical jam.
*/
//#define HOTEND_IDLE_TIMEOUT
#define HOTEND_IDLE_TIMEOUT
#if ENABLED(HOTEND_IDLE_TIMEOUT)
#define HOTEND_IDLE_TIMEOUT_SEC (5*60) // (seconds) Time without extruder movement to trigger protection
#define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection
@ -512,7 +512,7 @@
#define CASE_LIGHT_MAX_PWM 255 // Limit pwm
#define CASE_LIGHT_MENU // Add Case Light options to the LCD menu
//#define CASE_LIGHT_NO_BRIGHTNESS // Disable brightness control. Enable for non-PWM lighting.
//#define CASE_LIGHT_USE_NEOPIXEL // Use NeoPixel LED as case light, requires NEOPIXEL_LED.
//#define CASE_LIGHT_USE_NEOPIXEL // Use Neopixel LED as case light, requires NEOPIXEL_LED.
#if ENABLED(CASE_LIGHT_USE_NEOPIXEL)
#define CASE_LIGHT_NEOPIXEL_COLOR { 255, 255, 255, 255 } // { Red, Green, Blue, White }
#endif
@ -798,7 +798,7 @@
#if ENABLED(ASSISTED_TRAMMING)
// Define positions for probing points, use the hotend as reference not the sensor.
#define TRAMMING_POINT_XY { { 20, 20 }, { 200, 20 }, { 200, 200 }, { 20, 200 } }
#define TRAMMING_POINT_XY { { 37, 10 }, { 223, 10 }, { 223, 180 }, { 37, 180 } }
// Define positions names for probing points.
#define TRAMMING_POINT_NAME_1 "Front-Left"
@ -1121,16 +1121,16 @@
#endif // HAS_LCD_MENU
// Scroll a longer status message into view
//#define STATUS_MESSAGE_SCROLLING
#define STATUS_MESSAGE_SCROLLING
// On the Info Screen, display XY with one decimal place when possible
//#define LCD_DECIMAL_SMALL_XY
#define LCD_DECIMAL_SMALL_XY
// The timeout (in ms) to return to the status screen from sub-menus
//#define LCD_TIMEOUT_TO_STATUS 15000
// Add an 'M73' G-code to set the current percentage
//#define LCD_SET_PROGRESS_MANUALLY
#define LCD_SET_PROGRESS_MANUALLY
// Show the E position (filament used) during printing
//#define LCD_SHOW_E_TOTAL
@ -1197,7 +1197,7 @@
* an option on the LCD screen to continue the print from the last-known
* point in the file.
*/
//#define POWER_LOSS_RECOVERY
#define POWER_LOSS_RECOVERY
#if ENABLED(POWER_LOSS_RECOVERY)
#define PLR_ENABLED_DEFAULT false // Power Loss Recovery enabled by default. (Set with 'M413 Sn' & M500)
//#define BACKUP_POWER_SUPPLY // Backup power / UPS to move the steppers on power loss
@ -1695,10 +1695,10 @@
* the probe to be unable to reach any points.
*/
#if PROBE_SELECTED && !IS_KINEMATIC
//#define PROBING_MARGIN_LEFT PROBING_MARGIN
//#define PROBING_MARGIN_RIGHT PROBING_MARGIN
//#define PROBING_MARGIN_FRONT PROBING_MARGIN
//#define PROBING_MARGIN_BACK PROBING_MARGIN
#define PROBING_MARGIN_LEFT PROBING_MARGIN
#define PROBING_MARGIN_RIGHT PROBING_MARGIN
#define PROBING_MARGIN_FRONT PROBING_MARGIN
#define PROBING_MARGIN_BACK PROBING_MARGIN
#endif
#if EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
@ -1806,7 +1806,7 @@
#endif
// Support for G5 with XYZE destination and IJPQ offsets. Requires ~2666 bytes.
//#define BEZIER_CURVE_SUPPORT
#define BEZIER_CURVE_SUPPORT
/**
* Direct Stepping
@ -1989,21 +1989,21 @@
*
* Note that M207 / M208 / M209 settings are saved to EEPROM.
*/
//#define FWRETRACT
#define FWRETRACT
#if ENABLED(FWRETRACT)
#define FWRETRACT_AUTORETRACT // Override slicer retractions
//#define FWRETRACT_AUTORETRACT // Override slicer retractions
#if ENABLED(FWRETRACT_AUTORETRACT)
#define MIN_AUTORETRACT 0.1 // (mm) Don't convert E moves under this length
#define MAX_AUTORETRACT 10.0 // (mm) Don't convert E moves over this length
#define MAX_AUTORETRACT 5.0 // (mm) Don't convert E moves over this length
#endif
#define RETRACT_LENGTH 3 // (mm) Default retract length (positive value)
#define RETRACT_LENGTH 2 // (mm) Default retract length (positive value)
#define RETRACT_LENGTH_SWAP 13 // (mm) Default swap retract length (positive value)
#define RETRACT_FEEDRATE 45 // (mm/s) Default feedrate for retracting
#define RETRACT_FEEDRATE 35 // (mm/s) Default feedrate for retracting
#define RETRACT_ZRAISE 0 // (mm) Default retract Z-raise
#define RETRACT_RECOVER_LENGTH 0 // (mm) Default additional recover length (added to retract length on recover)
#define RETRACT_RECOVER_LENGTH_SWAP 0 // (mm) Default additional swap recover length (added to retract length on recover from toolchange)
#define RETRACT_RECOVER_FEEDRATE 8 // (mm/s) Default feedrate for recovering from retraction
#define RETRACT_RECOVER_FEEDRATE_SWAP 8 // (mm/s) Default feedrate for recovering from swap retraction
#define RETRACT_RECOVER_FEEDRATE 35 // (mm/s) Default feedrate for recovering from retraction
#define RETRACT_RECOVER_FEEDRATE_SWAP 35 // (mm/s) Default feedrate for recovering from swap retraction
#if ENABLED(MIXING_EXTRUDER)
//#define RETRACT_SYNC_MIXING // Retract and restore all mixing steppers simultaneously
#endif
@ -3126,7 +3126,7 @@
/**
* Disable all Volumetric extrusion options
*/
//#define NO_VOLUMETRICS
#define NO_VOLUMETRICS
#if DISABLED(NO_VOLUMETRICS)
/**
@ -3281,7 +3281,7 @@
*
* Implement M486 to allow Marlin to skip objects
*/
//#define CANCEL_OBJECTS
#define CANCEL_OBJECTS
/**
* I2C position encoders for closed loop control.

2
Marlin/src/feature/bedlevel/abl/abl.cpp

@ -348,7 +348,7 @@ float bilinear_z_offset(const xy_pos_t &raw) {
* Prepare a bilinear-leveled linear move on Cartesian,
* splitting the move where it crosses grid borders.
*/
void bilinear_line_to_destination(const feedRate_t scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) {
void bilinear_line_to_destination(const feedRate_t &scaled_fr_mm_s, uint16_t x_splits, uint16_t y_splits) {
// Get current and destination cells for this line
xy_int_t c1 { CELL_INDEX(x, current_position.x), CELL_INDEX(y, current_position.y) },
c2 { CELL_INDEX(x, destination.x), CELL_INDEX(y, destination.y) };

1
Marlin/src/gcode/gcode.cpp

@ -260,6 +260,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
#if ENABLED(PASSWORD_FEATURE)
if (password.is_locked && !(parser.command_letter == 'M' && parser.codenum == 511)) {
SERIAL_ECHO_MSG(STR_PRINTER_LOCKED);
if (!no_ok) queue.ok_to_send();
return;
}
#endif

42
Marlin/src/inc/Conditionals_LCD.h

@ -63,12 +63,12 @@
#elif ENABLED(CARTESIO_UI)
#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#elif EITHER(DWIN_MARLINUI_PORTRAIT, DWIN_MARLINUI_LANDSCAPE)
#define IS_DWIN_MARLINUI 1
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#elif ENABLED(ZONESTAR_LCD)
@ -76,7 +76,7 @@
#define IS_RRW_KEYPAD
#define REPRAPWORLD_KEYPAD_MOVE_STEP 10.0
#define ADC_KEY_NUM 8
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
// This helps to implement ADC_KEYPAD menus
#define REVERSE_MENU_DIRECTION
@ -98,7 +98,7 @@
#define IS_U8GLIB_SSD1306
#elif ENABLED(RADDS_DISPLAY)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define ENCODER_PULSES_PER_STEP 2
#elif EITHER(ANET_FULL_GRAPHICS_LCD, BQ_LCD_SMART_CONTROLLER)
@ -108,7 +108,7 @@
#elif ANY(miniVIKI, VIKI2, ELB_FULL_GRAPHIC_CONTROLLER, AZSMZ_12864)
#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#if ENABLED(miniVIKI)
#define U8GLIB_ST7565_64128N
@ -123,19 +123,19 @@
#elif ENABLED(OLED_PANEL_TINYBOY2)
#define IS_U8GLIB_SSD1306
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#elif ENABLED(RA_CONTROL_PANEL)
#define LCD_I2C_TYPE_PCA8574
#define LCD_I2C_ADDRESS 0x27 // I2C Address of the port expander
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define DOGLCD
#define U8GLIB_ST7920
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#elif ENABLED(CR10_STOCKDISPLAY)
@ -179,7 +179,7 @@
#define FYSETC_MINI_12864
#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define LED_COLORS_REDUCE_GREEN
#if ENABLED(PSU_CONTROL) && EITHER(FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
#define LED_BACKLIGHT_TIMEOUT 10000
@ -205,7 +205,7 @@
#elif ENABLED(ULTI_CONTROLLER)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define U8GLIB_SSD1309
#define LCD_RESET_PIN LCD_PINS_D6 // This controller need a reset pin
#define ENCODER_PULSES_PER_STEP 2
@ -220,7 +220,7 @@
#elif EITHER(TFTGLCD_PANEL_SPI, TFTGLCD_PANEL_I2C)
#define IS_TFTGLCD_PANEL 1
#define IS_ULTIPANEL // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD
#define IS_ULTIPANEL 1 // Note that IS_ULTIPANEL leads to HAS_WIRED_LCD
#if ENABLED(SDSUPPORT) && DISABLED(LCD_PROGRESS_BAR)
#define LCD_PROGRESS_BAR
@ -246,7 +246,7 @@
#endif
#if EITHER(MAKRPANEL, MINIPANEL)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define DOGLCD
#if ENABLED(MAKRPANEL)
#define U8GLIB_ST7565_64128N
@ -258,7 +258,7 @@
#endif
#if ENABLED(OVERLORD_OLED)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define U8GLIB_SH1106
/**
* PCA9632 for buzzer and LEDs via i2c
@ -302,13 +302,13 @@
// Basic Ultipanel-like displays
#if ANY(ULTIMAKERCONTROLLER, REPRAP_DISCOUNT_SMART_CONTROLLER, G3D_PANEL, RIGIDBOT_PANEL, PANEL_ONE, U8GLIB_SH1106)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#endif
// Einstart OLED has Cardinal nav via pins defined in pins_EINSTART-S.h
#if ENABLED(U8GLIB_SH1106_EINSTART)
#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#endif
// Compatibility
@ -350,7 +350,7 @@
#if TFT_SCALED_DOGLCD
#define DOGLCD
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define DELAYED_BACKLIGHT_INIT
#elif ENABLED(TFT_LVGL_UI)
#define DELAYED_BACKLIGHT_INIT
@ -359,7 +359,7 @@
// Color UI
#if ENABLED(TFT_COLOR_UI)
#define HAS_GRAPHICAL_TFT 1
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#endif
/**
@ -383,7 +383,7 @@
#define LCD_I2C_TYPE_MCP23017
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (optional)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#elif ENABLED(LCD_I2C_VIKI)
@ -398,7 +398,7 @@
#define LCD_I2C_TYPE_MCP23017
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER // Enable buzzer on LCD (requires LiquidTWI2 v1.2.3 or later)
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#define ENCODER_FEEDRATE_DEADZONE 4
@ -443,10 +443,10 @@
// https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection
#if ENABLED(FF_INTERFACEBOARD)
#define SR_LCD_3W_NL // Non latching 3 wire shift register
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#elif ENABLED(SAV_3DLCD)
#define SR_LCD_2W_NL // Non latching 2 wire shift register
#define IS_ULTIPANEL
#define IS_ULTIPANEL 1
#endif
#if ENABLED(IS_ULTIPANEL)

2
Marlin/src/lcd/menu/menu_motion.cpp

@ -192,7 +192,7 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
#if E_MANUAL
inline void _goto_menu_move_distance_e() {
ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(); }, -1); });
ui.goto_screen([]{ _menu_move_distance(E_AXIS, []{ lcd_move_e(TERN_(MULTI_MANUAL, active_extruder)); }, -1); });
}
inline void _menu_move_distance_e_maybe() {

8
Marlin/src/module/mks_wifi/mks_wifi_gcodes.cpp

@ -102,6 +102,14 @@ void mks_m23(char *filename){
DEBUG("M23: %s",filename);
if(filename[0] == '/'){
DEBUG("Strip slash");
for(uint32_t i = 0; i < strlen(filename) ; i++){
filename[i] = filename[i+1];
}
DEBUG("Fixed name: %s",filename);
}
//Имя файла может быть меньше 12 символов, но с расширением .gcode
//С конца имени файла шагаем к началу, считаем сколько символов до точки
dot_pos=0;

8
Marlin/src/module/motion.cpp

@ -1466,10 +1466,12 @@ void set_axis_never_homed(const AxisEnum axis) {
effectorBackoutDir, // Direction in which the effector mm coordinates move away from endstop.
stepperBackoutDir; // Direction in which the TMC µstep count(phase) move away from endstop.
#define PHASE_PER_MICROSTEP(N) (256 / _MAX(1, N##_MICROSTEPS))
switch (axis) {
#ifdef X_MICROSTEPS
case X_AXIS:
phasePerUStep = 256 / (X_MICROSTEPS);
phasePerUStep = PHASE_PER_MICROSTEP(X);
phaseCurrent = stepperX.get_microstep_counter();
effectorBackoutDir = -X_HOME_DIR;
stepperBackoutDir = INVERT_X_DIR ? effectorBackoutDir : -effectorBackoutDir;
@ -1477,7 +1479,7 @@ void set_axis_never_homed(const AxisEnum axis) {
#endif
#ifdef Y_MICROSTEPS
case Y_AXIS:
phasePerUStep = 256 / (Y_MICROSTEPS);
phasePerUStep = PHASE_PER_MICROSTEP(Y);
phaseCurrent = stepperY.get_microstep_counter();
effectorBackoutDir = -Y_HOME_DIR;
stepperBackoutDir = INVERT_Y_DIR ? effectorBackoutDir : -effectorBackoutDir;
@ -1485,7 +1487,7 @@ void set_axis_never_homed(const AxisEnum axis) {
#endif
#ifdef Z_MICROSTEPS
case Z_AXIS:
phasePerUStep = 256 / (Z_MICROSTEPS);
phasePerUStep = PHASE_PER_MICROSTEP(Z);
phaseCurrent = stepperZ.get_microstep_counter();
effectorBackoutDir = -Z_HOME_DIR;
stepperBackoutDir = INVERT_Z_DIR ? effectorBackoutDir : -effectorBackoutDir;

3
Marlin/src/module/stepper.cpp

@ -2261,7 +2261,6 @@ uint32_t Stepper::block_phase_isr() {
interval = LA_isr_rate;
}
else if (step_events_completed < decelerate_after && LA_current_adv_steps < LA_max_adv_steps) {
//step_events_completed <= (uint32_t)accelerate_until) {
LA_steps++;
LA_current_adv_steps++;
interval = LA_isr_rate;
@ -2272,6 +2271,8 @@ uint32_t Stepper::block_phase_isr() {
else
interval = LA_ADV_NEVER;
if (!LA_steps) return interval; // Leave pins alone if there are no steps!
DIR_WAIT_BEFORE();
#if ENABLED(MIXING_EXTRUDER)

8
Marlin/src/module/temperature.cpp

@ -1668,12 +1668,12 @@ void Temperature::updateTemperaturesFromRawValues() {
#endif
#define INIT_FAN_PIN(P) do{ _INIT_FAN_PIN(P); SET_FAST_PWM_FREQ(P); }while(0)
#if EXTRUDER_AUTO_FAN_SPEED != 255
#define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0)
#define INIT_E_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0)
#else
#define INIT_E_AUTO_FAN_PIN(P) SET_OUTPUT(P)
#endif
#if CHAMBER_AUTO_FAN_SPEED != 255
#define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(FAST_PWM_FAN_FREQUENCY); } else SET_OUTPUT(P); }while(0)
#define INIT_CHAMBER_AUTO_FAN_PIN(P) do{ if (P == FAN1_PIN || P == FAN2_PIN) { SET_PWM(P); SET_FAST_PWM_FREQ(P); } else SET_OUTPUT(P); }while(0)
#else
#define INIT_CHAMBER_AUTO_FAN_PIN(P) SET_OUTPUT(P)
#endif
@ -1702,10 +1702,10 @@ void Temperature::init() {
#endif
// Thermistor activation by MCU pin
#if PIN_EXISTS(TEMP_0_TR_ENABLE_PIN)
#if PIN_EXISTS(TEMP_0_TR_ENABLE)
OUT_WRITE(TEMP_0_TR_ENABLE_PIN, ENABLED(HEATER_0_USES_MAX6675));
#endif
#if PIN_EXISTS(TEMP_1_TR_ENABLE_PIN)
#if PIN_EXISTS(TEMP_1_TR_ENABLE)
OUT_WRITE(TEMP_1_TR_ENABLE_PIN, ENABLED(HEATER_1_USES_MAX6675));
#endif

10
Marlin/src/sd/cardreader.cpp

@ -659,11 +659,11 @@ bool CardReader::fileExists(const char * const path) {
if (!isMounted()) return false;
SdFile *diveDir = nullptr;
const char * const fname = diveToFile(false, diveDir, path);
if (fname) {
diveDir->rewind();
selectByName(*diveDir, fname);
diveDir->close();
}
// if (fname) {
// diveDir->rewind();
// selectByName(*diveDir, fname);
// //diveDir->close();
// }
return fname != nullptr;
}

26
README.md

@ -6,6 +6,8 @@
Прошивка работает на принтерах Flying Bear Ghost 4S и 5. Экран работает. WIFI работает.
Если у вас есть какие-то вопросы по настройке прошивки или по ее использованию, вы можете задать свой вопрос в [telegram группе](https://t.me/Ghostbustersss).
## MKS WIFI модуль
### Работает
@ -98,9 +100,29 @@
### BLTouch
В прошивке по-умолчанию включена поддержка Bltouch. Парковка стола по оси Z настроена по стандартному концевику (а не по датчику), поэтому если у вас нет датчика, то мешать это не будет. Просто не трогайте настройки Z Offset (должно быть 0).
Bltouch отключен. [О подключении Bltouch](https://sergey1560.github.io/fb4s_howto/bltouch/).
### Firmware retract
Без использования опции "firmware retract" слайсер делает ретракты командами движения G1. В том месте, где нужно выполнить ректракт вставляются команды:
```
G1 E-2 F2100 ; "Откатить" 2мм со скоростью 35мм/с (2100 мм/мин)
команды движения
G1 E2 F2100 ; Вернуть обратно 2мм со скоростью 35мм/с (2100 мм/мин)
```
Для ректрактов в Marlin поддерживаются специальные команды - [G10](https://marlinfw.org/docs/gcode/G010.html) и [G11](https://marlinfw.org/docs/gcode/G011.html). В слайсере нужно включить поддержку firmware retract и тогда в том месте, где нужно "откатить" пластик будет вставлена команда G10, а там, где нужно его вернуть G11. Если никакие дополнительные параметры не установлены, будут использованы параметры из прошивки (2мм, 35мм/с).
Установить параметры можно командами [M207](https://marlinfw.org/docs/gcode/M207.html) и [M208](https://marlinfw.org/docs/gcode/M208.html).
Для того, чтобы можно было настраивать ретракт в слайсере, в стартовый код нужно добавить M207. Как правило, слайсеры позволяют добавить макрос в качестве параметров команды.
Firmware retract позволяет изменять значения ректракта из меню принтера прямо во время печати.
В Marlin есть функция автоматического распознования ректрактов командами G1 и замена их на G10/G11. Это функция отключена.
Если в слайсере не включена поддержка firmware retract, все будет работать как обычно.
Прошивка настроена на подключение датчика к разъему ZMax (концевик датчика) и PB2 (управление сервой). Подробнее о [подключении Bltouch](https://sergey1560.github.io/fb4s_howto/bltouch/).
### Драйвера TMC2209

Loading…
Cancel
Save