Skip to content

Commit

Permalink
Merge branch 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin
Browse files Browse the repository at this point in the history
… into bugfix-2.0.x

* 'bugfix-2.0.x' of https://github.com/MarlinFirmware/Marlin: (105 commits)
  [cron] Bump distribution date (2021-01-08)
  Fix M48 output (MarlinFirmware#20713)
  Improved MKS Robin support (MarlinFirmware#19333)
  Preheat before Power Loss Recovery homing (MarlinFirmware#20697)
  [cron] Bump distribution date (2021-01-07)
  Custom build_flags by feature (MarlinFirmware#20692)
  [cron] Bump distribution date (2021-01-06)
  Multi-Z stepper inverting (MarlinFirmware#20678)
  Fix Azteeg X3 macro typo (MarlinFirmware#20681)
  Define SANGUINOLOLU 1.1 enable pins (MarlinFirmware#20682)
  No BTN_ENC_EN on Anet 10 (MarlinFirmware#20684)
  Temperature report followup (MarlinFirmware#20687)
  Adjustable precision in M105 temperature report (MarlinFirmware#20602)
  Don't apply hotend_offset.z to Z soft endstops (MarlinFirmware#20675)
  Indent tool_change_prime
  Clarify solenoid active / magnet-on state
  Defer "quiet probing" till the last Z bump (MarlinFirmware#20610)
  Solenoid cleanups
  [cron] Bump distribution date (2021-01-05)
  Remove untranslated strings
  ...
  • Loading branch information
Susis Strolch committed Jan 8, 2021
2 parents 405c9c2 + 4e8d92b commit a4d7736
Show file tree
Hide file tree
Showing 333 changed files with 7,382 additions and 3,114 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

# Extended AVR Environments

- FYSETC_F6_13
- FYSETC_F6
- mega1280
- rambo
- sanguino1284p
Expand Down
28 changes: 12 additions & 16 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1104,11 +1104,6 @@
*/
//#define BLTOUCH

/**
* Pressure sensor with a BLTouch-like interface
*/
//#define CREALITY_TOUCH

/**
* Touch-MI Probe by hotends.fr
*
Expand Down Expand Up @@ -1352,7 +1347,7 @@
#define PROBING_STEPPERS_OFF // Turn steppers off (unless needed to hold position) when probing
#define DELAY_BEFORE_PROBING 500 // (ms) To prevent vibrations from triggering piezo sensors

// Require minimum nozzle and/or bed temperature for probing.
// Require minimum nozzle and/or bed temperature for probing
//#define PREHEAT_BEFORE_PROBING
#if ENABLED(PREHEAT_BEFORE_PROBING)
#define PROBING_NOZZLE_TEMP 120 // (°C) Only applies to E0 at this time
Expand Down Expand Up @@ -2129,16 +2124,6 @@
*/
#define SDSUPPORT

/**
* SD CARD: SPI SPEED
*
* Enable one of the following items for a slower SPI transfer speed.
* This may be required to resolve "volume init" errors.
*/
//#define SPI_SPEED SPI_HALF_SPEED
//#define SPI_SPEED SPI_QUARTER_SPEED
//#define SPI_SPEED SPI_EIGHTH_SPEED

/**
* SD CARD: ENABLE CRC
*
Expand Down Expand Up @@ -2669,6 +2654,16 @@
//
//#define LONGER_LK_TFT28

//
// 320x240, 2.8", FSMC Stock Display from ET4
//
//#define ANET_ET4_TFT28

//
// 480x320, 3.5", FSMC Stock Display from ET5
//
//#define ANET_ET5_TFT35

//
// Generic TFT with detailed options
//
Expand Down Expand Up @@ -2734,6 +2729,7 @@
//#define TOUCH_CALIBRATION_Y -8981
//#define TOUCH_OFFSET_X -43
//#define TOUCH_OFFSET_Y 257
//#define TOUCH_ORIENTATION TOUCH_LANDSCAPE

#if ENABLED(TFT_COLOR_UI)
//#define SINGLE_TOUCH_NAVIGATION
Expand Down
88 changes: 61 additions & 27 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@

//#define X_DUAL_STEPPER_DRIVERS
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
#define INVERT_X2_VS_X_DIR true // Set 'true' if X motors should rotate in opposite directions
//#define INVERT_X2_VS_X_DIR // Enable if X2 direction signal is opposite to X
//#define X_DUAL_ENDSTOPS
#if ENABLED(X_DUAL_ENDSTOPS)
#define X2_USE_ENDSTOP _XMAX_
Expand All @@ -590,7 +590,7 @@

//#define Y_DUAL_STEPPER_DRIVERS
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
#define INVERT_Y2_VS_Y_DIR true // Set 'true' if Y motors should rotate in opposite directions
//#define INVERT_Y2_VS_Y_DIR // Enable if Y2 direction signal is opposite to Y
//#define Y_DUAL_ENDSTOPS
#if ENABLED(Y_DUAL_ENDSTOPS)
#define Y2_USE_ENDSTOP _YMAX_
Expand All @@ -604,6 +604,11 @@
#define NUM_Z_STEPPER_DRIVERS 1 // (1-4) Z options change based on how many

#if NUM_Z_STEPPER_DRIVERS > 1
// Enable if Z motor direction signals are the opposite of Z1
//#define INVERT_Z2_VS_Z_DIR
//#define INVERT_Z3_VS_Z_DIR
//#define INVERT_Z4_VS_Z_DIR

//#define Z_MULTI_ENDSTOPS
#if ENABLED(Z_MULTI_ENDSTOPS)
#define Z2_USE_ENDSTOP _XMAX_
Expand Down Expand Up @@ -835,10 +840,10 @@
//#define ASSISTED_TRAMMING
#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 positions for probe points.
#define TRAMMING_POINT_XY { { 20, 20 }, { 180, 20 }, { 180, 180 }, { 20, 180 } }

// Define positions names for probing points.
// Define position names for probe points.
#define TRAMMING_POINT_NAME_1 "Front-Left"
#define TRAMMING_POINT_NAME_2 "Front-Right"
#define TRAMMING_POINT_NAME_3 "Back-Right"
Expand All @@ -847,8 +852,8 @@
#define RESTORE_LEVELING_AFTER_G35 // Enable to restore leveling setup after operation
//#define REPORT_TRAMMING_MM // Report Z deviation (mm) for each point relative to the first

//#define ASSISTED_TRAMMING_MENU_ITEM // Add a menu item to run G35 Assisted Tramming (MarlinUI)
//#define ASSISTED_TRAMMING_WIZARD // Make the menu item open a Tramming Wizard sub-menu
//#define ASSISTED_TRAMMING_WIZARD // Add a Tramming Wizard to the LCD menu

//#define ASSISTED_TRAMMING_WAIT_POSITION { X_CENTER, Y_CENTER, 30 } // Move the nozzle out of the way for adjustment

/**
Expand Down Expand Up @@ -1180,34 +1185,39 @@

#endif // HAS_LCD_MENU

// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING
#if HAS_DISPLAY
// The timeout (in ms) to return to the status screen from sub-menus
#define LCD_TIMEOUT_TO_STATUS 15000

// On the Info Screen, display XY with one decimal place when possible
#define LCD_DECIMAL_SMALL_XY
#if ENABLED(SHOW_BOOTSCREEN)
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
#if EITHER(HAS_MARLINUI_U8GLIB, TFT_COLOR_UI)
#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving lots of flash)
#endif
#endif

// The timeout (in ms) to return to the status screen from sub-menus
#define LCD_TIMEOUT_TO_STATUS 15000
// Scroll a longer status message into view
#define STATUS_MESSAGE_SCROLLING

// Add an 'M73' G-code to set the current percentage
//#define LCD_SET_PROGRESS_MANUALLY
// On the Info Screen, display XY with one decimal place when possible
#define LCD_DECIMAL_SMALL_XY

// Show the E position (filament used) during printing
//#define LCD_SHOW_E_TOTAL
// Add an 'M73' G-code to set the current percentage
//#define LCD_SET_PROGRESS_MANUALLY

#if ENABLED(SHOW_BOOTSCREEN)
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
// Show the E position (filament used) during printing
//#define LCD_SHOW_E_TOTAL
#endif

#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) && ANY(HAS_MARLINUI_U8GLIB, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
#if EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY) && ANY(HAS_MARLINUI_U8GLIB, HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL, EXTENSIBLE_UI)
#define SHOW_REMAINING_TIME // Display estimated time to completion
#if ENABLED(SHOW_REMAINING_TIME)
//#define USE_M73_REMAINING_TIME // Use remaining time from M73 command instead of estimation
//#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
#define ROTATE_PROGRESS_DISPLAY // Display (P)rogress, (E)lapsed, and (R)emaining time
#endif

#if HAS_MARLINUI_U8GLIB
//#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits
#if EITHER(HAS_MARLINUI_U8GLIB, EXTENSIBLE_UI)
#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits
#endif

#if EITHER(HAS_MARLINUI_HD44780, IS_TFTGLCD_PANEL)
Expand All @@ -1223,6 +1233,16 @@
#endif

#if ENABLED(SDSUPPORT)
/**
* SD Card SPI Speed
* May be required to resolve "volume init" errors.
*
* Enable and set to SPI_HALF_SPEED, SPI_QUARTER_SPEED, or SPI_EIGHTH_SPEED
* otherwise full speed will be applied.
*
* :['SPI_HALF_SPEED', 'SPI_QUARTER_SPEED', 'SPI_EIGHTH_SPEED']
*/
//#define SD_SPI_SPEED SPI_HALF_SPEED

// The standard SD detect circuit reads LOW when media is inserted and HIGH when empty.
// Enable this option and set to HIGH if your SD cards are incorrectly detected.
Expand Down Expand Up @@ -1370,9 +1390,6 @@
*/
//#define USB_FLASH_DRIVE_SUPPORT
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
#define USB_CS_PIN SDSS
#define USB_INTR_PIN SD_DETECT_PIN

/**
* USB Host Shield Library
*
Expand All @@ -1383,7 +1400,18 @@
* is less tested and is known to interfere with Servos.
* [1] This requires USB_INTR_PIN to be interrupt-capable.
*/
//#define USE_UHS2_USB
//#define USE_UHS3_USB

/**
* Native USB Host supported by some boards (USB OTG)
*/
//#define USE_OTG_USB_HOST

#if DISABLED(USE_OTG_USB_HOST)
#define USB_CS_PIN SDSS
#define USB_INTR_PIN SD_DETECT_PIN
#endif
#endif

/**
Expand Down Expand Up @@ -1497,7 +1525,6 @@
//#define STATUS_ALT_FAN_BITMAP // Use the alternative fan bitmap
//#define STATUS_FAN_FRAMES 3 // :[0,1,2,3,4] Number of fan animation frames
//#define STATUS_HEAT_PERCENT // Show heating in a progress bar
//#define BOOT_MARLIN_LOGO_SMALL // Show a smaller Marlin logo on the Boot Screen (saving 399 bytes of flash)
//#define BOOT_MARLIN_LOGO_ANIMATED // Animated Marlin logo. Costs ~‭3260 (or ~940) bytes of PROGMEM.

// Frivolous Game Options
Expand Down Expand Up @@ -1612,6 +1639,9 @@
//#define TOUCH_UI_UTF8_FRACTIONS // ¼ ½ ¾
//#define TOUCH_UI_UTF8_SYMBOLS // µ ¶ ¦ § ¬
#endif

// Cyrillic character set, costs about 27KiB of flash
//#define TOUCH_UI_UTF8_CYRILLIC_CHARSET
#endif

// Use a smaller font when labels don't fit buttons
Expand Down Expand Up @@ -1783,6 +1813,10 @@
//#define MESH_MAX_Y Y_BED_SIZE - (MESH_INSET)
#endif

#if BOTH(AUTO_BED_LEVELING_UBL, EEPROM_SETTINGS)
//#define OPTIMIZED_MESH_STORAGE // Store mesh with less precision to save EEPROM space
#endif

/**
* Repeatedly attempt G29 leveling until it succeeds.
* Stop after G29_MAX_RETRIES attempts.
Expand Down
4 changes: 2 additions & 2 deletions Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* has a distinct Github fork— the Source Code URL should just be the main
* Marlin repository.
*/
//#define SOURCE_CODE_URL "https://github.com/MarlinFirmware/Marlin"
//#define SOURCE_CODE_URL "github.com/MarlinFirmware/Marlin"

/**
* Default generic printer UUID.
Expand All @@ -65,7 +65,7 @@
* The WEBSITE_URL is the location where users can get more information such as
* documentation about a specific Marlin release.
*/
//#define WEBSITE_URL "https://marlinfw.org"
//#define WEBSITE_URL "marlinfw.org"

/**
* Set the vendor info the serial USB interface, if changable
Expand Down
28 changes: 14 additions & 14 deletions Marlin/src/HAL/AVR/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
#include "../../inc/MarlinConfig.h"

void spiBegin() {
OUT_WRITE(SS_PIN, HIGH);
SET_OUTPUT(SCK_PIN);
SET_INPUT(MISO_PIN);
SET_OUTPUT(MOSI_PIN);
OUT_WRITE(SD_SS_PIN, HIGH);
SET_OUTPUT(SD_SCK_PIN);
SET_INPUT(SD_MISO_PIN);
SET_OUTPUT(SD_MOSI_PIN);

#if DISABLED(SOFTWARE_SPI)
// SS must be in output mode even it is not chip select
//SET_OUTPUT(SS_PIN);
//SET_OUTPUT(SD_SS_PIN);
// set SS high - may be chip select for another SPI device
//#if SET_SPI_SS_HIGH
//WRITE(SS_PIN, HIGH);
//WRITE(SD_SS_PIN, HIGH);
//#endif
// set a default rate
spiInit(1);
Expand Down Expand Up @@ -195,19 +195,19 @@ void spiBegin() {
// no interrupts during byte receive - about 8µs
cli();
// output pin high - like sending 0xFF
WRITE(MOSI_PIN, HIGH);
WRITE(SD_MOSI_PIN, HIGH);

LOOP_L_N(i, 8) {
WRITE(SCK_PIN, HIGH);
WRITE(SD_SCK_PIN, HIGH);

nop; // adjust so SCK is nice
nop;

data <<= 1;

if (READ(MISO_PIN)) data |= 1;
if (READ(SD_MISO_PIN)) data |= 1;

WRITE(SCK_PIN, LOW);
WRITE(SD_SCK_PIN, LOW);
}

sei();
Expand All @@ -225,18 +225,18 @@ void spiBegin() {
// no interrupts during byte send - about 8µs
cli();
LOOP_L_N(i, 8) {
WRITE(SCK_PIN, LOW);
WRITE(MOSI_PIN, data & 0x80);
WRITE(SD_SCK_PIN, LOW);
WRITE(SD_MOSI_PIN, data & 0x80);
data <<= 1;
WRITE(SCK_PIN, HIGH);
WRITE(SD_SCK_PIN, HIGH);
}

nop; // hold SCK high for a few ns
nop;
nop;
nop;

WRITE(SCK_PIN, LOW);
WRITE(SD_SCK_PIN, LOW);

sei();
}
Expand Down
16 changes: 8 additions & 8 deletions Marlin/src/HAL/AVR/spi_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@
#define AVR_SS_PIN 16
#endif

#ifndef SCK_PIN
#define SCK_PIN AVR_SCK_PIN
#ifndef SD_SCK_PIN
#define SD_SCK_PIN AVR_SCK_PIN
#endif
#ifndef MISO_PIN
#define MISO_PIN AVR_MISO_PIN
#ifndef SD_MISO_PIN
#define SD_MISO_PIN AVR_MISO_PIN
#endif
#ifndef MOSI_PIN
#define MOSI_PIN AVR_MOSI_PIN
#ifndef SD_MOSI_PIN
#define SD_MOSI_PIN AVR_MOSI_PIN
#endif
#ifndef SS_PIN
#define SS_PIN AVR_SS_PIN
#ifndef SD_SS_PIN
#define SD_SS_PIN AVR_SS_PIN
#endif
Loading

0 comments on commit a4d7736

Please sign in to comment.