Skip to content

Commit

Permalink
Merge branch 'MarlinFirmware:bugfix-2.1.x' into mecha-octopus
Browse files Browse the repository at this point in the history
  • Loading branch information
Djonker83 authored Dec 14, 2023
2 parents 363a52f + 8bce9de commit dccb3b1
Show file tree
Hide file tree
Showing 40 changed files with 894 additions and 184 deletions.
10 changes: 9 additions & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -892,8 +892,16 @@
//#define COREYX
//#define COREZX
//#define COREZY
//#define MARKFORGED_XY // MarkForged. See https://reprap.org/forum/read.php?152,504042

//
// MarkForged Kinematics
// See https://reprap.org/forum/read.php?152,504042
//
//#define MARKFORGED_XY
//#define MARKFORGED_YX
#if ANY(MARKFORGED_XY, MARKFORGED_YX)
//#define MARKFORGED_INVERSE // Enable for an inverted Markforged kinematics belt path
#endif

// Enable for a belt style printer with endless "Z" motion
//#define BELTPRINTER
Expand Down
38 changes: 26 additions & 12 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1471,11 +1471,6 @@
#define FEEDRATE_CHANGE_BEEP_FREQUENCY 440
#endif

//
// LCD Backlight Timeout
//
//#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight

#if HAS_BED_PROBE && ANY(HAS_MARLINUI_MENU, HAS_TFT_LVGL_UI)
//#define PROBE_OFFSET_WIZARD // Add a Probe Z Offset calibration option to the LCD menu
#if ENABLED(PROBE_OFFSET_WIZARD)
Expand Down Expand Up @@ -2206,6 +2201,15 @@
//#define TFT_BTOKMENU_COLOR 0x145F // 00010 100010 11111 Cyan
#endif

//
// LCD Backlight Timeout
// Requires a display with a controllable backlight
//
//#define LCD_BACKLIGHT_TIMEOUT_MINS 1 // (minutes) Timeout before turning off the backlight
#if defined(DISPLAY_SLEEP_MINUTES) || defined(LCD_BACKLIGHT_TIMEOUT_MINS)
#define EDITABLE_DISPLAY_TIMEOUT // Edit timeout with M255 S<minutes> and a menu item
#endif

//
// ADC Button Debounce
//
Expand Down Expand Up @@ -2649,10 +2653,12 @@
//#define FULL_REPORT_TO_HOST_FEATURE // Auto-report the machine status like Grbl CNC
#endif

// Bad Serial-connections can miss a received command by sending an 'ok'
// Therefore some clients abort after 30 seconds in a timeout.
// Some other clients start sending commands while receiving a 'wait'.
// This "wait" is only sent when the buffer is empty. 1 second is a good value here.
/**
* Bad Serial-connections can miss a received command by sending an 'ok'
* Therefore some clients abort after 30 seconds in a timeout.
* Some other clients start sending commands while receiving a 'wait'.
* This "wait" is only sent when the buffer is empty. 1 second is a good value here.
*/
//#define NO_TIMEOUTS 1000 // (ms)

// Some clients will have this feature soon. This could make the NO_TIMEOUTS unnecessary.
Expand All @@ -2665,6 +2671,15 @@
// For serial echo, the number of digits after the decimal point
//#define SERIAL_FLOAT_PRECISION 4

/**
* This feature is EXPERIMENTAL so use with caution and test thoroughly.
* Enable this option to receive data on the serial ports via the onboard DMA
* controller for more stable and reliable high-speed serial communication.
* Only some STM32 MCUs are currently supported.
* Note: This has no effect on emulated USB serial ports.
*/
//#define SERIAL_DMA

/**
* Set the number of proportional font spaces required to fill up a typical character space.
* This can help to better align the output of commands like `G29 O` Mesh Output.
Expand Down Expand Up @@ -3442,9 +3457,8 @@
/**
* TWI/I2C BUS
*
* This feature is an EXPERIMENTAL feature so it shall not be used on production
* machines. Enabling this will allow you to send and receive I2C data from slave
* devices on the bus.
* This feature is EXPERIMENTAL but may be useful for custom I2C peripherals.
* Enable this to send and receive I2C data from slave devices on the bus.
*
* ; Example #1
* ; This macro send the string "Marlin" to the slave device with address 0x63 (99)
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* here we define this default string as the date where the latest release
* version was tagged.
*/
//#define STRING_DISTRIBUTION_DATE "2023-12-09"
//#define STRING_DISTRIBUTION_DATE "2023-12-14"

/**
* Defines a generic printer name to be output to the LCD after booting Marlin.
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/HAL/AVR/MarlinSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
#include "../../core/types.h"
#include "../../core/serial_hook.h"

#ifndef SERIAL_PORT
#define SERIAL_PORT 0
#endif

#ifndef USBCON

// The presence of the UBRRH register is used to detect a UART.
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/HAL/AVR/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
*
*/
#pragma once

#ifndef SERIAL_PORT
#define SERIAL_PORT 0
#endif
10 changes: 0 additions & 10 deletions Marlin/src/HAL/LPC1768/MarlinSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@
#endif
#include "../../core/serial_hook.h"

#ifndef SERIAL_PORT
#define SERIAL_PORT 0
#endif
#ifndef RX_BUFFER_SIZE
#define RX_BUFFER_SIZE 128
#endif
#ifndef TX_BUFFER_SIZE
#define TX_BUFFER_SIZE 32
#endif

class MarlinSerial : public HardwareSerial<RX_BUFFER_SIZE, TX_BUFFER_SIZE> {
public:
MarlinSerial(LPC_UART_TypeDef *UARTx) : HardwareSerial<RX_BUFFER_SIZE, TX_BUFFER_SIZE>(UARTx) { }
Expand Down
4 changes: 4 additions & 0 deletions Marlin/src/HAL/LPC1768/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
*
*/
#pragma once

#ifndef SERIAL_PORT
#define SERIAL_PORT 0
#endif
7 changes: 7 additions & 0 deletions Marlin/src/HAL/LPC1768/inc/Conditionals_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,10 @@
#if DISABLED(NO_SD_HOST_DRIVE)
#define HAS_SD_HOST_DRIVE 1
#endif

#ifndef RX_BUFFER_SIZE
#define RX_BUFFER_SIZE 128
#endif
#ifndef TX_BUFFER_SIZE
#define TX_BUFFER_SIZE 32
#endif
8 changes: 8 additions & 0 deletions Marlin/src/HAL/LPC1768/tft/tft_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,19 @@ void TFT_SPI::dataTransferBegin(uint16_t dataSize) {
WRITE(TFT_CS_PIN, LOW);
}

#ifdef TFT_DEFAULT_DRIVER
#include "../../../lcd/tft_io/tft_ids.h"
#endif

uint32_t TFT_SPI::getID() {
uint32_t id;
id = readID(LCD_READ_ID);
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF)
id = readID(LCD_READ_ID4);
#ifdef TFT_DEFAULT_DRIVER
if ((id & 0xFFFF) == 0 || (id & 0xFFFF) == 0xFFFF)
id = TFT_DEFAULT_DRIVER;
#endif
return id;
}

Expand Down
Loading

0 comments on commit dccb3b1

Please sign in to comment.