Skip to content

Commit

Permalink
Merge branch 'bugfix-2.0.x' into MP3DP_MRambo_16T_aero
Browse files Browse the repository at this point in the history
# Conflicts:
#	Marlin/Configuration_adv.h
  • Loading branch information
Allted committed Sep 18, 2019
2 parents 0dc9b1b + 6b3b0e0 commit 7c3227b
Show file tree
Hide file tree
Showing 661 changed files with 15,051 additions and 8,357 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ env:
- TEST_PLATFORM="LPC1768"
- TEST_PLATFORM="LPC1769"
- TEST_PLATFORM="megaatmega2560"
- TEST_PLATFORM="SAMD51_grandcentral_m4"
- TEST_PLATFORM="STM32F103R"
- TEST_PLATFORM="teensy31"
- TEST_PLATFORM="teensy35"
Expand Down Expand Up @@ -45,6 +44,7 @@ env:
#- TEST_PLATFORM="mks_robin_lite"
#- TEST_PLATFORM="mks_robin_mini"
#- TEST_PLATFORM="mks_robin_nano"
#- TEST_PLATFORM="SAMD51_grandcentral_m4"
#- TEST_PLATFORM="STM32F103R_bigtree"
#- TEST_PLATFORM="STM32F103R_fysetc"
#- TEST_PLATFORM="STM32F4"
Expand Down
7 changes: 5 additions & 2 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1519,7 +1519,7 @@
#define NOZZLE_CLEAN_TRIANGLES 3

// Specify positions as { X, Y, Z }
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1)}
#define NOZZLE_CLEAN_START_POINT { 30, 30, (Z_MIN_POS + 1) }
#define NOZZLE_CLEAN_END_POINT { 100, 60, (Z_MIN_POS + 1) }

// Circular pattern radius
Expand Down Expand Up @@ -2062,6 +2062,9 @@
//
//#define TOUCH_BUTTONS
#if ENABLED(TOUCH_BUTTONS)
#define BUTTON_DELAY_EDIT 50 // (ms) Button repeat delay for edit screens
#define BUTTON_DELAY_MENU 250 // (ms) Button repeat delay for menus

#define XPT2046_X_CALIBRATION 12316
#define XPT2046_Y_CALIBRATION -8981
#define XPT2046_X_OFFSET -43
Expand Down Expand Up @@ -2201,7 +2204,7 @@
*/
//#define NUM_SERVOS 3 // Servo index starts with 0 for M280 command

// Delay (in milliseconds) before the next move will start, to give the servo time to reach its target angle.
// (ms) Delay before the next move will start, to give the servo time to reach its target angle.
// 300ms is a good value but you can try less delay.
// If the servo can't reach the requested position, increase it.
#define SERVO_DELAY { 300 }
Expand Down
64 changes: 42 additions & 22 deletions Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@
//#define Z_STEPPER_AUTO_ALIGN
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
// Define probe X and Y positions for Z1, Z2 [, Z3]
#define Z_STEPPER_ALIGN_X { 10, 150, 290 }
#define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
#define Z_STEPPER_ALIGN_X { 10, 150, 290 }
#define Z_STEPPER_ALIGN_Y { 290, 10, 290 }
// Set number of iterations to align
#define Z_STEPPER_ALIGN_ITERATIONS 3
// Enable to restore leveling setup after operation
Expand All @@ -620,7 +620,7 @@
#define Z_STEPPER_ALIGN_ACC 0.02
#endif

// @section machine
// @section motion

#define AXIS_RELATIVE_MODES { false, false, false, false }

Expand All @@ -647,19 +647,6 @@

//#define HOME_AFTER_DEACTIVATE // Require rehoming after steppers are deactivated

// @section lcd

#if EITHER(ULTIPANEL, EXTENSIBLE_UI)
#define MANUAL_FEEDRATE { 30*60, 30*60, 4*60, 60 } // 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)
#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
#endif

// @section motion

// Minimum time that a segment needs to take if the buffer is emptied
#define DEFAULT_MINSEGMENTTIME 20000 // (ms)

Expand Down Expand Up @@ -739,8 +726,8 @@
//#define CALIBRATION_REPORTING

// The true location and dimension the cube/bolt/washer on the bed.
#define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0} // mm
#define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0} // mm
#define CALIBRATION_OBJECT_CENTER { 264.0, -22.0, -2.0 } // mm
#define CALIBRATION_OBJECT_DIMENSIONS { 10.0, 10.0, 10.0 } // mm

// Comment out any sides which are unreachable by the probe. For best
// auto-calibration results, all sides must be reachable.
Expand Down Expand Up @@ -837,6 +824,15 @@

// @section lcd

#if EITHER(ULTIPANEL, EXTENSIBLE_UI)
#define MANUAL_FEEDRATE { 50*60, 50*60, 4*60, 60 } // 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)
#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
#endif

// Change values more rapidly when the encoder is rotated faster
#define ENCODER_RATE_MULTIPLIER
#if ENABLED(ENCODER_RATE_MULTIPLIER)
Expand Down Expand Up @@ -1209,6 +1205,18 @@
//#define TOUCH_UI_PORTRAIT
//#define TOUCH_UI_MIRRORED

// Enable UTF8 rendering capabilities.
//#define TOUCH_UI_USE_UTF8
#if ENABLED(TOUCH_UI_USE_UTF8)
#define TOUCH_UI_UTF8_WESTERN_CHARSET
#endif

// When labels do not fit buttons, use smaller font
#define TOUCH_UI_FIT_TEXT

// Runtime language selection (otherwise LCD_LANGUAGE)
//#define TOUCH_UI_LANGUAGE_MENU

// Use a numeric passcode for "Screen lock" keypad.
// (recommended for smaller displays)
//#define TOUCH_UI_PASSCODE
Expand Down Expand Up @@ -2466,10 +2474,6 @@
//#define HOST_PROMPT_SUPPORT
#endif

//===========================================================================
//====================== I2C Position Encoder Settings ======================
//===========================================================================

/**
* I2C position encoders for closed loop control.
* Developed by Chris Barr at Aus3D.
Expand Down Expand Up @@ -2550,6 +2554,22 @@

#endif // I2C_POSITION_ENCODERS

/**
* Analog Joystick(s)
*/
//#define JOYSTICK
#if ENABLED(JOYSTICK)
#define JOY_X_PIN 5 // RAMPS: Suggested pin A5 on AUX2
#define JOY_Y_PIN 10 // RAMPS: Suggested pin A10 on AUX2
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
#endif

/**
* MAX7219 Debug Matrix
*
Expand Down
2 changes: 1 addition & 1 deletion Marlin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ CXXSTANDARD = -std=gnu++11
CDEBUG = -g$(DEBUG)
CWARN = -Wall -Wstrict-prototypes -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
CXXWARN = -Wall -Wno-packed-bitfield-compat -Wno-pragmas -Wunused-parameter
CTUNING = -fsigned-char -funsigned-bitfields -fpack-struct -fno-exceptions \
CTUNING = -fsigned-char -funsigned-bitfields -fno-exceptions \
-fshort-enums -ffunction-sections -fdata-sections
ifneq ($(HARDWARE_MOTHERBOARD),)
CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD}
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/HAL_AVR/HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// Public functions
// ------------------------

void HAL_init(void) {
void HAL_init() {
// Init Servo Pins
#define INIT_SERVO(N) OUT_WRITE(SERVO##N##_PIN, LOW)
#if HAS_SERVO_0
Expand Down
28 changes: 14 additions & 14 deletions Marlin/src/HAL/HAL_AVR/HAL.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,19 @@ typedef int8_t pin_t;
// Public functions
// ------------------------

void HAL_init(void);
void HAL_init();

//void cli(void);
//void cli();

//void _delay_ms(const int delay);

inline void HAL_clear_reset_source(void) { MCUSR = 0; }
inline uint8_t HAL_get_reset_source(void) { return MCUSR; }
inline void HAL_clear_reset_source() { MCUSR = 0; }
inline uint8_t HAL_get_reset_source() { return MCUSR; }

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-function"
extern "C" {
int freeMemory(void);
int freeMemory();
}
#pragma GCC diagnostic pop

Expand Down Expand Up @@ -199,9 +199,9 @@ FORCE_INLINE void HAL_timer_start(const uint8_t timer_num, const uint32_t freque

/* 18 cycles maximum latency */
#define HAL_STEP_TIMER_ISR() \
extern "C" void TIMER1_COMPA_vect (void) __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER1_COMPA_vect_bottom (void) asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER1_COMPA_vect (void) { \
extern "C" void TIMER1_COMPA_vect() __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER1_COMPA_vect_bottom() asm ("TIMER1_COMPA_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER1_COMPA_vect() { \
__asm__ __volatile__ ( \
A("push r16") /* 2 Save R16 */ \
A("in r16, __SREG__") /* 1 Get SREG */ \
Expand Down Expand Up @@ -268,13 +268,13 @@ void TIMER1_COMPA_vect (void) { \
: \
); \
} \
void TIMER1_COMPA_vect_bottom(void)
void TIMER1_COMPA_vect_bottom()
/* 14 cycles maximum latency */
#define HAL_TEMP_TIMER_ISR() \
extern "C" void TIMER0_COMPB_vect (void) __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER0_COMPB_vect_bottom(void) asm ("TIMER0_COMPB_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER0_COMPB_vect (void) { \
extern "C" void TIMER0_COMPB_vect() __attribute__ ((signal, naked, used, externally_visible)); \
extern "C" void TIMER0_COMPB_vect_bottom() asm ("TIMER0_COMPB_vect_bottom") __attribute__ ((used, externally_visible, noinline)); \
void TIMER0_COMPB_vect() { \
__asm__ __volatile__ ( \
A("push r16") /* 2 Save R16 */ \
A("in r16, __SREG__") /* 1 Get SREG */ \
Expand Down Expand Up @@ -334,7 +334,7 @@ void TIMER0_COMPB_vect (void) { \
: \
); \
} \
void TIMER0_COMPB_vect_bottom(void)
void TIMER0_COMPB_vect_bottom()

// ADC
#ifdef DIDR2
Expand All @@ -343,7 +343,7 @@ void TIMER0_COMPB_vect_bottom(void)
#define HAL_ANALOG_SELECT(pin) do{ SBI(DIDR0, pin); }while(0)
#endif

inline void HAL_adc_init(void) {
inline void HAL_adc_init() {
ADCSRA = _BV(ADEN) | _BV(ADSC) | _BV(ADIF) | 0x07;
DIDR0 = 0;
#ifdef DIDR2
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/HAL/HAL_AVR/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include "../../inc/MarlinConfig.h"

void spiBegin(void) {
void spiBegin() {
OUT_WRITE(SS_PIN, HIGH);
SET_OUTPUT(SCK_PIN);
SET_INPUT(MISO_PIN);
Expand Down Expand Up @@ -81,7 +81,7 @@ void spiBegin(void) {
}

/** SPI receive a byte */
uint8_t spiRec(void) {
uint8_t spiRec() {
SPDR = 0xFF;
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
return SPDR;
Expand Down
14 changes: 7 additions & 7 deletions Marlin/src/HAL/HAL_AVR/MarlinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@

// (called with TX irqs disabled)
template<typename Cfg>
FORCE_INLINE void MarlinSerial<Cfg>::_tx_udr_empty_irq(void) {
FORCE_INLINE void MarlinSerial<Cfg>::_tx_udr_empty_irq() {
if (Cfg::TX_SIZE > 0) {
// Read positions
uint8_t t = tx_buffer.tail;
Expand Down Expand Up @@ -363,13 +363,13 @@
}

template<typename Cfg>
int MarlinSerial<Cfg>::peek(void) {
int MarlinSerial<Cfg>::peek() {
const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
return h == t ? -1 : rx_buffer.buffer[t];
}

template<typename Cfg>
int MarlinSerial<Cfg>::read(void) {
int MarlinSerial<Cfg>::read() {
const ring_buffer_pos_t h = atomic_read_rx_head();

// Read the tail. Main thread owns it, so it is safe to directly read it
Expand Down Expand Up @@ -412,13 +412,13 @@
}

template<typename Cfg>
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::available(void) {
typename MarlinSerial<Cfg>::ring_buffer_pos_t MarlinSerial<Cfg>::available() {
const ring_buffer_pos_t h = atomic_read_rx_head(), t = rx_buffer.tail;
return (ring_buffer_pos_t)(Cfg::RX_SIZE + h - t) & (Cfg::RX_SIZE - 1);
}

template<typename Cfg>
void MarlinSerial<Cfg>::flush(void) {
void MarlinSerial<Cfg>::flush() {

// Set the tail to the head:
// - Read the RX head index in a safe way. (See atomic_read_rx_head.)
Expand Down Expand Up @@ -505,7 +505,7 @@
}

template<typename Cfg>
void MarlinSerial<Cfg>::flushTX(void) {
void MarlinSerial<Cfg>::flushTX() {

if (Cfg::TX_SIZE == 0) {
// No bytes written, no need to flush. This special case is needed since there's
Expand Down Expand Up @@ -595,7 +595,7 @@
}

template<typename Cfg>
void MarlinSerial<Cfg>::println(void) {
void MarlinSerial<Cfg>::println() {
print('\r');
print('\n');
}
Expand Down
14 changes: 7 additions & 7 deletions Marlin/src/HAL/HAL_AVR/MarlinSerial.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,18 @@
public:

FORCE_INLINE static void store_rxd_char();
FORCE_INLINE static void _tx_udr_empty_irq(void);
FORCE_INLINE static void _tx_udr_empty_irq();

public:
MarlinSerial() {};
static void begin(const long);
static void end();
static int peek(void);
static int read(void);
static void flush(void);
static ring_buffer_pos_t available(void);
static int peek();
static int read();
static void flush();
static ring_buffer_pos_t available();
static void write(const uint8_t c);
static void flushTX(void);
static void flushTX();

FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
Expand Down Expand Up @@ -245,7 +245,7 @@
static void println(long, int = DEC);
static void println(unsigned long, int = DEC);
static void println(double, int = 2);
static void println(void);
static void println();
operator bool() { return true; }

private:
Expand Down
Loading

0 comments on commit 7c3227b

Please sign in to comment.