Skip to content

Commit

Permalink
Merge 'bugfix-2.0.x' into 2.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Feb 27, 2020
2 parents 1955eea + 9f8ee31 commit b29aae6
Show file tree
Hide file tree
Showing 129 changed files with 1,071 additions and 850 deletions.
2 changes: 2 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,8 @@
#define DEFAULT_YJERK 10.0
#define DEFAULT_ZJERK 0.3

//#define TRAVEL_EXTRA_XYJERK 0.0 // Additional jerk allowance for all travel moves

//#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, 0.6, 10 } // ...or, set your own edit limits
Expand Down
27 changes: 14 additions & 13 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@
#if ENABLED(POWER_LOSS_RECOVERY)
//#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
//#define POWER_LOSS_PIN 44 // Pin to detect power loss. Set to -1 to disable default pin on boards without module.
//#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
Expand Down Expand Up @@ -1172,18 +1172,16 @@
// Add an optimized binary file transfer mode, initiated with 'M28 B1'
//#define BINARY_FILE_TRANSFER

#if HAS_SDCARD_CONNECTION
/**
* Set this option to one of the following (or the board's defaults apply):
*
* LCD - Use the SD drive in the external LCD controller.
* ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.)
* CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file).
*
* :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
*/
//#define SDCARD_CONNECTION LCD
#endif
/**
* Set this option to one of the following (or the board's defaults apply):
*
* LCD - Use the SD drive in the external LCD controller.
* ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.)
* CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file).
*
* :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
*/
//#define SDCARD_CONNECTION LCD

#endif // SDSUPPORT

Expand Down Expand Up @@ -1260,6 +1258,7 @@
#define STATUS_HOTEND_ANIM // Use a second bitmap to indicate hotend heating
#define STATUS_BED_ANIM // Use a second bitmap to indicate bed heating
#define STATUS_CHAMBER_ANIM // Use a second bitmap to indicate chamber heating
//#define STATUS_CUTTER_ANIM // Use a second bitmap to indicate spindle / laser active
//#define STATUS_ALT_BED_BITMAP // Use the alternative bed bitmap
//#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
Expand Down Expand Up @@ -2791,6 +2790,8 @@
//#define GCODE_QUOTED_STRINGS // Support for quoted string parameters
#endif

//#define GCODE_CASE_INSENSITIVE // Accept G-code sent to the firmware in lowercase

/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_AVR/persistent_store_eeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_AVR/watchdog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void watchdog_init() {
#if ENABLED(WATCHDOG_RESET_MANUAL)
ISR(WDT_vect) {
sei(); // With the interrupt driven serial we need to allow interrupts.
SERIAL_ERROR_MSG(MSG_WATCHDOG_FIRED);
SERIAL_ERROR_MSG(STR_WATCHDOG_FIRED);
minkill(); // interrupt-safe final kill and infinite loop
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
eeprom_write_byte(p, v);
delay(2);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/HAL/HAL_LPC1768/MarlinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,21 @@
}
#endif

#if (defined(SERIAL_PORT) && SERIAL_PORT == 1) || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == 1) || (defined(DGUS_SERIAL_PORT) && DGUS_SERIAL_PORT == 1)
#if SERIAL_PORT == 1 || SERIAL_PORT_2 == 1 || DGUS_SERIAL_PORT == 1
MarlinSerial MSerial1((LPC_UART_TypeDef *) LPC_UART1);
extern "C" void UART1_IRQHandler() {
MSerial1.IRQHandler();
}
#endif

#if (defined(SERIAL_PORT) && SERIAL_PORT == 2) || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == 2) || (defined(DGUS_SERIAL_PORT) && DGUS_SERIAL_PORT == 2)
#if SERIAL_PORT == 2 || SERIAL_PORT_2 == 2 || DGUS_SERIAL_PORT == 2
MarlinSerial MSerial2(LPC_UART2);
extern "C" void UART2_IRQHandler() {
MSerial2.IRQHandler();
}
#endif

#if (defined(SERIAL_PORT) && SERIAL_PORT == 3) || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == 3) || (defined(DGUS_SERIAL_PORT) && DGUS_SERIAL_PORT == 3)
#if SERIAL_PORT == 3 || SERIAL_PORT_2 == 3 || DGUS_SERIAL_PORT == 3
MarlinSerial MSerial3(LPC_UART3);
extern "C" void UART3_IRQHandler() {
MSerial3.IRQHandler();
Expand Down
49 changes: 49 additions & 0 deletions Marlin/src/HAL/HAL_LPC1768/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,52 @@
#if ENABLED(BAUD_RATE_GCODE)
#error "BAUD_RATE_GCODE is not yet supported on LPC176x."
#endif

/**
* Flag any serial port conflicts
*
* Port | TX | RX |
* --- | --- | --- |
* Serial | P0_02 | P0_03 |
* Serial1 | P0_15 | P0_16 |
* Serial2 | P0_10 | P0_11 |
* Serial3 | P0_00 | P0_01 |
*/
#if (defined(SERIAL_PORT) && SERIAL_PORT == 0) || (defined(SERIAL_PORT_2) && SERIAL_PORT_2 == 0) || (defined(DGUS_SERIAL_PORT) && DGUS_SERIAL_PORT == 0)
#if X_CS_PIN == P0_02 || TMC_SW_MISO == P0_02 || (E_STEPPERS && E_MUX1_PIN == P0_02) \
|| Y_CS_PIN == P0_03 || TMC_SW_MOSI == P0_03 || (E_STEPPERS && E_MUX0_PIN == P0_03)
#error "Serial port assignment (0) conflicts with other pins!"
#endif
#endif

#if SERIAL_PORT == 1 || SERIAL_PORT_2 == 1 || DGUS_SERIAL_PORT == 1
#if TMC_SW_SCK == P0_15
#error "Serial port assignment (1) conflicts with other pins!"
#elif HAS_SPI_LCD
#if BTN_EN2 == P0_15 || SCK_PIN == P0_15 || LCD_PINS_D4 == P0_15 || DOGLCD_SCK == P0_15 || LCD_RESET_PIN == P0_15 || LCD_PINS_RS == P0_15 || SHIFT_CLK == P0_15 \
|| BTN_EN1 == P0_16 || LCD_SDSS == P0_16 || LCD_PINS_RS == P0_16 || MISO_PIN == P0_16 || DOGLCD_A0 == P0_16 || SS_PIN == P0_16 || LCD_SDSS == P0_16 || DOGLCD_CS == P0_16 || LCD_RESET_PIN == P0_16 || LCD_BACKLIGHT_PIN == P0_16
#error "Serial port assignment (1) conflicts with other pins!"
#endif
#endif
#endif

#if SERIAL_PORT == 2 || SERIAL_PORT_2 == 2 || DGUS_SERIAL_PORT == 2
#if Y_MIN_PIN == P0_10 || Z_MIN_PROBE_PIN == P0_10 \
|| X_ENABLE_PIN == P0_10 || Y_ENABLE_PIN == P0_10 || X2_ENABLE_PIN == P0_10 || Y2_ENABLE_PIN == P0_10 || Z2_ENABLE_PIN == P0_10 || Z3_ENABLE_PIN == P0_10 || Z4_ENABLE_PIN == P0_10 \
|| X2_CS_PIN == P0_10 || Y2_CS_PIN == P0_10 || Z2_CS_PIN == P0_10 || Z3_CS_PIN == P0_10 || Z4_CS_PIN == P0_10 \
|| X_DIR_PIN == P0_11 || Y_DIR_PIN == P0_11 || X2_DIR_PIN == P0_11 || Y2_DIR_PIN == P0_11 || Z2_DIR_PIN == P0_11 || Z3_DIR_PIN == P0_11 || Z4_DIR_PIN == P0_11 \
|| X2_STEP_PIN == P0_11 || Y2_STEP_PIN == P0_11 || Z2_STEP_PIN == P0_11 || Z3_STEP_PIN == P0_11 || Z4_STEP_PIN == P0_11
#error "Serial port assignment (2) conflicts with other pins!"
#elif (E_STEPPERS > 1 && (E1_ENABLE_PIN == P0_10 || E1_CS_PIN == P0_10)) || (E_STEPPERS > 0 && (E0_DIR_PIN == P0_11 || E0_STEP_PIN == P0_11))
#error "Serial port assignment (2) conflicts with other pins!"
#endif
#endif

#if SERIAL_PORT == 3 || SERIAL_PORT_2 == 3 || DGUS_SERIAL_PORT == 3
#if X_MIN_PIN == P0_00 || Y_SERIAL_TX_PIN == P0_00 || Y_SERIAL_RX_PIN == P0_00 \
|| X_MAX_PIN == P0_01 || X_SERIAL_TX_PIN == P0_01 || X_SERIAL_RX_PIN == P0_01
#error "Serial port assignment (2) conflicts with other pins!"
#elif E_STEPPERS > 1 && (E1_DIR_PIN == P0_00 || E1_STEP_PIN == P0_01)
#error "Serial port assignment (2) conflicts with other pins!"
#endif
#endif
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_SAMD51/persistent_store_eeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
eeprom_write_byte(p, v);
delay(2);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_STM32F1/persistent_store_eeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_STM32_F4_F7/persistent_store_eeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_TEENSY31_32/persistent_store_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
if (v != eeprom_read_byte(p)) {
eeprom_write_byte(p, v);
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_MSG(MSG_ERR_EEPROM_WRITE);
SERIAL_ECHO_MSG(STR_ERR_EEPROM_WRITE);
return true;
}
}
Expand Down
Loading

0 comments on commit b29aae6

Please sign in to comment.