Commit b6a29ec4 authored by MagoKimbra's avatar MagoKimbra

Fix and update

parent 29c65bd3
......@@ -3,6 +3,7 @@
#include "boards.h"
#include "macros.h"
#include "Default_Version.h"
//===========================================================================
//============================= Getting Started =============================
......@@ -28,11 +29,10 @@
// User-specified version info of this build to display in [Pronterface, etc] terminal window during
// startup. Implementation of an idea by Prof Braino to inform user that any changes made to this
// build by the user have been successfully uploaded into firmware.
#define BUILD_VERSION "4.1.4 dev"
#define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time
#define STRING_CONFIG_H_AUTHOR "(none, default config)" // Who made the changes.
#define STRING_SPLASH_LINE1 "v" BUILD_VERSION // will be shown during bootup in line 1
#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
#define SHOW_BOOTSCREEN
#define STRING_SPLASH_LINE1 "v" SHORT_BUILD_VERSION // will be shown during bootup in line 1
//#define STRING_SPLASH_LINE2 STRING_DISTRIBUTION_DATE // will be shown during bootup in line 2
// SERIAL_PORT selects which serial port should be used for communication with the host.
// This allows the connection of wireless adapters (for instance) to non-default port pins.
......@@ -43,8 +43,8 @@
// 2400,9600,19200,38400,57600,115200,250000
#define BAUDRATE 115200
// This enables the serial port associated to the Bluetooth interface on AT90USB devices
//#define BTENABLED
// Enable the Bluetooth serial interface on AT90USB devices
//#define BLUETOOTH
// Define this to set a unique identifier for this printer, (Used by some programs to differentiate between machines)
// You can use an online service to generate a random UUID. (eg http://www.uuidgenerator.net/version4)
......@@ -63,6 +63,13 @@
//#define SCARA
/***********************************************************************\
/***********************************************************************\
************************ CORE X (YZ) MOLTIPLICATOR ********************
***********************************************************************/
// This define the moltiplicator axis from X to Y or Z in COREXY or
// COREXZ. Normally is equal 1.
#define COREX_MOLTILICATOR 1
/***********************************************************************\
********************** Do not touch this section **********************
***********************************************************************/
......
/*
* This file is a placeholder for a file which could be distributed in an archive
* It takes the place of an automatically created "_Version.h" which is generated during the build process
*/
// #error "You must specify the following parameters related to your distribution"
#if true
#define SHORT_BUILD_VERSION "4.1.4 dev"
#define STRING_DISTRIBUTION_DATE __DATE__ " " __TIME__ // build date and time
// It might also be appropriate to define a location where additional information can be found
#define SOURCE_CODE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#endif
\ No newline at end of file
......@@ -281,12 +281,12 @@ void MarlinSerial::printFloat(double number, uint8_t digits) {
// Preinstantiate Objects //////////////////////////////////////////////////////
MarlinSerial MSerial;
MarlinSerial customizedSerial;
#endif // whole file
#endif // !USBCON
// For AT90USB targets use the UART for BT interfacing
#if defined(USBCON) && ENABLED(BTENABLED)
HardwareSerial bt;
#if defined(USBCON) && ENABLED(BLUETOOTH)
HardwareSerial bluetoothSerial;
#endif
......@@ -149,12 +149,12 @@ class MarlinSerial { //: public Stream
void println(void);
};
extern MarlinSerial MSerial;
extern MarlinSerial customizedSerial;
#endif // !USBCON
// Use the UART for BT in AT90USB configurations
#if defined(USBCON) && ENABLED(BTENABLED)
extern HardwareSerial bt;
// Use the UART for Bluetooth in AT90USB configurations
#if defined(USBCON) && ENABLED(BLUETOOTH)
extern HardwareSerial bluetoothSerial;
#endif
#endif
......@@ -747,9 +747,6 @@ void setup() {
Config_RetrieveSettings();
lcd_init();
#if DISABLED(NEXTION)
delay(SPLASH_SCREEN_DURATION); // wait to display the splash screen
#endif
tp_init(); // Initialize temperature loop
plan_init(); // Initialize planner;
......@@ -767,7 +764,7 @@ void setup() {
enableStepperDrivers();
#endif
#ifdef DIGIPOT_I2C
#if ENABLED(DIGIPOT_I2C)
digipot_i2c_init();
#endif
......@@ -1497,6 +1494,15 @@ static void clean_up_after_endstop_move() {
return measured_z;
}
#if HAS_SERVO_ENDSTOPS && DISABLED(Z_PROBE_SLED)
void raise_z_for_servo() {
float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_PROBING;
z_dest += axis_known_position[Z_AXIS] ? zprobe_zoffset : zpos;
if (zpos < z_dest) do_blocking_move_to_z(z_dest); // also updates current_position
}
#endif
#endif //AUTO_BED_LEVELING_FEATURE
static void homeaxis(AxisEnum axis) {
......@@ -3778,10 +3784,17 @@ inline void gcode_G28() {
}
#if DISABLED(Z_PROBE_SLED)
/**
* G30: Do a single Z probe at the current XY
*/
inline void gcode_G30() {
#if HAS_SERVO_ENDSTOPS
raise_z_for_servo();
#endif
deploy_z_probe(); // Engage Z Servo endstop if available
st_synchronize();
// TODO: make sure the bed_level_rotation_matrix is identity or the planner will get set incorectly
// TODO: clear the leveling matrix or the planner will be set incorrectly
setup_for_endstop_move();
feedrate = homing_feedrate[Z_AXIS];
......@@ -3793,6 +3806,11 @@ inline void gcode_G28() {
ECHO_EMV(" Z: ", current_position[Z_AXIS] + 0.0001);
clean_up_after_endstop_move();
#if HAS_SERVO_ENDSTOPS
raise_z_for_servo();
#endif
stow_z_probe(); // Retract Z Servo endstop if available
}
#endif // !Z_PROBE_SLED
......@@ -5756,21 +5774,13 @@ inline void gcode_M226() {
*/
inline void gcode_M400() { st_synchronize(); }
#if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(Z_PROBE_SLED) && SERVO_LEVELING
#if SERVO_LEVELING
void raise_z_for_servo() {
float zpos = current_position[Z_AXIS], z_dest = Z_RAISE_BEFORE_HOMING;
z_dest += axis_known_position[Z_AXIS] ? zprobe_zoffset : zpos;
if (zpos < z_dest) do_blocking_move_to_z(z_dest); // also updates current_position
}
#endif
#if ENABLED(AUTO_BED_LEVELING_FEATURE) && DISABLED(Z_PROBE_SLED) && HAS_SERVO_ENDSTOPS
/**
* M401: Engage Z Servo endstop if available
*/
inline void gcode_M401() {
#if SERVO_LEVELING
#if HAS_SERVO_ENDSTOPS
raise_z_for_servo();
#endif
deploy_z_probe();
......@@ -5780,13 +5790,13 @@ inline void gcode_M400() { st_synchronize(); }
* M402: Retract Z Servo endstop if enabled
*/
inline void gcode_M402() {
#if SERVO_LEVELING
#if HAS_SERVO_ENDSTOPS
raise_z_for_servo();
#endif
stow_z_probe(false);
}
#endif
#endif // AUTO_BED_LEVELING_FEATURE && (HAS_SERVO_ENDSTOPS && !Z_PROBE_SLED)
#ifdef FILAMENT_SENSOR
......
......@@ -25,17 +25,17 @@
#include "WString.h"
#ifdef AT90USB
#ifdef BTENABLED
#define MYSERIAL bt
#ifdef USBCON
#if ENABLED(BLUETOOTH)
#define MYSERIAL bluetoothSerial
#else
#define MYSERIAL Serial
#endif // BTENABLED
#endif // BLUETOOTH
#else
#ifdef __SAM3X8E__
#define MYSERIAL Serial
#else
#define MYSERIAL MSerial
#define MYSERIAL customizedSerial
#endif
#endif
......
......@@ -224,14 +224,6 @@
#endif
#endif
/**
* SPLASH_SCREEN_DURATION for no DOGLCD display
*/
#if DISABLED(DOGLCD)
#undef SPLASH_SCREEN_DURATION
#define SPLASH_SCREEN_DURATION 500
#endif
#else // CONFIGURATION_LCD
#define CONDITIONALS_H
......
......@@ -3,7 +3,8 @@
// Please note that using the high-res version takes 402Bytes of PROGMEM.
#define START_BMPHIGH
#if ENABLED(START_BMPHIGH)
#if ENABLED(SHOW_BOOTSCREEN)
#if ENABLED(START_BMPHIGH)
#define START_BMPWIDTH 112
#define START_BMPHEIGHT 38
#define START_BMPBYTEWIDTH 14
......@@ -16,7 +17,7 @@
0xff,0x0,0x0,0x77,0x80,0x0,0x3,0x0,0x0,0x0,0x3,0x3f,0xfe,0x3,0xff,0x80,0x0,0x7f,0x6,0x7f,0xe3,0xf0,0xf0,0xf0,0x1,0x9f,0xfc,0x3,0xff,0xc0,0x0,0x7e,0x6,0xff,0xf3,0xf9,0xf9,0xf8,0x0,0xcf,0xf8,0x3,0xff,0xe0,0x0,0x7c,0x6,0xe7,0x33,0x9b,0x9b,0x9c,0x0,0x67,0xf0,0x3,0xff,0xf0,0x0,0x7e,0x6,0xe3,0x1b,0x1b,0x1b,0xc,0x0,0x33,0xc0,0x3,0xff,0xf8,0x0,0x7f,0x6,0xe3,0x1b,0x1b,0x3,0xc,0x0,0x19,0x0,0x3,0xff,0xfc,0x0,0x73,0x86,0xe3,0x1b,0x3b,0x3,0x8c,0x0,0xc,0x0,0x3,0xff,0xfe,0x0,0x71,0xc6,0xe3,0x1b,0xf3,0x3,0xef,0x0,0x6,0x0,0x7,
0xff,0xff,0x0,0x30,0xe6,0x63,0x19,0xe3,0x1,0xef,0x0,0x2,0x0,0x6,0xff,0xff,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xe,0xff,0xff,0xc0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c,0xff,0xff,0xe0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x78,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc0
};
#else
#else
#define START_BMPWIDTH 56
#define START_BMPHEIGHT 19
#define START_BMPBYTEWIDTH 7
......@@ -27,6 +28,7 @@
0x84,0x97,0xc5,0x50,0x1,0x8e,0x1,0x80,0x0,0x0,0x0,0x0,0xff,0x81,0xc0,0x0,0x0,0x10,0x0,0x5f,0xf9,0xe0,0x2,0xd0,0x10,0x0,0x27,0xf1,0xf0,0x3,0x80,0x10,0x0,0x17,0xf1,0xf8,0x3,0x17,0xde,0xee,0xb,0xe1,0xfc,0x3,0x15,0x52,0x8a,0x5,0x81,0xfe,0x3,0x95,0x52,0x8a,0x2,0x1,
0xff,0x2,0xd5,0x5e,0x8f,0x1,0x1,0xff,0x80,0x0,0x0,0x0,0x0,0x3,0xff,0xff,0xff,0xff,0xff,0xff,0xfe
};
#endif
#endif
// Here comes a compile-time operation to match the extruder symbols
......@@ -186,5 +188,3 @@
0x0C,0x00,0x00,0x06,0x00,0x00,0x06,0x00,0x01,0xFF,0xFF,0x80,0x00,0x00,0x00
};
#endif // Extruders
......@@ -115,10 +115,8 @@
// LCD selection
#if ENABLED(U8GLIB_ST7920)
//U8GLIB_ST7920_128X64_RRD u8g(0,0,0);
//U8GLIB_ST7920_128X64_RRD u8g(0);
U8GLIB_ST7920_128X64_1X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS);
#elif defined(U8GLIB_SSD1306)
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0|U8G_I2C_OPT_NO_ACK|U8G_I2C_OPT_FAST);
U8GLIB_ST7920_128X64_RRD u8g(0);
//U8GLIB_ST7920_128X64_1X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS);
#elif ENABLED(MAKRPANEL)
// The MaKrPanel display, ST7565 controller as well
U8GLIB_NHD_C12864 u8g(DOGLCD_CS, DOGLCD_A0);
......@@ -128,10 +126,10 @@
#elif ENABLED(U8GLIB_LM6059_AF)
// Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
#elif defined U8GLIB_SSD1306
#elif ENABLED(U8GLIB_SSD1306)
// Generic support for SSD1306 OLED I2C LCDs
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);
#elif defined(MINIPANEL)
#elif ENABLED(MINIPANEL)
// The MINIPanel display
U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0);
#else
......@@ -193,7 +191,9 @@ char lcd_printPGM(const char* str) {
return n;
}
static bool show_splashscreen = true;
#if ENABLED(SHOW_BOOTSCREEN)
static bool show_bootscreen = true;
#endif
/* Warning: This function is called from interrupt context */
static void lcd_implementation_init() {
......@@ -207,7 +207,7 @@ static void lcd_implementation_init() {
pinMode(LCD_PIN_RESET, OUTPUT);
digitalWrite(LCD_PIN_RESET, HIGH);
#endif
#ifndef MINIPANEL//setContrast not working for Mini Panel
#if DISABLED(MINIPANEL) // setContrast not working for Mini Panel
u8g.setContrast(lcd_contrast);
#endif
// FIXME: remove this workaround
......@@ -223,7 +223,7 @@ static void lcd_implementation_init() {
u8g.setRot270(); // Rotate screen by 270°
#endif
// Show splashscreen
#if ENABLED(SHOW_BOOTSCREEN)
int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
#if ENABLED(START_BMPHIGH)
int offy = 0;
......@@ -235,7 +235,7 @@ static void lcd_implementation_init() {
u8g.firstPage();
do {
if (show_splashscreen) {
if (show_bootscreen) {
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
lcd_setFont(FONT_MENU);
#ifndef STRING_SPLASH_LINE2
......@@ -247,7 +247,12 @@ static void lcd_implementation_init() {
#endif
}
} while (u8g.nextPage());
show_splashscreen = false;
if (show_bootscreen) {
delay(SPLASH_SCREEN_DURATION);
show_bootscreen = false;
}
#endif
}
static void lcd_implementation_clear() { } // Automatically cleared by Picture Loop
......
......@@ -29,6 +29,8 @@
#define LANGUAGE_CHOICE 7 // Pick your language from the list above
#endif
#include "Default_Version.h"
#define PROTOCOL_VERSION "1.0"
#if MB(ULTIMAKER)|| MB(ULTIMAKER_OLD)|| MB(ULTIMAIN_2)
......@@ -51,11 +53,6 @@
#define MACHINE_NAME "3D Printer"
#endif
#ifdef CUSTOM_MENDEL_NAME
#error CUSTOM_MENDEL_NAME deprecated - use CUSTOM_MACHINE_NAME
#define CUSTOM_MACHINE_NAME CUSTOM_MENDEL_NAME
#endif
#ifdef CUSTOM_MACHINE_NAME
#undef MACHINE_NAME
#define MACHINE_NAME CUSTOM_MACHINE_NAME
......@@ -109,7 +106,7 @@
#define MSG_INVALID_EXTRUDER "Invalid extruder"
#define MSG_INVALID_SOLENOID "Invalid solenoid"
#define MSG_ERR_NO_THERMISTORS "No thermistors - no temperature"
#define MSG_M115_REPORT "FIRMWARE_NAME:MarlinKimbra " BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
#define MSG_M115_REPORT "FIRMWARE_NAME:MarlinKimbra " SHORT_BUILD_VERSION " SOURCE_CODE_URL:" SOURCE_CODE_URL " PROTOCOL_VERSION:" PROTOCOL_VERSION " MACHINE_TYPE:" MACHINE_NAME " EXTRUDER_COUNT:" STRINGIFY(EXTRUDERS) " UUID:" MACHINE_UUID "\n"
#define MSG_COUNT_X " Count X: "
#define MSG_ERR_KILLED "Printer halted. kill() called!"
#define MSG_ERR_STOPPED "Printer stopped due to errors. Fix the error and use M999 to restart. (Temperature is reset. Set it after restarting)"
......
......@@ -522,6 +522,10 @@ float junction_deviation = 0.1;
dz = target[Z_AXIS] - position[Z_AXIS],
de = target[E_AXIS] - position[E_AXIS];
#if ENABLED(COREXY) || ENABLED(COREXZ)
int MX = COREX_MOLTILICATOR;
#endif
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
if (de) {
#if ENABLED(NPR2)
......@@ -562,14 +566,14 @@ float junction_deviation = 0.1;
#if ENABLED(COREXY)
// corexy planning
// these equations follow the form of the dA and dB equations on http://www.corexy.com/theory.html
block->steps[A_AXIS] = labs(dx + dy);
block->steps[B_AXIS] = labs(dx - dy);
block->steps[A_AXIS] = labs(dx + MX * dy);
block->steps[B_AXIS] = labs(dx - MX * dy);
block->steps[Z_AXIS] = labs(dz);
#elif ENABLED(COREXZ)
// corexz planning
block->steps[A_AXIS] = labs(dx - 3 * dz);
block->steps[A_AXIS] = labs(dx + MX * dz);
block->steps[Y_AXIS] = labs(dy);
block->steps[C_AXIS] = labs(dx + 3 * dz);
block->steps[C_AXIS] = labs(dx - MX * dz);
#else
// default non-h-bot planning
block->steps[X_AXIS] = labs(dx);
......@@ -603,14 +607,14 @@ float junction_deviation = 0.1;
if (dx < 0) db |= BIT(X_HEAD); // Save the real Extruder (head) direction in X Axis
if (dy < 0) db |= BIT(Y_HEAD); // ...and Y
if (dz < 0) db |= BIT(Z_AXIS);
if (dx + dy < 0) db |= BIT(A_AXIS); // Motor A direction
if (dx - dy < 0) db |= BIT(B_AXIS); // Motor B direction
if (dx + MX * dy < 0) db |= BIT(A_AXIS); // Motor A direction
if (dx - MX * dy < 0) db |= BIT(B_AXIS); // Motor B direction
#elif ENABLED(COREXZ)
if (dx < 0) db |= BIT(X_HEAD); // Save the real Extruder (head) direction in X Axis
if (dy < 0) db |= BIT(Y_AXIS);
if (dz < 0) db |= BIT(Z_HEAD); // ...and Z
if (dx - 3 * dz < 0) db |= BIT(A_AXIS); // Motor A direction
if (dx + 3 * dz < 0) db |= BIT(C_AXIS); // Motor B direction
if (dx + MX * dz < 0) db |= BIT(A_AXIS); // Motor A direction
if (dx - MX * dz < 0) db |= BIT(C_AXIS); // Motor B direction
#else
if (dx < 0) db |= BIT(X_AXIS);
if (dy < 0) db |= BIT(Y_AXIS);
......@@ -627,7 +631,7 @@ float junction_deviation = 0.1;
enable_x();
enable_y();
}
#ifndef Z_LATE_ENABLE
#if DISABLED(Z_LATE_ENABLE)
if (block->steps[Z_AXIS]) enable_z();
#endif
#elif ENABLED(COREXZ)
......@@ -639,14 +643,14 @@ float junction_deviation = 0.1;
#else
if (block->steps[X_AXIS]) enable_x();
if (block->steps[Y_AXIS]) enable_y();
#ifndef Z_LATE_ENABLE
#if DISABLED(Z_LATE_ENABLE)
if (block->steps[Z_AXIS]) enable_z();
#endif
#endif
// Enable extruder(s)
if (block->steps[E_AXIS]) {
#if !defined(MKR4) && !defined(NPR2)
#if DISABLED(MKR4) && DISABLED(NPR2)
if (DISABLE_INACTIVE_EXTRUDER) { //enable only selected extruder
for (int i = 0; i < EXTRUDERS; i++)
......@@ -745,15 +749,15 @@ float junction_deviation = 0.1;
delta_mm[X_HEAD] = dx / axis_steps_per_unit[A_AXIS];
delta_mm[Y_HEAD] = dy / axis_steps_per_unit[B_AXIS];
delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_AXIS];
delta_mm[A_AXIS] = (dx + dy) / axis_steps_per_unit[A_AXIS];
delta_mm[B_AXIS] = (dx - dy) / axis_steps_per_unit[B_AXIS];
delta_mm[A_AXIS] = (dx + MX * dy) / axis_steps_per_unit[A_AXIS];
delta_mm[B_AXIS] = (dx - MX * dy) / axis_steps_per_unit[B_AXIS];
#elif ENABLED(COREXZ)
float delta_mm[6];
delta_mm[X_HEAD] = dx / axis_steps_per_unit[A_AXIS];
delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];
delta_mm[Z_HEAD] = dz / axis_steps_per_unit[C_AXIS];
delta_mm[A_AXIS] = (dx - 3 * dz) / axis_steps_per_unit[A_AXIS];
delta_mm[C_AXIS] = (dx + 3 * dz) / axis_steps_per_unit[C_AXIS];
delta_mm[A_AXIS] = (dx + MX * dz) / axis_steps_per_unit[A_AXIS];
delta_mm[C_AXIS] = (dx - MX * dz) / axis_steps_per_unit[C_AXIS];
#else
float delta_mm[4];
delta_mm[X_AXIS] = dx / axis_steps_per_unit[X_AXIS];
......
......@@ -298,11 +298,11 @@
#error Thermal Runaway Protection for the bed must now be enabled with THERMAL_PROTECTION_BED.
#endif
#ifdef PROBE_SERVO_DEACTIVATION_DELAY
#if ENABLED(PROBE_SERVO_DEACTIVATION_DELAY)
#error PROBE_SERVO_DEACTIVATION_DELAY has been replaced with DEACTIVATE_SERVOS_AFTER_MOVE and SERVO_DEACTIVATION_DELAY.
#endif
#if defined(COREXZ) && defined(Z_LATE_ENABLE)
#if ENABLED(COREXZ) && ENABLED(Z_LATE_ENABLE)
#error "Z_LATE_ENABLE can't be used with COREXZ."
#endif
......@@ -314,7 +314,7 @@
#error SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions.
#endif
#ifdef SDCARDDETECTINVERTED
#if ENABLED(SDCARDDETECTINVERTED)
#error SDCARDDETECTINVERTED is now SD_DETECT_INVERTED. Please update your configuration.
#endif
......
......@@ -301,7 +301,7 @@ void enable_endstops(bool check) {
// Check endstops
inline void update_endstops() {
#ifdef Z_DUAL_ENDSTOPS
#if ENABLED(Z_DUAL_ENDSTOPS)
uint16_t
#else
byte
......@@ -329,12 +329,12 @@ inline void update_endstops() {
step_events_completed = current_block->step_event_count; \
}
#ifdef COREXY
#if ENABLED(COREXY)
// Head direction in -X axis for CoreXY bots.
// If DeltaX == -DeltaY, the movement is only in Y axis
if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, B_AXIS))) {
if (TEST(out_bits, X_HEAD))
#elif defined(COREXZ)
#elif ENABLED(COREXZ)
// Head direction in -X axis for CoreXZ bots.
// If DeltaX == -DeltaZ, the movement is only in Z axis
if ((current_block->steps[A_AXIS] != current_block->steps[C_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, C_AXIS))) {
......@@ -343,7 +343,7 @@ inline void update_endstops() {
if (TEST(out_bits, X_AXIS)) // stepping along -X axis (regular Cartesian bot)
#endif
{ // -direction
#ifdef DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
// with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
#endif
......@@ -354,7 +354,7 @@ inline void update_endstops() {
}
}
else { // +direction
#ifdef DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
// with 2 x-carriages, endstops are only checked in the homing direction for the active extruder
if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) || (current_block->active_extruder != 0 && X2_HOME_DIR == 1))
#endif
......@@ -364,11 +364,11 @@ inline void update_endstops() {
#endif
}
}
#if defined(COREXY) || defined(COREXZ)
#if ENABLED(COREXY) || ENABLED(COREXZ)
}
#endif
#ifdef COREXY
#if ENABLED(COREXY)
// Head direction in -Y axis for CoreXY bots.
// If DeltaX == DeltaY, the movement is only in X axis
if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS))) {
......@@ -386,11 +386,11 @@ inline void update_endstops() {
UPDATE_ENDSTOP(Y, MAX);
#endif
}
#if defined(COREXY)
#if ENABLED(COREXY)
}
#endif
#ifdef COREXZ
#if ENABLED(COREXZ)
// Head direction in -Z axis for CoreXZ bots.
// If DeltaX == DeltaZ, the movement is only in X axis
if ((current_block->steps[A_AXIS] != current_block->steps[C_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, C_AXIS))) {
......@@ -401,7 +401,7 @@ inline void update_endstops() {
{ // z -direction
#if HAS_Z_MIN
#ifdef Z_DUAL_ENDSTOPS
#if ENABLED(Z_DUAL_ENDSTOPS)
SET_ENDSTOP_BIT(Z, MIN);
#if HAS_Z2_MIN
SET_ENDSTOP_BIT(Z2, MIN);
......@@ -423,7 +423,7 @@ inline void update_endstops() {
#endif // !Z_DUAL_ENDSTOPS
#endif // Z_MIN_PIN
#ifdef Z_PROBE_ENDSTOP
#if ENABLED(Z_PROBE_ENDSTOP)
UPDATE_ENDSTOP(Z, PROBE);
if (TEST_ENDSTOP(Z_PROBE))
......@@ -436,7 +436,7 @@ inline void update_endstops() {
else { // z +direction
#if HAS_Z_MAX
#ifdef Z_DUAL_ENDSTOPS
#if ENABLED(Z_DUAL_ENDSTOPS)
SET_ENDSTOP_BIT(Z, MAX);
#if HAS_Z2_MAX
......@@ -461,7 +461,7 @@ inline void update_endstops() {
#endif // !Z_DUAL_ENDSTOPS
#endif // Z_MAX_PIN
}
#if defined(COREXZ)
#if ENABLED(COREXZ)
}
#endif
old_endstop_bits = current_endstop_bits;
......@@ -647,7 +647,7 @@ ISR(TIMER1_COMPA_vect) {
// Take multiple steps per interrupt (For high speed moves)
for (int8_t i = 0; i < step_loops; i++) {
#ifndef USBCON
MSerial.checkRx(); // Check for serial chars.
customizedSerial.checkRx(); // Check for serial chars.
#endif
#if ENABLED(ADVANCE)
......
......@@ -141,7 +141,7 @@ static unsigned char soft_pwm[HOTENDS];
static int minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS( HEATER_0_RAW_LO_TEMP , HEATER_1_RAW_LO_TEMP , HEATER_2_RAW_LO_TEMP, HEATER_3_RAW_LO_TEMP);
static int maxttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS( HEATER_0_RAW_HI_TEMP , HEATER_1_RAW_HI_TEMP , HEATER_2_RAW_HI_TEMP, HEATER_3_RAW_HI_TEMP);
static int minttemp[HOTENDS] = { 0 };
static int maxttemp[HOTENDS] = ARRAY_BY_HOTENDS( 16383, 16383, 16383, 16383 );
static int maxttemp[HOTENDS] = ARRAY_BY_HOTENDS1( 16383 );
#ifdef BED_MINTEMP
static int bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP;
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment