Skip to content

Commit

Permalink
Merge pull request MarlinFirmware#3 from MarlinFirmware/2.0.x
Browse files Browse the repository at this point in the history
Update to current
  • Loading branch information
porlock authored Apr 1, 2020
2 parents d6e767e + 015c4e6 commit a57a685
Show file tree
Hide file tree
Showing 980 changed files with 20,148 additions and 17,694 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/test-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,31 @@ jobs:
- DUE
- esp32
- linux_native
- megaatmega2560
- mega2560
- teensy31
- teensy35
- SAMD51_grandcentral_m4

# Extended AVR Environments

- FYSETC_F6_13
- megaatmega1280
- mega1280
- rambo
- sanguino_atmega1284p
- sanguino_atmega644p
- sanguino1284p
- sanguino644p

# Extended STM32 Environments

- STM32F103RC_bigtree
- STM32F103RC_bigtree_USB
- STM32F103RE_bigtree
- STM32F103RE_bigtree_USB
- STM32F103RC_btt
- STM32F103RC_btt_USB
- STM32F103RE_btt
- STM32F103RE_btt_USB
- STM32F103RC_fysetc
- jgaurora_a5s_a1
- STM32F103VE_longer
- STM32F407VE_black
- BIGTREE_SKR_PRO
- BIGTREE_GTR_V1_0
- mks_robin
- ARMED
- FYSETC_S6
Expand Down
18 changes: 13 additions & 5 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Advanced settings can be found in Configuration_adv.h
*
*/
#define CONFIGURATION_H_VERSION 020004
#define CONFIGURATION_H_VERSION 020005

//===========================================================================
//============================= Getting Started =============================
Expand Down Expand Up @@ -99,6 +99,7 @@
/**
* Select the serial port on the board to use for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port -1 is the USB emulated serial port, if available.
* Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader.
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
Expand All @@ -107,9 +108,6 @@

/**
* Select a secondary serial port on the board to use for communication with the host.
* This allows the connection of wireless adapters (for instance) to non-default port pins.
* Serial port -1 is the USB emulated serial port, if available.
*
* :[-1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
//#define SERIAL_PORT_2 -1
Expand Down Expand Up @@ -363,6 +361,7 @@
* 331 : (3.3V scaled thermistor 1 table for MEGA)
* 332 : (3.3V scaled thermistor 1 table for DUE)
* 2 : 200k thermistor - ATC Semitec 204GT-2 (4.7k pullup)
* 202 : 200k thermistor - Copymaster 3D
* 3 : Mendel-parts thermistor (4.7k pullup)
* 4 : 10k thermistor !! do not use it for a hotend. It gives bad resolution at high temp. !!
* 5 : 100K thermistor - ATC Semitec 104GT-2/104NT-4-R025H42G (Used in ParCan & J-Head) (4.7k pullup)
Expand Down Expand Up @@ -474,7 +473,7 @@
#if ENABLED(PIDTEMP)
//#define PID_EDIT_MENU // Add PID editing to the "Advanced Settings" menu. (~700 bytes of PROGMEM)
//#define PID_AUTOTUNE_MENU // Add PID auto-tuning to the "Advanced Settings" menu. (~250 bytes of PROGMEM)
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_DEBUG // Sends debug data to the serial port. Use 'M303 D' to toggle activation.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
//#define PID_PARAMS_PER_HOTEND // Uses separate PID parameters for each extruder (useful for mismatched extruders)
Expand Down Expand Up @@ -925,6 +924,14 @@
#define SMART_EFFECTOR_MOD_PIN -1 // Connect a GPIO pin to the Smart Effector MOD pin
#endif

/**
* Use StallGuard2 to probe the bed with the nozzle.
* Requires stallGuard-capable Trinamic stepper drivers.
* CAUTION: This can damage machines with Z lead screws.
* Take extreme care when setting up this feature.
*/
//#define SENSORLESS_PROBING

//
// For Z_PROBE_ALLEN_KEY see the Delta example configurations.
//
Expand Down Expand Up @@ -1438,6 +1445,7 @@
//#define EEPROM_SETTINGS // Persistent storage with M500 and M501
//#define DISABLE_M503 // Saves ~2700 bytes of PROGMEM. Disable for release!
#define EEPROM_CHITCHAT // Give feedback on EEPROM commands. Disable to save PROGMEM.
#define EEPROM_BOOT_SILENT // Keep M503 quiet and only give errors during first load
#if ENABLED(EEPROM_SETTINGS)
//#define EEPROM_AUTO_INIT // Init EEPROM automatically on any errors.
#endif
Expand Down
92 changes: 54 additions & 38 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* Basic settings can be found in Configuration.h
*
*/
#define CONFIGURATION_ADV_H_VERSION 020004
#define CONFIGURATION_ADV_H_VERSION 020005

// @section temperature

Expand Down Expand Up @@ -276,8 +276,10 @@
#define AUTOTEMP_OLDWEIGHT 0.98
#endif

// Show extra position information with 'M114 D'
//#define M114_DETAIL
// Extra options for the M114 "Current Position" report
//#define M114_DETAIL // Use 'M114` for details to check planner calculations
//#define M114_REALTIME // Real current position based on forward kinematics
//#define M114_LEGACY // M114 used to synchronize on every call. Enable if needed.

// Show Temperature ADC value
// Enable for M105 to include ADC values read from temperature sensors.
Expand Down Expand Up @@ -336,15 +338,22 @@
* Controller Fan
* To cool down the stepper drivers and MOSFETs.
*
* The fan will turn on automatically whenever any stepper is enabled
* and turn off after a set period after all steppers are turned off.
* The fan turns on automatically whenever any driver is enabled and turns
* off (or reduces to idle speed) shortly after drivers are turned off.
*
*/
//#define USE_CONTROLLER_FAN
#if ENABLED(USE_CONTROLLER_FAN)
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
#define CONTROLLERFAN_SECS 60 // Duration in seconds for the fan to run after all motors are disabled
#define CONTROLLERFAN_SPEED 255 // 255 == full speed
//#define CONTROLLERFAN_SPEED_Z_ONLY 127 // Reduce noise on machines that keep Z enabled
//#define CONTROLLER_FAN_PIN -1 // Set a custom pin for the controller fan
//#define CONTROLLER_FAN_USE_Z_ONLY // With this option only the Z axis is considered
#define CONTROLLERFAN_SPEED_MIN 0 // (0-255) Minimum speed. (If set below this value the fan is turned off.)
#define CONTROLLERFAN_SPEED_ACTIVE 255 // (0-255) Active speed, used when any motor is enabled
#define CONTROLLERFAN_SPEED_IDLE 0 // (0-255) Idle speed, used when motors are disabled
#define CONTROLLERFAN_IDLE_TIME 60 // (seconds) Extra time to keep the fan running after disabling motors
//#define CONTROLLER_FAN_EDITABLE // Enable M710 configurable settings
#if ENABLED(CONTROLLER_FAN_EDITABLE)
#define CONTROLLER_FAN_MENU // Enable the Controller Fan submenu
#endif
#endif

// When first starting the main fan, run it at full speed for the
Expand Down Expand Up @@ -716,6 +725,9 @@
#define Z_STEPPER_ALIGN_ITERATIONS 5 // Number of iterations to apply during alignment
#define Z_STEPPER_ALIGN_ACC 0.02 // Stop iterating early if the accuracy is better than this
#define RESTORE_LEVELING_AFTER_G34 // Restore leveling after G34 is done?
// After G34, re-home Z (G28 Z) or just calculate it from the last probe heights?
// Re-homing might be more precise in reproducing the actual 'G28 Z' homing height, especially on an uneven bed.
#define HOME_AFTER_G34
#endif

// @section motion
Expand Down Expand Up @@ -748,8 +760,12 @@
// Minimum time that a segment needs to take if the buffer is emptied
#define DEFAULT_MINSEGMENTTIME 20000 // (ms)

// If defined the movements slow down when the look ahead buffer is only half full
// Slow down the machine if the look ahead buffer is (by default) half full.
// Increase the slowdown divisor for larger buffer sizes.
#define SLOWDOWN
#if ENABLED(SLOWDOWN)
#define SLOWDOWN_DIVISOR 2
#endif

// Frequency limit
// See nophead's blog for more info
Expand Down Expand Up @@ -990,7 +1006,11 @@
// Show the E position (filament used) during printing
//#define LCD_SHOW_E_TOTAL

#if HAS_GRAPHICAL_LCD && HAS_PRINT_PROGRESS
#if ENABLED(SHOW_BOOTSCREEN)
#define BOOTSCREEN_TIMEOUT 4000 // (ms) Total Duration to display the boot screen(s)
#endif

#if HAS_GRAPHICAL_LCD && EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
//#define PRINT_PROGRESS_SHOW_DECIMALS // Show progress with decimal digits
//#define SHOW_REMAINING_TIME // Display estimated time to completion
#if ENABLED(SHOW_REMAINING_TIME)
Expand All @@ -999,7 +1019,7 @@
#endif
#endif

#if HAS_CHARACTER_LCD && HAS_PRINT_PROGRESS
#if HAS_CHARACTER_LCD && EITHER(SDSUPPORT, LCD_SET_PROGRESS_MANUALLY)
//#define LCD_PROGRESS_BAR // Show a progress bar on HD44780 LCDs for SD printing
#if ENABLED(LCD_PROGRESS_BAR)
#define PROGRESS_BAR_BAR_TIME 2000 // (ms) Amount of time to show the bar
Expand All @@ -1012,12 +1032,9 @@

#if ENABLED(SDSUPPORT)

// Some RAMPS and other boards don't detect when an SD card is inserted. You can work
// around this by connecting a push button or single throw switch to the pin defined
// as SD_DETECT_PIN in your board's pins definitions.
// This setting should be disabled unless you are using a push button, pulling the pin to ground.
// Note: This is always disabled for ULTIPANEL (except ELB_FULL_GRAPHIC_CONTROLLER).
#define SD_DETECT_INVERTED
// 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.
//#define SD_DETECT_STATE HIGH

#define SD_FINISHED_STEPPERRELEASE true // Disable steppers when SD Print is finished
#define SD_FINISHED_RELEASECOMMAND "M84 X Y Z E" // You might want to keep the Z enabled so your bed stays in place.
Expand All @@ -1032,16 +1049,24 @@

#define EVENT_GCODE_SD_STOP "G28XY" // G-code to run on Stop Print (e.g., "G28XY" or "G27")

#if ENABLED(PRINTER_EVENT_LEDS)
#define PE_LEDS_COMPLETED_TIME (30*60) // (seconds) Time to keep the LED "done" color before restoring normal illumination
#endif

/**
* Continue after Power-Loss (Creality3D)
*
* Store the current state to the SD Card at the start of each layer
* during SD printing. If the recovery file is found at boot time, present
* an option on the LCD screen to continue the print from the last-known
* point in the file.
*
* If the machine reboots when resuming a print you may need to replace or
* reformat the SD card. (Bad sectors delay startup triggering the watchdog.)
*/
//#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
//#define POWER_LOSS_ZRAISE 2 // (mm) Z axis raise on resume (on power loss with UPS)
//#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
Expand Down Expand Up @@ -1221,10 +1246,6 @@
// Western only. Not available for Cyrillic, Kana, Turkish, Greek, or Chinese.
//#define USE_SMALL_INFOFONT

// Enable this option and reduce the value to optimize screen updates.
// The normal delay is 10µs. Use the lowest value that still gives a reliable display.
//#define DOGM_SPI_DELAY_US 5

// Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE

Expand All @@ -1241,6 +1262,10 @@
* This will prevent position updates from being displayed.
*/
#if ENABLED(U8GLIB_ST7920)
// Enable this option and reduce the value to optimize screen updates.
// The normal delay is 10µs. Use the lowest value that still gives a reliable display.
//#define DOGM_SPI_DELAY_US 5

//#define LIGHTWEIGHT_UI
#if ENABLED(LIGHTWEIGHT_UI)
#define STATUS_EXPIRE_SECONDS 20
Expand Down Expand Up @@ -1278,24 +1303,23 @@
// Additional options for DGUS / DWIN displays
//
#if HAS_DGUS_LCD
#define DGUS_SERIAL_PORT 2
#define DGUS_SERIAL_PORT 3
#define DGUS_BAUDRATE 115200

#define DGUS_RX_BUFFER_SIZE 128
#define DGUS_TX_BUFFER_SIZE 48
//#define DGUS_SERIAL_STATS_RX_BUFFER_OVERRUNS // Fix Rx overrun situation (Currently only for AVR)

#define DGUS_UPDATE_INTERVAL_MS 500 // (ms) Interval between automatic screen updates
#define BOOTSCREEN_TIMEOUT 3000 // (ms) Duration to display the boot screen

#if EITHER(DGUS_LCD_UI_FYSETC, DGUS_LCD_UI_HIPRECY)
#define DGUS_PRINT_FILENAME // Display the filename during printing
#define DGUS_PREHEAT_UI // Display a preheat screen during heatup

#if ENABLED(DGUS_LCD_UI_FYSETC)
//#define DUGS_UI_MOVE_DIS_OPTION // Disabled by default for UI_FYSETC
//#define DGUS_UI_MOVE_DIS_OPTION // Disabled by default for UI_FYSETC
#else
#define DUGS_UI_MOVE_DIS_OPTION // Enabled by default for UI_HIPRECY
#define DGUS_UI_MOVE_DIS_OPTION // Enabled by default for UI_HIPRECY
#endif

#define DGUS_FILAMENT_LOADUNLOAD
Expand Down Expand Up @@ -1578,7 +1602,7 @@
#if ENABLED(PROBE_TEMP_COMPENSATION)
// Max temperature that can be reached by heated bed.
// This is required only for the calibration process.
#define PTC_MAX_BED_TEMP 110
#define PTC_MAX_BED_TEMP BED_MAXTEMP

// Park position to wait for probe cooldown
#define PTC_PARK_POS_X 0.0F
Expand Down Expand Up @@ -2015,7 +2039,7 @@
* TMCStepper library is required to use TMC stepper drivers.
* https://github.com/teemuatlut/TMCStepper
*/
#if HAS_TRINAMIC
#if HAS_TRINAMIC_CONFIG

#define HOLD_MULTIPLIER 0.5 // Scales down the holding current from run current
#define INTERPOLATE true // Interpolate X/Y/Z_MICROSTEPS to 256
Expand Down Expand Up @@ -2302,14 +2326,6 @@
*/
//#define SENSORLESS_HOMING // StallGuard capable drivers only

/**
* Use StallGuard2 to probe the bed with the nozzle.
*
* CAUTION: This could cause damage to machines that use a lead screw or threaded rod
* to move the Z axis. Take extreme care when attempting to enable this feature.
*/
//#define SENSORLESS_PROBING // StallGuard capable drivers only

#if EITHER(SENSORLESS_HOMING, SENSORLESS_PROBING)
// TMC2209: 0...255. TMC2130: -64...63
#define X_STALL_SENSITIVITY 8
Expand Down Expand Up @@ -2345,7 +2361,7 @@
*/
#define TMC_ADV() { }

#endif // HAS_TRINAMIC
#endif // HAS_TRINAMIC_CONFIG

// @section L64XX

Expand Down Expand Up @@ -2991,7 +3007,7 @@
#define MAX7219_LOAD_PIN 44

//#define MAX7219_GCODE // Add the M7219 G-code to control the LED matrix
#define MAX7219_INIT_TEST 2 // Do a test pattern at initialization (Set to 2 for spiral)
#define MAX7219_INIT_TEST 2 // Test pattern at startup: 0=none, 1=sweep, 2=spiral
#define MAX7219_NUMBER_UNITS 1 // Number of Max7219 units in chain.
#define MAX7219_ROTATE 0 // Rotate the display clockwise (in multiples of +/- 90°)
// connector at: right=0 bottom=-90 top=90 left=180
Expand Down
2 changes: 2 additions & 0 deletions Marlin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ else ifeq ($(HARDWARE_MOTHERBOARD),1147)
else ifeq ($(HARDWARE_MOTHERBOARD),1148)
# MKS GEN L V2
else ifeq ($(HARDWARE_MOTHERBOARD),1149)
# Copymaster 3D
else ifeq ($(HARDWARE_MOTHERBOARD),1150)

#
# RAMBo and derivatives
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Marlin release version identifier
*/
//#define SHORT_BUILD_VERSION "2.0.4.4"
//#define SHORT_BUILD_VERSION "2.0.5.3"

/**
* Verbose version identifier which should contain a reference to the location
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void spiBegin() {
// output pin high - like sending 0xFF
WRITE(MOSI_PIN, HIGH);

for (uint8_t i = 0; i < 8; i++) {
LOOP_L_N(i, 8) {
WRITE(SCK_PIN, HIGH);

nop; // adjust so SCK is nice
Expand All @@ -224,7 +224,7 @@ void spiBegin() {
void spiSend(uint8_t data) {
// no interrupts during byte send - about 8µs
cli();
for (uint8_t i = 0; i < 8; i++) {
LOOP_L_N(i, 8) {
WRITE(SCK_PIN, LOW);
WRITE(MOSI_PIN, data & 0x80);
data <<= 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
// A SW memory barrier, to ensure GCC does not overoptimize loops
#define sw_barrier() asm volatile("": : :"memory");

#include "../../feature/emergency_parser.h"
#include "../../feature/e_parser.h"

// "Atomically" read the RX head index value without disabling interrupts:
// This MUST be called with RX interrupts enabled, and CAN'T be called
Expand Down Expand Up @@ -682,7 +682,7 @@

// Round correctly so that print(1.999, 2) prints as "2.00"
double rounding = 0.5;
for (uint8_t i = 0; i < digits; ++i) rounding *= 0.1;
LOOP_L_N(i, digits) rounding *= 0.1;
number += rounding;

// Extract the integer part of the number and print it
Expand Down
Loading

0 comments on commit a57a685

Please sign in to comment.