Apply remaining ENABLED/DISABLED conditionals

master
Scott Lahteine 9 years ago committed by Richard Wackerbarth
parent 4a72d2ba9c
commit 46453905d6

@ -75,7 +75,7 @@
#define NEWPANEL #define NEWPANEL
#endif #endif
#ifdef MINIPANEL #if ENABLED(MINIPANEL)
#define DOGLCD #define DOGLCD
#define SDSUPPORT #define SDSUPPORT
#define ULTIPANEL #define ULTIPANEL

@ -23,7 +23,7 @@
#include "Marlin.h" #include "Marlin.h"
#ifdef M100_FREE_MEMORY_WATCHER #if ENABLED(M100_FREE_MEMORY_WATCHER)
extern void *__brkval; extern void *__brkval;
extern size_t __heap_start, __heap_end, __flp; extern size_t __heap_start, __heap_end, __flp;
@ -73,7 +73,7 @@ int i, j, n;
// the right hand column to help spotting them. // the right hand column to help spotting them.
// //
#ifdef M100_FREE_MEMORY_DUMPER // Comment out to remove Dump sub-command #if ENABLED(M100_FREE_MEMORY_DUMPER) // Disable to remove Dump sub-command
if ( code_seen('D') ) { if ( code_seen('D') ) {
ptr = (unsigned char *) __brkval; ptr = (unsigned char *) __brkval;
@ -163,7 +163,7 @@ int i, j, n;
// M100 C x Corrupts x locations in the free memory pool and reports the locations of the corruption. // M100 C x Corrupts x locations in the free memory pool and reports the locations of the corruption.
// This is useful to check the correctness of the M100 D and the M100 F commands. // This is useful to check the correctness of the M100 D and the M100 F commands.
// //
#ifdef M100_FREE_MEMORY_CORRUPTOR #if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
if ( code_seen('C') ) { if ( code_seen('C') ) {
int x; // x gets the # of locations to corrupt within the memory pool int x; // x gets the # of locations to corrupt within the memory pool
x = code_value(); x = code_value();

@ -4900,7 +4900,7 @@ inline void gcode_M503() {
LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE); LCD_ALERTMESSAGEPGM(MSG_FILAMENTCHANGE);
millis_t next_tick = 0; millis_t next_tick = 0;
while (!lcd_clicked()) { while (!lcd_clicked()) {
#ifndef AUTO_FILAMENT_CHANGE #if DISABLED(AUTO_FILAMENT_CHANGE)
millis_t ms = millis(); millis_t ms = millis();
if (ms >= next_tick) { if (ms >= next_tick) {
lcd_quick_feedback(); lcd_quick_feedback();
@ -4918,7 +4918,7 @@ inline void gcode_M503() {
} // while(!lcd_clicked) } // while(!lcd_clicked)
lcd_quick_feedback(); // click sound feedback lcd_quick_feedback(); // click sound feedback
#ifdef AUTO_FILAMENT_CHANGE #if ENABLED(AUTO_FILAMENT_CHANGE)
current_position[E_AXIS] = 0; current_position[E_AXIS] = 0;
st_synchronize(); st_synchronize();
#endif #endif
@ -5377,7 +5377,7 @@ void process_next_command() {
break; break;
#endif // ENABLE_AUTO_BED_LEVELING && Z_PROBE_REPEATABILITY_TEST #endif // ENABLE_AUTO_BED_LEVELING && Z_PROBE_REPEATABILITY_TEST
#ifdef M100_FREE_MEMORY_WATCHER #if ENABLED(M100_FREE_MEMORY_WATCHER)
case 100: case 100:
gcode_M100(); gcode_M100();
break; break;
@ -6228,9 +6228,9 @@ void plan_arc(
clamp_to_software_endstops(arc_target); clamp_to_software_endstops(arc_target);
#if defined(DELTA) || defined(SCARA) #if ENABLED(DELTA) || ENABLED(SCARA)
calculate_delta(arc_target); calculate_delta(arc_target);
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(ENABLE_AUTO_BED_LEVELING)
adjust_delta(arc_target); adjust_delta(arc_target);
#endif #endif
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], arc_target[E_AXIS], feed_rate, active_extruder); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], arc_target[E_AXIS], feed_rate, active_extruder);
@ -6240,9 +6240,9 @@ void plan_arc(
} }
// Ensure last segment arrives at target location. // Ensure last segment arrives at target location.
#if defined(DELTA) || defined(SCARA) #if ENABLED(DELTA) || ENABLED(SCARA)
calculate_delta(target); calculate_delta(target);
#ifdef ENABLE_AUTO_BED_LEVELING #if ENABLED(ENABLE_AUTO_BED_LEVELING)
adjust_delta(target); adjust_delta(target);
#endif #endif
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], feed_rate, active_extruder); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], target[E_AXIS], feed_rate, active_extruder);

@ -9,7 +9,7 @@
lcd_buzz(duration, freq); lcd_buzz(duration, freq);
#elif PIN_EXISTS(BEEPER) // on-board buzzers have no further condition #elif PIN_EXISTS(BEEPER) // on-board buzzers have no further condition
SET_OUTPUT(BEEPER_PIN); SET_OUTPUT(BEEPER_PIN);
#ifdef SPEAKER // a speaker needs a AC ore a pulsed DC #if ENABLED(SPEAKER) // a speaker needs a AC ore a pulsed DC
//tone(BEEPER_PIN, freq, duration); // needs a PWMable pin //tone(BEEPER_PIN, freq, duration); // needs a PWMable pin
unsigned int delay = 1000000 / freq / 2; unsigned int delay = 1000000 / freq / 2;
int i = duration * freq / 1000; int i = duration * freq / 1000;

@ -125,10 +125,10 @@
#elif ENABLED(U8GLIB_LM6059_AF) #elif ENABLED(U8GLIB_LM6059_AF)
// Based on the Adafruit ST7565 (http://www.adafruit.com/products/250) // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0); U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
#elif defined U8GLIB_SSD1306 #elif ENABLED(U8GLIB_SSD1306)
// Generic support for SSD1306 OLED I2C LCDs // Generic support for SSD1306 OLED I2C LCDs
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);
#elif defined(MINIPANEL) #elif ENABLED(MINIPANEL)
// The MINIPanel display // The MINIPanel display
U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0);
#else #else
@ -206,7 +206,7 @@ static void lcd_implementation_init() {
pinMode(LCD_PIN_RESET, OUTPUT); pinMode(LCD_PIN_RESET, OUTPUT);
digitalWrite(LCD_PIN_RESET, HIGH); digitalWrite(LCD_PIN_RESET, HIGH);
#endif #endif
#ifndef MINIPANEL//setContrast not working for Mini Panel #if DISABLED(MINIPANEL) // setContrast not working for Mini Panel
u8g.setContrast(lcd_contrast); u8g.setContrast(lcd_contrast);
#endif #endif
// FIXME: remove this workaround // FIXME: remove this workaround

@ -301,7 +301,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -286,7 +286,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX
@ -727,7 +727,7 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic
// With this option servos are powered only during movement, then turned off to prevent jitter. // With this option servos are powered only during movement, then turned off to prevent jitter.
//#define DEACTIVATE_SERVOS_AFTER_MOVE //#define DEACTIVATE_SERVOS_AFTER_MOVE
#ifdef DEACTIVATE_SERVOS_AFTER_MOVE #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
// Delay (in microseconds) before turning the servo off. This depends on the servo speed. // Delay (in microseconds) before turning the servo off. This depends on the servo speed.
// 300ms is a good value but you can try less delay. // 300ms is a good value but you can try less delay.
// If the servo can't reach the requested position, increase it. // If the servo can't reach the requested position, increase it.

@ -311,7 +311,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -307,7 +307,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -319,7 +319,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -327,7 +327,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
//#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors //#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -311,7 +311,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -319,7 +319,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -354,7 +354,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -354,7 +354,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -354,7 +354,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -341,7 +341,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -322,7 +322,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -309,7 +309,7 @@ Here are some standard links for getting your machine calibrated:
// coarse Endstop Settings // coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors #define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors
#ifndef ENDSTOPPULLUPS #if DISABLED(ENDSTOPPULLUPS)
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined // fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX // #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX // #define ENDSTOPPULLUP_YMAX

@ -80,7 +80,7 @@
#define TEMP_BED_PIN 1 // ANALOG NUMBERING #define TEMP_BED_PIN 1 // ANALOG NUMBERING
#endif #endif
#ifdef MINIPANEL #if ENABLED(MINIPANEL)
#define BEEPER_PIN 46 #define BEEPER_PIN 46
// Pins for DOGM SPI LCD Support // Pins for DOGM SPI LCD Support
#define DOGLCD_A0 47 #define DOGLCD_A0 47

@ -60,7 +60,7 @@
#define BEEPER_PIN 33 // AUX-4 #define BEEPER_PIN 33 // AUX-4
#if defined(ULTRA_LCD) && defined(NEWPANEL) #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
#define LCD_PINS_RS 16 #define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17 #define LCD_PINS_ENABLE 17

@ -45,7 +45,7 @@
#endif #endif
#define X_STOP_PIN 35 #define X_STOP_PIN 35
#ifdef SDSUPPORT #if ENABLED(SDSUPPORT)
#define Y_STOP_PIN 37 // Move Ystop to Estop socket #define Y_STOP_PIN 37 // Move Ystop to Estop socket
#else #else
#define Y_STOP_PIN 8 // Ystop in Ystop socket #define Y_STOP_PIN 8 // Ystop in Ystop socket

@ -182,7 +182,7 @@
#define DOGLCD_CS 29 #define DOGLCD_CS 29
#define DOGLCD_A0 27 #define DOGLCD_A0 27
#define LCD_PIN_BL 33 #define LCD_PIN_BL 33
#elif defined(MINIPANEL) #elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42 #define BEEPER_PIN 42
// Pins for DOGM SPI LCD Support // Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44 #define DOGLCD_A0 44

@ -46,7 +46,7 @@
#undef SD_DETECT_PIN #undef SD_DETECT_PIN
#define SD_DETECT_PIN 22 #define SD_DETECT_PIN 22
#elif defined(REPRAP_DISCOUNT_SMART_CONTROLLER) #elif ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#undef BEEPER_PIN #undef BEEPER_PIN
#define BEEPER_PIN -1 #define BEEPER_PIN -1
@ -61,10 +61,10 @@
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#undef MAX6675_SS #undef MAX6675_SS
#ifndef SDSUPPORT #if ENABLED(SDSUPPORT)
#define MAX6675_SS 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card
#else
#define MAX6675_SS 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present #define MAX6675_SS 49 // Don't use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#else
#define MAX6675_SS 53 // Don't use pin 53 if there is even the remote possibility of using Display/SD card
#endif #endif
// RigidBot swaps E0 / E1 plugs vs RAMPS 1.3 // RigidBot swaps E0 / E1 plugs vs RAMPS 1.3

@ -542,7 +542,7 @@ float junction_deviation = 0.1;
block->steps[A_AXIS] = labs(dx + dy); block->steps[A_AXIS] = labs(dx + dy);
block->steps[B_AXIS] = labs(dx - dy); block->steps[B_AXIS] = labs(dx - dy);
block->steps[Z_AXIS] = labs(dz); block->steps[Z_AXIS] = labs(dz);
#elif defined(COREXZ) #elif ENABLED(COREXZ)
// corexz planning // corexz planning
block->steps[A_AXIS] = labs(dx + dz); block->steps[A_AXIS] = labs(dx + dz);
block->steps[Y_AXIS] = labs(dy); block->steps[Y_AXIS] = labs(dy);
@ -577,7 +577,7 @@ float junction_deviation = 0.1;
if (dz < 0) db |= BIT(Z_AXIS); if (dz < 0) db |= BIT(Z_AXIS);
if (dx + dy < 0) db |= BIT(A_AXIS); // Motor A direction if (dx + dy < 0) db |= BIT(A_AXIS); // Motor A direction
if (dx - dy < 0) db |= BIT(B_AXIS); // Motor B direction if (dx - dy < 0) db |= BIT(B_AXIS); // Motor B direction
#elif defined(COREXZ) #elif ENABLED(COREXZ)
if (dx < 0) db |= BIT(X_HEAD); // Save the real Extruder (head) direction in X Axis if (dx < 0) db |= BIT(X_HEAD); // Save the real Extruder (head) direction in X Axis
if (dy < 0) db |= BIT(Y_AXIS); if (dy < 0) db |= BIT(Y_AXIS);
if (dz < 0) db |= BIT(Z_HEAD); // ...and Z if (dz < 0) db |= BIT(Z_HEAD); // ...and Z
@ -599,10 +599,10 @@ float junction_deviation = 0.1;
enable_x(); enable_x();
enable_y(); enable_y();
} }
#ifndef Z_LATE_ENABLE #if DISABLED(Z_LATE_ENABLE)
if (block->steps[Z_AXIS]) enable_z(); if (block->steps[Z_AXIS]) enable_z();
#endif #endif
#elif defined(COREXZ) #elif ENABLED(COREXZ)
if (block->steps[A_AXIS] || block->steps[C_AXIS]) { if (block->steps[A_AXIS] || block->steps[C_AXIS]) {
enable_x(); enable_x();
enable_z(); enable_z();
@ -611,7 +611,7 @@ float junction_deviation = 0.1;
#else #else
if (block->steps[X_AXIS]) enable_x(); if (block->steps[X_AXIS]) enable_x();
if (block->steps[Y_AXIS]) enable_y(); if (block->steps[Y_AXIS]) enable_y();
#ifndef Z_LATE_ENABLE #if DISABLED(Z_LATE_ENABLE)
if (block->steps[Z_AXIS]) enable_z(); if (block->steps[Z_AXIS]) enable_z();
#endif #endif
#endif #endif
@ -700,7 +700,7 @@ float junction_deviation = 0.1;
delta_mm[Z_AXIS] = dz / axis_steps_per_unit[Z_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[A_AXIS] = (dx + dy) / axis_steps_per_unit[A_AXIS];
delta_mm[B_AXIS] = (dx - dy) / axis_steps_per_unit[B_AXIS]; delta_mm[B_AXIS] = (dx - dy) / axis_steps_per_unit[B_AXIS];
#elif defined(COREXZ) #elif ENABLED(COREXZ)
float delta_mm[6]; float delta_mm[6];
delta_mm[X_HEAD] = dx / axis_steps_per_unit[A_AXIS]; delta_mm[X_HEAD] = dx / axis_steps_per_unit[A_AXIS];
delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS]; delta_mm[Y_AXIS] = dy / axis_steps_per_unit[Y_AXIS];

@ -307,7 +307,7 @@ bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; }
void Servo::move(int value) { void Servo::move(int value) {
if (this->attach(0) >= 0) { if (this->attach(0) >= 0) {
this->write(value); this->write(value);
#ifdef DEACTIVATE_SERVOS_AFTER_MOVE #if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
delay(SERVO_DEACTIVATION_DELAY); delay(SERVO_DEACTIVATION_DELAY);
this->detach(); this->detach();
#endif #endif

@ -289,7 +289,7 @@ void enable_endstops(bool check) { check_endstops = check; }
// Check endstops // Check endstops
inline void update_endstops() { inline void update_endstops() {
#ifdef Z_DUAL_ENDSTOPS #if ENABLED(Z_DUAL_ENDSTOPS)
uint16_t uint16_t
#else #else
byte byte
@ -317,12 +317,12 @@ inline void update_endstops() {
step_events_completed = current_block->step_event_count; \ step_events_completed = current_block->step_event_count; \
} }
#ifdef COREXY #if ENABLED(COREXY)
// Head direction in -X axis for CoreXY bots. // Head direction in -X axis for CoreXY bots.
// If DeltaX == -DeltaY, the movement is only in Y axis // 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 ((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)) if (TEST(out_bits, X_HEAD))
#elif defined(COREXZ) #elif ENABLED(COREXZ)
// Head direction in -X axis for CoreXZ bots. // Head direction in -X axis for CoreXZ bots.
// If DeltaX == -DeltaZ, the movement is only in Z axis // 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))) { if ((current_block->steps[A_AXIS] != current_block->steps[C_AXIS]) || (TEST(out_bits, A_AXIS) == TEST(out_bits, C_AXIS))) {
@ -331,7 +331,7 @@ inline void update_endstops() {
if (TEST(out_bits, X_AXIS)) // stepping along -X axis (regular Cartesian bot) if (TEST(out_bits, X_AXIS)) // stepping along -X axis (regular Cartesian bot)
#endif #endif
{ // -direction { // -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 // 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)) if ((current_block->active_extruder == 0 && X_HOME_DIR == -1) || (current_block->active_extruder != 0 && X2_HOME_DIR == -1))
#endif #endif
@ -342,7 +342,7 @@ inline void update_endstops() {
} }
} }
else { // +direction 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 // 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)) if ((current_block->active_extruder == 0 && X_HOME_DIR == 1) || (current_block->active_extruder != 0 && X2_HOME_DIR == 1))
#endif #endif
@ -352,11 +352,11 @@ inline void update_endstops() {
#endif #endif
} }
} }
#if defined(COREXY) || defined(COREXZ) #if ENABLED(COREXY) || ENABLED(COREXZ)
} }
#endif #endif
#ifdef COREXY #if ENABLED(COREXY)
// Head direction in -Y axis for CoreXY bots. // Head direction in -Y axis for CoreXY bots.
// If DeltaX == DeltaY, the movement is only in X axis // 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))) { if ((current_block->steps[A_AXIS] != current_block->steps[B_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, B_AXIS))) {
@ -374,11 +374,11 @@ inline void update_endstops() {
UPDATE_ENDSTOP(Y, MAX); UPDATE_ENDSTOP(Y, MAX);
#endif #endif
} }
#if defined(COREXY) #if ENABLED(COREXY)
} }
#endif #endif
#ifdef COREXZ #if ENABLED(COREXZ)
// Head direction in -Z axis for CoreXZ bots. // Head direction in -Z axis for CoreXZ bots.
// If DeltaX == DeltaZ, the movement is only in X axis // 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))) { if ((current_block->steps[A_AXIS] != current_block->steps[C_AXIS]) || (TEST(out_bits, A_AXIS) != TEST(out_bits, C_AXIS))) {
@ -389,7 +389,7 @@ inline void update_endstops() {
{ // z -direction { // z -direction
#if HAS_Z_MIN #if HAS_Z_MIN
#ifdef Z_DUAL_ENDSTOPS #if ENABLED(Z_DUAL_ENDSTOPS)
SET_ENDSTOP_BIT(Z, MIN); SET_ENDSTOP_BIT(Z, MIN);
#if HAS_Z2_MIN #if HAS_Z2_MIN
SET_ENDSTOP_BIT(Z2, MIN); SET_ENDSTOP_BIT(Z2, MIN);
@ -411,7 +411,7 @@ inline void update_endstops() {
#endif // !Z_DUAL_ENDSTOPS #endif // !Z_DUAL_ENDSTOPS
#endif // Z_MIN_PIN #endif // Z_MIN_PIN
#ifdef Z_PROBE_ENDSTOP #if ENABLED(Z_PROBE_ENDSTOP)
UPDATE_ENDSTOP(Z, PROBE); UPDATE_ENDSTOP(Z, PROBE);
if (TEST_ENDSTOP(Z_PROBE)) if (TEST_ENDSTOP(Z_PROBE))
@ -424,7 +424,7 @@ inline void update_endstops() {
else { // z +direction else { // z +direction
#if HAS_Z_MAX #if HAS_Z_MAX
#ifdef Z_DUAL_ENDSTOPS #if ENABLED(Z_DUAL_ENDSTOPS)
SET_ENDSTOP_BIT(Z, MAX); SET_ENDSTOP_BIT(Z, MAX);
#if HAS_Z2_MAX #if HAS_Z2_MAX
@ -449,7 +449,7 @@ inline void update_endstops() {
#endif // !Z_DUAL_ENDSTOPS #endif // !Z_DUAL_ENDSTOPS
#endif // Z_MAX_PIN #endif // Z_MAX_PIN
#ifdef Z_PROBE_ENDSTOP #if ENABLED(Z_PROBE_ENDSTOP)
UPDATE_ENDSTOP(Z, PROBE); UPDATE_ENDSTOP(Z, PROBE);
if (TEST_ENDSTOP(Z_PROBE)) if (TEST_ENDSTOP(Z_PROBE))
@ -459,7 +459,7 @@ inline void update_endstops() {
} }
#endif #endif
} }
#if defined(COREXZ) #if ENABLED(COREXZ)
} }
#endif #endif
old_endstop_bits = current_endstop_bits; old_endstop_bits = current_endstop_bits;

@ -275,7 +275,7 @@ static void lcd_status_screen() {
#if ENABLED(LCD_PROGRESS_BAR) #if ENABLED(LCD_PROGRESS_BAR)
millis_t ms = millis(); millis_t ms = millis();
#ifndef PROGRESS_MSG_ONCE #if DISABLED(PROGRESS_MSG_ONCE)
if (ms > progress_bar_ms + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME) { if (ms > progress_bar_ms + PROGRESS_BAR_MSG_TIME + PROGRESS_BAR_BAR_TIME) {
progress_bar_ms = ms; progress_bar_ms = ms;
} }

@ -6,7 +6,7 @@
* When selecting the Russian language, a slightly different LCD implementation is used to handle UTF8 characters. * When selecting the Russian language, a slightly different LCD implementation is used to handle UTF8 characters.
**/ **/
//#ifndef REPRAPWORLD_KEYPAD //#if DISABLED(REPRAPWORLD_KEYPAD)
// extern volatile uint8_t buttons; //the last checked buttons in a bit array. // extern volatile uint8_t buttons; //the last checked buttons in a bit array.
//#else //#else
extern volatile uint8_t buttons; //an extended version of the last checked buttons in a bit array. extern volatile uint8_t buttons; //an extended version of the last checked buttons in a bit array.

Loading…
Cancel
Save