Skip to content

Commit

Permalink
Merge pull request #14 from MarlinFirmware/bugfix-2.0.x
Browse files Browse the repository at this point in the history
Bugfix 2.0.x
  • Loading branch information
Serhiy-K authored Oct 17, 2020
2 parents dacfcda + 263f29a commit 7a647e5
Show file tree
Hide file tree
Showing 224 changed files with 960 additions and 889 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
- STM32F103RET6_creality
- LERDGEX
- mks_robin_nano35
- NUCLEO_F767ZI

# Put lengthy tests last

Expand Down
91 changes: 76 additions & 15 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* Advanced settings can be found in Configuration_adv.h
*/
#define CONFIGURATION_H_VERSION 020007
#define CONFIGURATION_H_VERSION 020008

//===========================================================================
//============================= Getting Started =============================
Expand Down Expand Up @@ -2205,22 +2205,83 @@
//=============================================================================

/**
* TFT Type - Select your Display type
*
* Available options are:
* MKS_TS35_V2_0,
* MKS_ROBIN_TFT24, MKS_ROBIN_TFT28, MKS_ROBIN_TFT32, MKS_ROBIN_TFT35,
* MKS_ROBIN_TFT43, MKS_ROBIN_TFT_V1_1R
* TFT_TRONXY_X5SA, ANYCUBIC_TFT35, LONGER_LK_TFT28
* TFT_GENERIC
*
* For TFT_GENERIC, you need to configure these 3 options:
* Driver: TFT_DRIVER
* Current Drivers are: AUTO, ST7735, ST7789, ST7796, R61505, ILI9328, ILI9341, ILI9488
* Resolution: TFT_WIDTH and TFT_HEIGHT
* Interface: TFT_INTERFACE_FSMC or TFT_INTERFACE_SPI
* Specific TFT Model Presets. Enable one of the following options
* or enable TFT_GENERIC and set sub-options.
*/

//
// 480x320, 3.5", SPI Display From MKS
// Normally used in MKS Robin Nano V2
//
//#define MKS_TS35_V2_0

//
// 320x240, 2.4", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT24

//
// 320x240, 2.8", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT28

//
// 320x240, 3.2", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT32

//
// 480x320, 3.5", FSMC Display From MKS
// Normally used in MKS Robin Nano V1.2
//
//#define MKS_ROBIN_TFT35

//
// 480x272, 4.3", FSMC Display From MKS
//
//#define MKS_ROBIN_TFT43

//
// 320x240, 3.2", FSMC Display From MKS
// Normally used in MKS Robin
//
//#define MKS_ROBIN_TFT_V1_1R

//
// 480x320, 3.5", FSMC Stock Display from TronxXY
//
//#define TFT_TRONXY_X5SA

//
// 480x320, 3.5", FSMC Stock Display from AnyCubic
//
//#define ANYCUBIC_TFT35

//
// 320x240, 2.8", FSMC Stock Display from Longer/Alfawise
//
//#define LONGER_LK_TFT28

//
// Generic TFT with detailed options
//
//#define TFT_GENERIC
#if ENABLED(TFT_GENERIC)
// :[ 'AUTO', 'ST7735', 'ST7789', 'ST7796', 'R61505', 'ILI9328', 'ILI9341', 'ILI9488' ]
#define TFT_DRIVER AUTO

// Interface. Enable one of the following options:
//#define TFT_INTERFACE_FSMC
//#define TFT_INTERFACE_SPI

// TFT Resolution. Enable one of the following options:
//#define TFT_RES_320x240
//#define TFT_RES_480x272
//#define TFT_RES_480x320
#endif

/**
* TFT UI - User Interface Selection. Enable one of the following options:
Expand Down
8 changes: 4 additions & 4 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* Basic settings can be found in Configuration.h
*/
#define CONFIGURATION_ADV_H_VERSION 020007
#define CONFIGURATION_ADV_H_VERSION 020008

//===========================================================================
//============================= Thermal Settings ============================
Expand Down Expand Up @@ -1048,10 +1048,10 @@

// @section lcd

#if EITHER(ULTIPANEL, EXTENSIBLE_UI)
#if EITHER(IS_ULTIPANEL, EXTENSIBLE_UI)
#define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 2*60 } // (mm/min) Feedrates for manual moves along X, Y, Z, E from panel
#define SHORT_MANUAL_Z_MOVE 0.025 // (mm) Smallest manual Z move (< 0.1mm)
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define MANUAL_E_MOVES_RELATIVE // Display extruder move distance rather than "position"
#define ULTIPANEL_FEEDMULTIPLY // Encoder sets the feedrate multiplier on the Status Screen
#endif
Expand Down Expand Up @@ -2958,7 +2958,7 @@
* This allows the laser to keep in perfect sync with the planner and removes
* the powerup/down delay since lasers require negligible time.
*/
#define LASER_POWER_INLINE
//#define LASER_POWER_INLINE

#if ENABLED(LASER_POWER_INLINE)
/**
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/DUE/dogm/u8g_com_HAL_DUE_st7920_sw_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_va
}

#if ENABLED(LIGHTWEIGHT_UI)
#include "../../../lcd/ultralcd.h"
#include "../../../lcd/marlinui.h"
#include "../../shared/HAL_ST7920.h"

#define ST7920_CS_PIN LCD_PINS_RS
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/LPC1768/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static_assert(!(NUM_SERVOS && ENABLED(FAST_PWM_FAN)), "BLTOUCH and Servos are in
//#endif

#if MB(RAMPS_14_RE_ARM_EFB, RAMPS_14_RE_ARM_EEB, RAMPS_14_RE_ARM_EFF, RAMPS_14_RE_ARM_EEF, RAMPS_14_RE_ARM_SF)
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
#if IS_RRD_FG_SC && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
#error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 requires TMC_USE_SW_SPI."
#endif
#endif
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/HAL/SAMD51/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@

// MYSERIAL0 required before MarlinSerial includes!

#define _MSERIAL(X) Serial##X
#define __MSERIAL(X) Serial##X
#define _MSERIAL(X) __MSERIAL(X)
#define MSERIAL(X) _MSERIAL(INCREMENT(X))

#if SERIAL_PORT == -1
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/HAL/STM32F1/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const uint8_t adc_pins[] = {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
FILWIDTH_PIN,
#endif
#if ENABLED(ADC_KEYPAD)
#if HAS_ADC_BUTTONS
ADC_KEYPAD_PIN,
#endif
#if HAS_JOY_ADC_X
Expand Down Expand Up @@ -187,7 +187,7 @@ enum TempPinIndex : char {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
FILWIDTH,
#endif
#if ENABLED(ADC_KEYPAD)
#if HAS_ADC_BUTTONS
ADC_KEY,
#endif
#if HAS_JOY_ADC_X
Expand Down Expand Up @@ -389,7 +389,7 @@ void HAL_adc_start_conversion(const uint8_t adc_pin) {
#if ENABLED(FILAMENT_WIDTH_SENSOR)
case FILWIDTH_PIN: pin_index = FILWIDTH; break;
#endif
#if ENABLED(ADC_KEYPAD)
#if HAS_ADC_BUTTONS
case ADC_KEYPAD_PIN: pin_index = ADC_KEY; break;
#endif
#if ENABLED(POWER_MONITOR_CURRENT)
Expand Down
7 changes: 7 additions & 0 deletions Marlin/src/HAL/STM32F1/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,10 @@
#if ENABLED(NEOPIXEL_LED)
#error "NEOPIXEL_LED (Adafruit NeoPixel) is not supported for HAL/STM32F1. Comment out this line to proceed at your own risk!"
#endif

// Emergency Parser needs at least one serial with HardwareSerial or USBComposite.
// The USBSerial maple don't allow any hook to implement EMERGENCY_PARSER.
// And copy all USBSerial code to marlin space to support EMERGENCY_PARSER, when we have another options, don't worth it.
#if ENABLED(EMERGENCY_PARSER) && !defined(USE_USB_COMPOSITE) && ((SERIAL_PORT == -1 && !defined(SERIAL_PORT_2)) || (SERIAL_PORT_2 == -1 && !defined(SERIAL_PORT)))
#error "EMERGENCY_PARSER is only supported by HardwareSerial or USBComposite in HAL/STM32F1."
#endif
2 changes: 1 addition & 1 deletion Marlin/src/MarlinCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

#include "sd/cardreader.h"

#include "lcd/ultralcd.h"
#include "lcd/marlinui.h"
#if HAS_TOUCH_XPT2046
#include "lcd/touch/touch_buttons.h"
#endif
Expand Down
4 changes: 3 additions & 1 deletion Marlin/src/core/macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
#define _DO_12(W,C,A,V...) (_##W##_1(A) C _DO_11(W,C,V))
#define __DO_N(W,C,N,V...) _DO_##N(W,C,V)
#define _DO_N(W,C,N,V...) __DO_N(W,C,N,V)
#define DO(W,C,V...) _DO_N(W,C,NUM_ARGS(V),V)
#define DO(W,C,V...) (_DO_N(W,C,NUM_ARGS(V),V))

// Macros to support option testing
#define _CAT(a,V...) a##V
Expand All @@ -186,6 +186,7 @@
#define _DIS_1(O) NOT(_ENA_1(O))
#define ENABLED(V...) DO(ENA,&&,V)
#define DISABLED(V...) DO(DIS,&&,V)
#define COUNT_ENABLED(V...) DO(ENA,+,V)

#define TERN(O,A,B) _TERN(_ENA_1(O),B,A) // OPTION converted to '0' or '1'
#define TERN0(O,A) _TERN(_ENA_1(O),0,A) // OPTION converted to A or '0'
Expand All @@ -200,6 +201,7 @@
#define ALL(V...) ENABLED(V)
#define BOTH(V1,V2) ALL(V1,V2)
#define EITHER(V1,V2) ANY(V1,V2)
#define MANY(V...) (COUNT_ENABLED(V) > 1)

// Macros to support pins/buttons exist testing
#define PIN_EXISTS(PN) (defined(PN##_PIN) && PN##_PIN >= 0)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/bedlevel/bedlevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#endif

#if ENABLED(LCD_BED_LEVELING)
#include "../../lcd/ultralcd.h"
#include "../../lcd/marlinui.h"
#endif

#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/bedlevel/ubl/ubl.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class unified_bed_leveling {
static int g29_grid_size;
#endif

#if ENABLED(NEWPANEL)
#if IS_NEWPANEL
static void move_z_with_encoder(const float &multiplier);
static float measure_point_with_encoder();
static float measure_business_card_thickness(float in_height);
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "../../../HAL/shared/eeprom_api.h"
#include "../../../libs/hex_print.h"
#include "../../../module/settings.h"
#include "../../../lcd/ultralcd.h"
#include "../../../lcd/marlinui.h"
#include "../../../module/stepper.h"
#include "../../../module/planner.h"
#include "../../../module/motion.h"
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/cancel_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include "cancel_object.h"
#include "../gcode/gcode.h"
#include "../lcd/ultralcd.h"
#include "../lcd/marlinui.h"

CancelObject cancelable;

Expand Down
1 change: 1 addition & 0 deletions Marlin/src/feature/e_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

// Static data members
bool EmergencyParser::killed_by_M112, // = false
EmergencyParser::quickstop_by_M410,
EmergencyParser::enabled;

#if ENABLED(HOST_PROMPT_SUPPORT)
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/feature/e_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class EmergencyParser {
};

static bool killed_by_M112;
static bool quickstop_by_M410;

#if ENABLED(HOST_PROMPT_SUPPORT)
static uint8_t M876_reason;
Expand Down Expand Up @@ -168,7 +169,7 @@ class EmergencyParser {
if (enabled) switch (state) {
case EP_M108: wait_for_user = wait_for_heatup = false; break;
case EP_M112: killed_by_M112 = true; break;
case EP_M410: quickstop_stepper(); break;
case EP_M410: quickstop_by_M410 = true; break;
#if ENABLED(HOST_PROMPT_SUPPORT)
case EP_M876SN: host_response_handler(M876_reason); break;
#endif
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/hotend_idle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include "../module/temperature.h"
#include "../module/motion.h"
#include "../lcd/ultralcd.h"
#include "../lcd/marlinui.h"

extern HotendIdleProtection hotend_idle;

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/mmu2/mmu2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
MMU2 mmu2;

#include "../../gcode/gcode.h"
#include "../../lcd/ultralcd.h"
#include "../../lcd/marlinui.h"
#include "../../libs/buzzer.h"
#include "../../libs/nozzle.h"
#include "../../module/temperature.h"
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/feature/password/password.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
#pragma once

#include "../../lcd/ultralcd.h"
#include "../../lcd/marlinui.h"

class Password {
public:
Expand Down
Loading

0 comments on commit 7a647e5

Please sign in to comment.