Commit 70821c6d authored by Simone Primarosa's avatar Simone Primarosa

Update 4.2.X apha

Code clean
parent 55c929f1
#ifndef CONFIGURATION_MECHANISM #ifndef CONFIGURATION_MECHANISM
#define CONFIGURATION_MECHANISM #define CONFIGURATION_MECHANISM
#define KNOWN_MECH 1
/* /*
* This configuration file contains mechanism settings for cartesian printer. * This configuration file contains mechanism settings for cartesian printer.
* *
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
* - Homing feedrate * - Homing feedrate
* - Hotend offset * - Hotend offset
* *
* Basic-settings can be found in configuration_basic.h * Basic-settings can be found in Configuration_Basic.h
* Feature-settings can be found in configuration_feature.h * Feature-settings can be found in Configuration_Feature.h
*/ */
/***************************************************************************************** /*****************************************************************************************
......
#ifndef CONFIGURATION_MECHANISM #ifndef CONFIGURATION_MECHANISM
#define CONFIGURATION_MECHANISM #define CONFIGURATION_MECHANISM
#define KNOWN_MECH 1
/* /*
* This configuration file contains mechanism settings for cartesian printer. * This configuration file contains mechanism settings for cartesian printer.
...@@ -23,8 +24,8 @@ ...@@ -23,8 +24,8 @@
* - Homing feedrate * - Homing feedrate
* - Hotend offset * - Hotend offset
* *
* Basic-settings can be found in configuration_basic.h * Basic-settings can be found in Configuration_Basic.h
* Feature-settings can be found in configuration_feature.h * Feature-settings can be found in Configuration_Feature.h
*/ */
/***************************************************************************************** /*****************************************************************************************
......
#ifndef CONFIGURATION_MECHANISM #ifndef CONFIGURATION_MECHANISM
#define CONFIGURATION_MECHANISM #define CONFIGURATION_MECHANISM
#define KNOWN_MECH 1
/* /*
* This configuration file contains mechanism settings for cartesian printer. * This configuration file contains mechanism settings for cartesian printer.
...@@ -22,8 +23,8 @@ ...@@ -22,8 +23,8 @@
* - Homing feedrate * - Homing feedrate
* - Hotend offset * - Hotend offset
* *
* Basic-settings can be found in configuration_basic.h * Basic-settings can be found in Configuration_Basic.h
* Feature-settings can be found in configuration_feature.h * Feature-settings can be found in Configuration_Feature.h
*/ */
/***************************************************************************************** /*****************************************************************************************
......
#ifndef CONFIGURATION_MECHANISM #ifndef CONFIGURATION_MECHANISM
#define CONFIGURATION_MECHANISM #define CONFIGURATION_MECHANISM
#define KNOWN_MECH 1
/* /*
* This configuration file contains mechanism settings for cartesian printer. * This configuration file contains mechanism settings for cartesian printer.
...@@ -23,8 +24,8 @@ ...@@ -23,8 +24,8 @@
* - Homing feedrate * - Homing feedrate
* - Hotend offset * - Hotend offset
* *
* Basic-settings can be found in configuration_basic.h * Basic-settings can be found in Configuration_Basic.h
* Feature-settings can be found in configuration_feature.h * Feature-settings can be found in Configuration_Feature.h
*/ */
/***************************************************************************************** /*****************************************************************************************
......
...@@ -23,7 +23,7 @@ ...@@ -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;
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
// probably caused by bad pointers. Any unexpected values will be flagged in // probably caused by bad pointers. Any unexpected values will be flagged in
// 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) // Comment out to remove Dump sub-command
if ( code_seen('D') ) { if ( code_seen('D') ) {
ptr = (unsigned char *) __brkval; ptr = (unsigned char *) __brkval;
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
// 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();
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <avr/pgmspace.h> #include <avr/pgmspace.h>
#include <avr/interrupt.h> #include <avr/interrupt.h>
#include "Configuration.h" #include "Configuration_Basic.h"
#include "pins.h" #include "pins.h"
#ifndef SANITYCHECK_H #ifndef SANITYCHECK_H
...@@ -225,7 +225,7 @@ extern float home_offset[3]; ...@@ -225,7 +225,7 @@ extern float home_offset[3];
// Hotend offset // Hotend offset
#if HOTENDS > 1 #if HOTENDS > 1
#ifndef DUAL_X_CARRIAGE #if DISABLED(DUAL_X_CARRIAGE)
#define NUM_HOTEND_OFFSETS 2 // only in XY plane #define NUM_HOTEND_OFFSETS 2 // only in XY plane
#else #else
#define NUM_HOTEND_OFFSETS 3 // supports offsets in XYZ plane #define NUM_HOTEND_OFFSETS 3 // supports offsets in XYZ plane
......
...@@ -30,27 +30,27 @@ ...@@ -30,27 +30,27 @@
/* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */ /* All the implementation is done in *.cpp files to get better compatibility with avr-gcc without the Arduino IDE */
/* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */ /* Use this file to help the Arduino IDE find which Arduino libraries are needed and to keep documentation on GCode */
#include "Configuration.h" #include "Configuration_Basic.h"
#include "pins.h" #include "pins.h"
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#if defined(LCD_I2C_TYPE_PCF8575) #if ENABLED(LCD_I2C_TYPE_PCF8575)
#include <Wire.h> #include <Wire.h>
#include <LiquidCrystal_I2C.h> #include <LiquidCrystal_I2C.h>
#elif defined(LCD_I2C_TYPE_MCP23017) || defined(LCD_I2C_TYPE_MCP23008) #elif ENABLED(LCD_I2C_TYPE_MCP23017) || ENABLED(LCD_I2C_TYPE_MCP23008)
#include <Wire.h> #include <Wire.h>
#include <LiquidTWI2.h> #include <LiquidTWI2.h>
#elif defined(DOGLCD) #elif ENABLED(DOGLCD)
#include <U8glib.h> // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/) #include <U8glib.h> // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)
#else #else
#include <LiquidCrystal.h> // library for character LCD #include <LiquidCrystal.h> // library for character LCD
#endif #endif
#endif #endif
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1 #if ENABLED(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
#include <SPI.h> #include <SPI.h>
#endif #endif
#if defined(DIGIPOT_I2C) #if ENABLED(DIGIPOT_I2C)
#include <Wire.h> #include <Wire.h>
#endif #endif
...@@ -310,7 +310,7 @@ unsigned long printer_usage_seconds; ...@@ -310,7 +310,7 @@ unsigned long printer_usage_seconds;
// Hotend offset // Hotend offset
#if HOTENDS > 1 #if HOTENDS > 1
#ifndef DUAL_X_CARRIAGE #if DISABLED(DUAL_X_CARRIAGE)
#define NUM_HOTEND_OFFSETS 2 // only in XY plane #define NUM_HOTEND_OFFSETS 2 // only in XY plane
#else #else
#define NUM_HOTEND_OFFSETS 3 // supports offsets in XYZ plane #define NUM_HOTEND_OFFSETS 3 // supports offsets in XYZ plane
...@@ -772,12 +772,12 @@ void setup() { ...@@ -772,12 +772,12 @@ void setup() {
setup_homepin(); setup_homepin();
#ifdef STAT_LED_RED #if ENABLED(STAT_LED_RED)
pinMode(STAT_LED_RED, OUTPUT); pinMode(STAT_LED_RED, OUTPUT);
digitalWrite(STAT_LED_RED, LOW); // turn it off digitalWrite(STAT_LED_RED, LOW); // turn it off
#endif #endif
#ifdef STAT_LED_BLUE #if ENABLED(STAT_LED_BLUE)
pinMode(STAT_LED_BLUE, OUTPUT); pinMode(STAT_LED_BLUE, OUTPUT);
digitalWrite(STAT_LED_BLUE, LOW); // turn it off digitalWrite(STAT_LED_BLUE, LOW); // turn it off
#endif #endif
...@@ -1215,7 +1215,7 @@ static void set_axis_is_at_home(AxisEnum axis) { ...@@ -1215,7 +1215,7 @@ static void set_axis_is_at_home(AxisEnum axis) {
*/ */
inline void set_homing_bump_feedrate(AxisEnum axis) { inline void set_homing_bump_feedrate(AxisEnum axis) {
const int homing_bump_divisor[] = HOMING_BUMP_DIVISOR; const int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
#ifdef DELTA #if MECH(DELTA)
if (homing_bump_divisor[X_AXIS] >= 1) if (homing_bump_divisor[X_AXIS] >= 1)
feedrate = homing_feedrate[axis] / homing_bump_divisor[X_AXIS]; feedrate = homing_feedrate[axis] / homing_bump_divisor[X_AXIS];
#else // No DELTA #else // No DELTA
...@@ -1580,7 +1580,7 @@ static void clean_up_after_endstop_move() { ...@@ -1580,7 +1580,7 @@ static void clean_up_after_endstop_move() {
print_xyz("> TRIGGER ENDSTOP > current_position", current_position); print_xyz("> TRIGGER ENDSTOP > current_position", current_position);
} }
#ifdef Z_DUAL_ENDSTOPS #if ENABLED(Z_DUAL_ENDSTOPS)
if (axis == Z_AXIS) { if (axis == Z_AXIS) {
float adj = fabs(z_endstop_adj); float adj = fabs(z_endstop_adj);
bool lockZ1; bool lockZ1;
...@@ -2569,7 +2569,7 @@ static void clean_up_after_endstop_move() { ...@@ -2569,7 +2569,7 @@ static void clean_up_after_endstop_move() {
sync_plan_position_delta(); sync_plan_position_delta();
#ifdef ENDSTOPS_ONLY_FOR_HOMING #if ENABLED(ENDSTOPS_ONLY_FOR_HOMING)
enable_endstops(false); enable_endstops(false);
#endif #endif
...@@ -2673,7 +2673,7 @@ static void clean_up_after_endstop_move() { ...@@ -2673,7 +2673,7 @@ static void clean_up_after_endstop_move() {
} }
#endif #endif
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
void retract(bool retracting, bool swapping = false) { void retract(bool retracting, bool swapping = false) {
if (retracting == retracted[active_extruder]) return; if (retracting == retracted[active_extruder]) return;
...@@ -2726,7 +2726,7 @@ static void clean_up_after_endstop_move() { ...@@ -2726,7 +2726,7 @@ static void clean_up_after_endstop_move() {
#if ENABLED(Z_PROBE_SLED) #if ENABLED(Z_PROBE_SLED)
#ifndef SLED_DOCKING_OFFSET #if DISABLED(SLED_DOCKING_OFFSET)
#define SLED_DOCKING_OFFSET 0 #define SLED_DOCKING_OFFSET 0
#endif #endif
...@@ -2772,7 +2772,7 @@ inline void wait_heater() { ...@@ -2772,7 +2772,7 @@ inline void wait_heater() {
cancel_heatup = false; cancel_heatup = false;
#ifdef TEMP_RESIDENCY_TIME #if ENABLED(TEMP_RESIDENCY_TIME)
long residency_start_ms = -1; long residency_start_ms = -1;
/* continue to loop until we have reached the target temp /* continue to loop until we have reached the target temp
_and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */ _and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
...@@ -2786,7 +2786,7 @@ inline void wait_heater() { ...@@ -2786,7 +2786,7 @@ inline void wait_heater() {
if (millis() > temp_ms + 1000UL) { //Print temp & remaining time every 1s while waiting if (millis() > temp_ms + 1000UL) { //Print temp & remaining time every 1s while waiting
ECHO_MV(MSG_T, degHotend(target_extruder), 1); ECHO_MV(MSG_T, degHotend(target_extruder), 1);
ECHO_MV(" E:", (int)target_extruder); ECHO_MV(" E:", (int)target_extruder);
#ifdef TEMP_RESIDENCY_TIME #if ENABLED(TEMP_RESIDENCY_TIME)
ECHO_M(" " MSG_W); ECHO_M(" " MSG_W);
if (residency_start_ms > -1) { if (residency_start_ms > -1) {
temp_ms = ((TEMP_RESIDENCY_TIME * 1000UL) - (millis() - residency_start_ms)) / 1000UL; temp_ms = ((TEMP_RESIDENCY_TIME * 1000UL) - (millis() - residency_start_ms)) / 1000UL;
...@@ -2803,7 +2803,7 @@ inline void wait_heater() { ...@@ -2803,7 +2803,7 @@ inline void wait_heater() {
idle(); idle();
#ifdef TEMP_RESIDENCY_TIME #if ENABLED(TEMP_RESIDENCY_TIME)
// start/restart the TEMP_RESIDENCY_TIME timer whenever we reach target temp for the first time // start/restart the TEMP_RESIDENCY_TIME timer whenever we reach target temp for the first time
// or when current temp falls outside the hysteresis after target temp was reached // or when current temp falls outside the hysteresis after target temp was reached
if ((residency_start_ms == -1 && target_direction && (degHotend(target_extruder) >= (degTargetHotend(target_extruder)-TEMP_WINDOW))) || if ((residency_start_ms == -1 && target_direction && (degHotend(target_extruder) >= (degTargetHotend(target_extruder)-TEMP_WINDOW))) ||
...@@ -2882,7 +2882,7 @@ inline void gcode_G0_G1() { ...@@ -2882,7 +2882,7 @@ inline void gcode_G0_G1() {
if (IsRunning()) { if (IsRunning()) {
gcode_get_destination(); // For X Y Z E F gcode_get_destination(); // For X Y Z E F
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
if (autoretract_enabled && !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) { if (autoretract_enabled && !(code_seen('X') || code_seen('Y') || code_seen('Z')) && code_seen('E')) {
float echange = destination[E_AXIS] - current_position[E_AXIS]; float echange = destination[E_AXIS] - current_position[E_AXIS];
// Is this move an attempt to retract or recover? // Is this move an attempt to retract or recover?
...@@ -2906,14 +2906,14 @@ inline void gcode_G0_G1() { ...@@ -2906,14 +2906,14 @@ inline void gcode_G0_G1() {
inline void gcode_G2_G3(bool clockwise) { inline void gcode_G2_G3(bool clockwise) {
if (IsRunning()) { if (IsRunning()) {
#ifdef SF_ARC_FIX #if ENABLED(SF_ARC_FIX)
bool relative_mode_backup = relative_mode; bool relative_mode_backup = relative_mode;
relative_mode = true; relative_mode = true;
#endif #endif
gcode_get_destination(); gcode_get_destination();
#ifdef SF_ARC_FIX #if ENABLED(SF_ARC_FIX)
relative_mode = relative_mode_backup; relative_mode = relative_mode_backup;
#endif #endif
...@@ -2948,7 +2948,7 @@ inline void gcode_G4() { ...@@ -2948,7 +2948,7 @@ inline void gcode_G4() {
while (millis() < codenum) idle(); while (millis() < codenum) idle();
} }
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
/** /**
* G10 - Retract filament according to settings of M207 * G10 - Retract filament according to settings of M207
...@@ -3019,7 +3019,7 @@ inline void gcode_G28() { ...@@ -3019,7 +3019,7 @@ inline void gcode_G28() {
home_all_axis = (!homeX && !homeY && !homeZ && !homeE) || (homeX && homeY && homeZ); home_all_axis = (!homeX && !homeY && !homeZ && !homeE) || (homeX && homeY && homeZ);
#ifdef NPR2 #if ENABLED(NPR2)
if((home_all_axis) || (code_seen(axis_codes[E_AXIS]))) { if((home_all_axis) || (code_seen(axis_codes[E_AXIS]))) {
active_driver = active_extruder = 1; active_driver = active_extruder = 1;
plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], -200, COLOR_HOMERATE, active_extruder, active_driver); plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], -200, COLOR_HOMERATE, active_extruder, active_driver);
...@@ -3087,13 +3087,13 @@ inline void gcode_G28() { ...@@ -3087,13 +3087,13 @@ inline void gcode_G28() {
} // home_all_axis || homeZ } // home_all_axis || homeZ
#ifdef QUICK_HOME #if ENABLED(QUICK_HOME)
if (home_all_axis || (homeX && homeY)) { // First diagonal move if (home_all_axis || (homeX && homeY)) { // First diagonal move
current_position[X_AXIS] = current_position[Y_AXIS] = 0; current_position[X_AXIS] = current_position[Y_AXIS] = 0;
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
int x_axis_home_dir = x_home_dir(active_extruder); int x_axis_home_dir = x_home_dir(active_extruder);
extruder_duplication_enabled = false; extruder_duplication_enabled = false;
#else #else
...@@ -3140,14 +3140,14 @@ inline void gcode_G28() { ...@@ -3140,14 +3140,14 @@ inline void gcode_G28() {
} }
#endif // QUICK_HOME #endif // QUICK_HOME
#ifdef HOME_Y_BEFORE_X #if ENABLED(HOME_Y_BEFORE_X)
// Home Y // Home Y
if (home_all_axis || homeY) HOMEAXIS(Y); if (home_all_axis || homeY) HOMEAXIS(Y);
#endif #endif
// Home X // Home X
if (home_all_axis || homeX) { if (home_all_axis || homeX) {
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
int tmp_extruder = active_extruder; int tmp_extruder = active_extruder;
extruder_duplication_enabled = false; extruder_duplication_enabled = false;
active_extruder = !active_extruder; active_extruder = !active_extruder;
...@@ -3184,7 +3184,7 @@ inline void gcode_G28() { ...@@ -3184,7 +3184,7 @@ inline void gcode_G28() {
#if DISABLED(Z_SAFE_HOMING) #if DISABLED(Z_SAFE_HOMING)
if (code_seen('M') && !(homeX || homeY)) { if (code_seen('M') && !(homeX || homeY)) {
// Manual G28 bed level // Manual G28 bed level
#ifdef ULTIPANEL #if ENABLED(ULTIPANEL)
ECHO_LM(DB, " --LEVEL PLATE SCRIPT--"); ECHO_LM(DB, " --LEVEL PLATE SCRIPT--");
while(!lcd_clicked()) { while(!lcd_clicked()) {
idle(true); idle(true);
...@@ -3209,7 +3209,7 @@ inline void gcode_G28() { ...@@ -3209,7 +3209,7 @@ inline void gcode_G28() {
#endif #endif
sync_plan_position(); sync_plan_position();
#ifdef ENDSTOPS_ONLY_FOR_HOMING #if ENABLED(ENDSTOPS_ONLY_FOR_HOMING)
enable_endstops(false); enable_endstops(false);
#endif #endif
...@@ -4175,7 +4175,7 @@ inline void gcode_G92() { ...@@ -4175,7 +4175,7 @@ inline void gcode_G92() {
} }
} }
#ifdef ULTIPANEL #if ENABLED(ULTIPANEL)
/** /**
* M0: // M0 - Unconditional stop - Wait for user button press on LCD * M0: // M0 - Unconditional stop - Wait for user button press on LCD
...@@ -4199,7 +4199,7 @@ inline void gcode_G92() { ...@@ -4199,7 +4199,7 @@ inline void gcode_G92() {
lcd_setstatus(args, true); lcd_setstatus(args, true);
else { else {
LCD_MESSAGEPGM(MSG_USERWAIT); LCD_MESSAGEPGM(MSG_USERWAIT);
#if defined(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0 #if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
dontExpireStatus(); dontExpireStatus();
#endif #endif
} }
...@@ -4223,7 +4223,7 @@ inline void gcode_G92() { ...@@ -4223,7 +4223,7 @@ inline void gcode_G92() {
} }
#endif //ULTIPANEL #endif //ULTIPANEL
#ifdef LASERBEAM #if ENABLED(LASERBEAM)
/** /**
* M3: S - Setting laser beam * M3: S - Setting laser beam
*/ */
...@@ -4410,7 +4410,7 @@ inline void gcode_M31() { ...@@ -4410,7 +4410,7 @@ inline void gcode_M31() {
} }
} }
#ifdef LONG_FILENAME_HOST_SUPPORT #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
/** /**
* M33: Get the long full path of a file or folder * M33: Get the long full path of a file or folder
...@@ -4737,7 +4737,7 @@ inline void gcode_M42() { ...@@ -4737,7 +4737,7 @@ inline void gcode_M42() {
OUT_WRITE(SUICIDE_PIN, HIGH); OUT_WRITE(SUICIDE_PIN, HIGH);
#endif #endif
#if defined(ULTIPANEL) || defined(NEXTION) #if ENABLED(ULTIPANEL) || ENABLED(NEXTION)
powersupply = true; powersupply = true;
LCD_MESSAGEPGM(WELCOME_MSG); LCD_MESSAGEPGM(WELCOME_MSG);
lcd_update(); lcd_update();
...@@ -4763,7 +4763,7 @@ inline void gcode_M81() { ...@@ -4763,7 +4763,7 @@ inline void gcode_M81() {
#elif HAS(POWER_SWITCH) #elif HAS(POWER_SWITCH)
OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP); OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP);
#endif #endif
#ifdef ULTIPANEL #if ENABLED(ULTIPANEL)
#if HAS(POWER_SWITCH) #if HAS(POWER_SWITCH)
powersupply = false; powersupply = false;
#endif #endif
...@@ -4850,7 +4850,7 @@ inline void gcode_M104() { ...@@ -4850,7 +4850,7 @@ inline void gcode_M104() {
if (code_seen('S')) { if (code_seen('S')) {
float temp = code_value(); float temp = code_value();
setTargetHotend(temp, target_extruder); setTargetHotend(temp, target_extruder);
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0) if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset); setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
#endif #endif
...@@ -4863,7 +4863,7 @@ inline void gcode_M104() { ...@@ -4863,7 +4863,7 @@ inline void gcode_M104() {
inline void gcode_M105() { inline void gcode_M105() {
if (setTargetedHotend(105)) return; if (setTargetedHotend(105)) return;
#if HAS(TEMP_0) || HAS(TEMP_BED) || defined(HEATER_0_USES_MAX6675) #if HAS(TEMP_0) || HAS(TEMP_BED) || ENABLED(HEATER_0_USES_MAX6675)
ECHO_S(OK); ECHO_S(OK);
#if HAS(TEMP_0) #if HAS(TEMP_0)
ECHO_MV(MSG_T, degHotend(target_extruder), 1); ECHO_MV(MSG_T, degHotend(target_extruder), 1);
...@@ -4883,20 +4883,20 @@ inline void gcode_M105() { ...@@ -4883,20 +4883,20 @@ inline void gcode_M105() {
#endif #endif
ECHO_M(" " MSG_AT); ECHO_M(" " MSG_AT);
#ifdef HOTEND_WATTS #if ENABLED(HOTEND_WATTS)
ECHO_VM((HOTEND_WATTS * getHeaterPower(target_extruder))/127, "W"); ECHO_VM((HOTEND_WATTS * getHeaterPower(target_extruder))/127, "W");
#else #else
ECHO_V(getHeaterPower(target_extruder)); ECHO_V(getHeaterPower(target_extruder));
#endif #endif
ECHO_M(" " MSG_BAT); ECHO_M(" " MSG_BAT);
#ifdef BED_WATTS #if ENABLED(BED_WATTS)
ECHO_VM((BED_WATTS * getHeaterPower(-1))/127, "W"); ECHO_VM((BED_WATTS * getHeaterPower(-1))/127, "W");
#else #else
ECHO_V(getHeaterPower(-1)); ECHO_V(getHeaterPower(-1));
#endif #endif
#ifdef SHOW_TEMP_ADC_VALUES #if ENABLED(SHOW_TEMP_ADC_VALUES)
#if HAS(TEMP_BED) #if HAS(TEMP_BED)
ECHO_MV(" ADC B:", degBed(), 1); ECHO_MV(" ADC B:", degBed(), 1);
ECHO_MV("C->", rawBedTemp()/OVERSAMPLENR, 0); ECHO_MV("C->", rawBedTemp()/OVERSAMPLENR, 0);
...@@ -4940,13 +4940,13 @@ inline void gcode_M109() { ...@@ -4940,13 +4940,13 @@ inline void gcode_M109() {
if (no_wait_for_cooling || code_seen('R')) { if (no_wait_for_cooling || code_seen('R')) {
float temp = code_value(); float temp = code_value();
setTargetHotend(temp, target_extruder); setTargetHotend(temp, target_extruder);
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0) if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset); setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
#endif #endif
} }
#ifdef AUTOTEMP #if ENABLED(AUTOTEMP)
autotemp_enabled = code_seen('F'); autotemp_enabled = code_seen('F');
if (autotemp_enabled) autotemp_factor = code_value(); if (autotemp_enabled) autotemp_factor = code_value();
if (code_seen('S')) autotemp_min = code_value(); if (code_seen('S')) autotemp_min = code_value();
...@@ -4995,7 +4995,7 @@ inline void gcode_M114() { ...@@ -4995,7 +4995,7 @@ inline void gcode_M114() {
ECHO_MV(" Y:", st_get_position_mm(Y_AXIS)); ECHO_MV(" Y:", st_get_position_mm(Y_AXIS));
ECHO_EMV(" Z:", st_get_position_mm(Z_AXIS)); ECHO_EMV(" Z:", st_get_position_mm(Z_AXIS));
#ifdef SCARA #if MECH(SCARA)
//MESSAGE for Host //MESSAGE for Host
ECHO_SMV(OK, " SCARA Theta:", delta[X_AXIS]); ECHO_SMV(OK, " SCARA Theta:", delta[X_AXIS]);
ECHO_EMV(" Psi+Theta:", delta[Y_AXIS]); ECHO_EMV(" Psi+Theta:", delta[Y_AXIS]);
...@@ -5018,7 +5018,7 @@ inline void gcode_M114() { ...@@ -5018,7 +5018,7 @@ inline void gcode_M114() {
ECHO_MV(" Y:", st_get_position_mm(Y_AXIS)); ECHO_MV(" Y:", st_get_position_mm(Y_AXIS));
ECHO_EMV(" Z:", st_get_position_mm(Z_AXIS)); ECHO_EMV(" Z:", st_get_position_mm(Z_AXIS));
#ifdef SCARA #if MECH(SCARA)
//MESSAGE for User //MESSAGE for User
ECHO_SMV(OK, " SCARA Theta:", delta[X_AXIS]); ECHO_SMV(OK, " SCARA Theta:", delta[X_AXIS]);
ECHO_EMV(" Psi+Theta:", delta[Y_AXIS]); ECHO_EMV(" Psi+Theta:", delta[Y_AXIS]);
...@@ -5039,7 +5039,7 @@ inline void gcode_M115() { ...@@ -5039,7 +5039,7 @@ inline void gcode_M115() {
ECHO_M(MSG_M115_REPORT); ECHO_M(MSG_M115_REPORT);
} }
#if defined(ULTIPANEL) || defined(NEXTION) #if ENABLED(ULTIPANEL) || ENABLED(NEXTION)
/** /**
* M117: Set LCD Status Message * M117: Set LCD Status Message
...@@ -5098,7 +5098,7 @@ inline void gcode_M120() { enable_endstops(true); } ...@@ -5098,7 +5098,7 @@ inline void gcode_M120() { enable_endstops(true); }
*/ */
inline void gcode_M121() { enable_endstops(false); } inline void gcode_M121() { enable_endstops(false); }
#ifdef BARICUDA #if ENABLED(BARICUDA)
#if HAS(HEATER_1) #if HAS(HEATER_1)
/** /**
* M126: Heater 1 valve open * M126: Heater 1 valve open
...@@ -5131,7 +5131,7 @@ inline void gcode_M140() { ...@@ -5131,7 +5131,7 @@ inline void gcode_M140() {
if (code_seen('S')) setTargetBed(code_value()); if (code_seen('S')) setTargetBed(code_value());
} }
#if defined(ULTIPANEL) && TEMP_SENSOR_0 != 0 #if ENABLED(ULTIPANEL) && TEMP_SENSOR_0 != 0
/** /**
* M145: Set the heatup state for a material in the LCD menu * M145: Set the heatup state for a material in the LCD menu
...@@ -5202,7 +5202,7 @@ inline void gcode_M140() { ...@@ -5202,7 +5202,7 @@ inline void gcode_M140() {
#endif #endif
#ifdef BLINKM #if ENABLED(BLINKM)
/** /**
* M150: Set Status LED Color - Use R-U-B for R-G-B * M150: Set Status LED Color - Use R-U-B for R-G-B
*/ */
...@@ -5366,13 +5366,13 @@ inline void gcode_M206() { ...@@ -5366,13 +5366,13 @@ inline void gcode_M206() {
home_offset[i] = code_value(); home_offset[i] = code_value();
} }
} }
#ifdef SCARA #if MECH(SCARA)
if (code_seen('T')) home_offset[X_AXIS] = code_value(); // Theta if (code_seen('T')) home_offset[X_AXIS] = code_value(); // Theta
if (code_seen('P')) home_offset[Y_AXIS] = code_value(); // Psi if (code_seen('P')) home_offset[Y_AXIS] = code_value(); // Psi
#endif #endif
} }
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
/** /**
* M207: Set firmware retraction values * M207: Set firmware retraction values
...@@ -5440,7 +5440,7 @@ inline void gcode_M206() { ...@@ -5440,7 +5440,7 @@ inline void gcode_M206() {
if (code_seen('X')) hotend_offset[X_AXIS][target_extruder] = code_value(); if (code_seen('X')) hotend_offset[X_AXIS][target_extruder] = code_value();
if (code_seen('Y')) hotend_offset[Y_AXIS][target_extruder] = code_value(); if (code_seen('Y')) hotend_offset[Y_AXIS][target_extruder] = code_value();
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
if (code_seen('Z')) hotend_offset[Z_AXIS][target_extruder] = code_value(); if (code_seen('Z')) hotend_offset[Z_AXIS][target_extruder] = code_value();
#endif #endif
...@@ -5448,7 +5448,7 @@ inline void gcode_M206() { ...@@ -5448,7 +5448,7 @@ inline void gcode_M206() {
for (int e = 0; e < HOTENDS; e++) { for (int e = 0; e < HOTENDS; e++) {
ECHO_MV(" ", hotend_offset[X_AXIS][e]); ECHO_MV(" ", hotend_offset[X_AXIS][e]);
ECHO_MV(",", hotend_offset[Y_AXIS][e]); ECHO_MV(",", hotend_offset[Y_AXIS][e]);
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
ECHO_MV(",", hotend_offset[Z_AXIS][e]); ECHO_MV(",", hotend_offset[Z_AXIS][e]);
#endif #endif
} }
...@@ -5554,7 +5554,7 @@ inline void gcode_M226() { ...@@ -5554,7 +5554,7 @@ inline void gcode_M226() {
} }
#endif // HAS(CHDK) || PHOTOGRAPH_PIN #endif // HAS(CHDK) || PHOTOGRAPH_PIN
#ifdef HAS(LCD_CONTRAST) #if HAS(LCD_CONTRAST)
/** /**
* M250: Read and optionally set the LCD contrast * M250: Read and optionally set the LCD contrast
*/ */
...@@ -5639,7 +5639,7 @@ inline void gcode_M226() { ...@@ -5639,7 +5639,7 @@ inline void gcode_M226() {
} }
#endif // PIDTEMP #endif // PIDTEMP
#ifdef PREVENT_DANGEROUS_EXTRUDE #if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
void set_extrude_min_temp(float temp) { extrude_min_temp = temp; } void set_extrude_min_temp(float temp) { extrude_min_temp = temp; }
...@@ -5709,7 +5709,7 @@ inline void gcode_M226() { ...@@ -5709,7 +5709,7 @@ inline void gcode_M226() {
} }
#endif // HAS(MICROSTEPS) #endif // HAS(MICROSTEPS)
#ifdef SCARA #if MECH(SCARA)
bool SCARA_move_to_cal(uint8_t delta_x, uint8_t delta_y) { bool SCARA_move_to_cal(uint8_t delta_x, uint8_t delta_y) {
//SoftEndsEnabled = false; // Ignore soft endstops during calibration //SoftEndsEnabled = false; // Ignore soft endstops during calibration
//ECHO_LM(DB, " Soft endstops disabled "); //ECHO_LM(DB, " Soft endstops disabled ");
...@@ -5779,7 +5779,7 @@ inline void gcode_M226() { ...@@ -5779,7 +5779,7 @@ inline void gcode_M226() {
} }
#endif // SCARA #endif // SCARA
#ifdef EXT_SOLENOID #if ENABLED(EXT_SOLENOID)
void enable_solenoid(uint8_t num) { void enable_solenoid(uint8_t num) {
switch(num) { switch(num) {
case 0: case 0:
...@@ -5856,7 +5856,7 @@ inline void gcode_M400() { st_synchronize(); } ...@@ -5856,7 +5856,7 @@ inline void gcode_M400() { st_synchronize(); }
#endif // AUTO_BED_LEVELING_FEATURE && (HAS(SERVO_ENDSTOPS) && !Z_PROBE_SLED) #endif // AUTO_BED_LEVELING_FEATURE && (HAS(SERVO_ENDSTOPS) && !Z_PROBE_SLED)
#ifdef FILAMENT_SENSOR #if ENABLED(FILAMENT_SENSOR)
/** /**
* M404: Display or set the nominal filament width (3mm, 1.75mm ) W<3.0> * M404: Display or set the nominal filament width (3mm, 1.75mm ) W<3.0>
...@@ -5934,7 +5934,7 @@ inline void gcode_M428() { ...@@ -5934,7 +5934,7 @@ inline void gcode_M428() {
memcpy(new_offs, home_offset, sizeof(new_offs)); memcpy(new_offs, home_offset, sizeof(new_offs));
for (int8_t i = X_AXIS; i <= Z_AXIS; i++) { for (int8_t i = X_AXIS; i <= Z_AXIS; i++) {
if (axis_known_position[i]) { if (axis_known_position[i]) {
#ifdef DELTA #if MECH(DELTA)
float base = (new_pos[i] > (min_pos[i] + max_pos[i]) / 2) ? base_home_pos[i] : 0, float base = (new_pos[i] > (min_pos[i] + max_pos[i]) / 2) ? base_home_pos[i] : 0,
#else #else
float base = (new_pos[i] > (min_pos[i] + max_pos[i]) / 2) ? base_home_pos(i) : 0, float base = (new_pos[i] > (min_pos[i] + max_pos[i]) / 2) ? base_home_pos(i) : 0,
...@@ -6000,7 +6000,7 @@ inline void gcode_M503() { ...@@ -6000,7 +6000,7 @@ inline void gcode_M503() {
Config_PrintSettings(code_seen('S') && code_value() == 0); Config_PrintSettings(code_seen('S') && code_value() == 0);
} }
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
/** /**
* M540: Set whether SD card print should abort on endstop hit (M540 S<0|1>) * M540: Set whether SD card print should abort on endstop hit (M540 S<0|1>)
...@@ -6011,7 +6011,7 @@ inline void gcode_M503() { ...@@ -6011,7 +6011,7 @@ inline void gcode_M503() {
#endif // ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED #endif // ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
#ifdef FILAMENTCHANGEENABLE #if ENABLED(FILAMENTCHANGEENABLE)
/** /**
* M600: Pause for filament change * M600: Pause for filament change
* *
...@@ -6037,7 +6037,7 @@ inline void gcode_M503() { ...@@ -6037,7 +6037,7 @@ inline void gcode_M503() {
for (int i = 0; i < NUM_AXIS; i++) for (int i = 0; i < NUM_AXIS; i++)
lastpos[i] = destination[i] = current_position[i]; lastpos[i] = destination[i] = current_position[i];
#ifdef DELTA #if MECH(DELTA)
#define RUNPLAN calculate_delta(destination); \ #define RUNPLAN calculate_delta(destination); \
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], fr60, active_extruder, active_driver); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], fr60, active_extruder, active_driver);
#else #else
...@@ -6046,7 +6046,7 @@ inline void gcode_M503() { ...@@ -6046,7 +6046,7 @@ inline void gcode_M503() {
//retract by E //retract by E
if (code_seen('E')) destination[E_AXIS] += code_value(); if (code_seen('E')) destination[E_AXIS] += code_value();
#ifdef FILAMENTCHANGE_FIRSTRETRACT #if ENABLED(FILAMENTCHANGE_FIRSTRETRACT)
else destination[E_AXIS] += FILAMENTCHANGE_FIRSTRETRACT; else destination[E_AXIS] += FILAMENTCHANGE_FIRSTRETRACT;
#endif #endif
...@@ -6054,7 +6054,7 @@ inline void gcode_M503() { ...@@ -6054,7 +6054,7 @@ inline void gcode_M503() {
//lift Z //lift Z
if (code_seen('Z')) destination[Z_AXIS] += code_value(); if (code_seen('Z')) destination[Z_AXIS] += code_value();
#ifdef FILAMENTCHANGE_ZADD #if ENABLED(FILAMENTCHANGE_ZADD)
else destination[Z_AXIS] += FILAMENTCHANGE_ZADD; else destination[Z_AXIS] += FILAMENTCHANGE_ZADD;
#endif #endif
...@@ -6062,19 +6062,19 @@ inline void gcode_M503() { ...@@ -6062,19 +6062,19 @@ inline void gcode_M503() {
//move xy //move xy
if (code_seen('X')) destination[X_AXIS] = code_value(); if (code_seen('X')) destination[X_AXIS] = code_value();
#ifdef FILAMENTCHANGE_XPOS #if ENABLED(FILAMENTCHANGE_XPOS)
else destination[X_AXIS] = FILAMENTCHANGE_XPOS; else destination[X_AXIS] = FILAMENTCHANGE_XPOS;
#endif #endif
if (code_seen('Y')) destination[Y_AXIS] = code_value(); if (code_seen('Y')) destination[Y_AXIS] = code_value();
#ifdef FILAMENTCHANGE_YPOS #if ENABLED(FILAMENTCHANGE_YPOS)
else destination[Y_AXIS] = FILAMENTCHANGE_YPOS; else destination[Y_AXIS] = FILAMENTCHANGE_YPOS;
#endif #endif
RUNPLAN RUNPLAN
if (code_seen('L')) destination[E_AXIS] += code_value(); if (code_seen('L')) destination[E_AXIS] += code_value();
#ifdef FILAMENTCHANGE_FINALRETRACT #if ENABLED(FILAMENTCHANGE_FINALRETRACT)
else destination[E_AXIS] += FILAMENTCHANGE_FINALRETRACT; else destination[E_AXIS] += FILAMENTCHANGE_FINALRETRACT;
#endif #endif
...@@ -6137,7 +6137,7 @@ inline void gcode_M503() { ...@@ -6137,7 +6137,7 @@ inline void gcode_M503() {
//return to normal //return to normal
if (code_seen('L')) destination[E_AXIS] -= code_value(); if (code_seen('L')) destination[E_AXIS] -= code_value();
#ifdef FILAMENTCHANGE_FINALRETRACT #if ENABLED(FILAMENTCHANGE_FINALRETRACT)
else destination[E_AXIS] -= FILAMENTCHANGE_FINALRETRACT; else destination[E_AXIS] -= FILAMENTCHANGE_FINALRETRACT;
#endif #endif
...@@ -6148,7 +6148,7 @@ inline void gcode_M503() { ...@@ -6148,7 +6148,7 @@ inline void gcode_M503() {
lcd_reset_alert_level(); lcd_reset_alert_level();
#ifdef DELTA #if MECH(DELTA)
// Move XYZ to starting position, then E // Move XYZ to starting position, then E
calculate_delta(lastpos); calculate_delta(lastpos);
plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], fr60, active_extruder, active_driver); plan_buffer_line(delta[X_AXIS], delta[Y_AXIS], delta[Z_AXIS], destination[E_AXIS], fr60, active_extruder, active_driver);
...@@ -6172,7 +6172,7 @@ inline void gcode_M503() { ...@@ -6172,7 +6172,7 @@ inline void gcode_M503() {
} }
#endif //FILAMENTCHANGEENABLE #endif //FILAMENTCHANGEENABLE
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
/** /**
* M605: Set dual x-carriage movement mode * M605: Set dual x-carriage movement mode
* *
...@@ -6325,16 +6325,16 @@ inline void gcode_M907() { ...@@ -6325,16 +6325,16 @@ inline void gcode_M907() {
if (code_seen('B')) digipot_current(4, code_value()); if (code_seen('B')) digipot_current(4, code_value());
if (code_seen('S')) for (int i=0; i<=4; i++) digipot_current(i, code_value()); if (code_seen('S')) for (int i=0; i<=4; i++) digipot_current(i, code_value());
#endif #endif
#ifdef MOTOR_CURRENT_PWM_XY_PIN #if ENABLED(MOTOR_CURRENT_PWM_XY_PIN)
if (code_seen('X')) digipot_current(0, code_value()); if (code_seen('X')) digipot_current(0, code_value());
#endif #endif
#ifdef MOTOR_CURRENT_PWM_Z_PIN #if ENABLED(MOTOR_CURRENT_PWM_Z_PIN)
if (code_seen('Z')) digipot_current(1, code_value()); if (code_seen('Z')) digipot_current(1, code_value());
#endif #endif
#ifdef MOTOR_CURRENT_PWM_E_PIN #if ENABLED(MOTOR_CURRENT_PWM_E_PIN)
if (code_seen('E')) digipot_current(2, code_value()); if (code_seen('E')) digipot_current(2, code_value());
#endif #endif
#ifdef DIGIPOT_I2C #if ENABLED(DIGIPOT_I2C)
// this one uses actual amps in floating point // this one uses actual amps in floating point
for (int i=0;i<NUM_AXIS;i++) if(code_seen(axis_codes[i])) digipot_i2c_set_current(i, code_value()); for (int i=0;i<NUM_AXIS;i++) if(code_seen(axis_codes[i])) digipot_i2c_set_current(i, code_value());
// for each additional extruder (named B,C,D,E..., channels 4,5,6,7...) // for each additional extruder (named B,C,D,E..., channels 4,5,6,7...)
...@@ -6407,7 +6407,7 @@ inline void gcode_T(uint8_t tmp_extruder) { ...@@ -6407,7 +6407,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
if (next_feedrate > 0.0) feedrate = next_feedrate; if (next_feedrate > 0.0) feedrate = next_feedrate;
} }
#if EXTRUDERS > 1 #if EXTRUDERS > 1
#ifdef NPR2 #if ENABLED(NPR2)
if(target_extruder != old_color) if(target_extruder != old_color)
#else #else
if(target_extruder != active_extruder) if(target_extruder != active_extruder)
...@@ -6415,7 +6415,7 @@ inline void gcode_T(uint8_t tmp_extruder) { ...@@ -6415,7 +6415,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
{ {
// Save current position to return to after applying extruder offset // Save current position to return to after applying extruder offset
set_destination_to_current(); set_destination_to_current();
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && IsRunning() && if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && IsRunning() &&
(delayed_move_time != 0 || current_position[X_AXIS] != x_home_pos(active_extruder))) { (delayed_move_time != 0 || current_position[X_AXIS] != x_home_pos(active_extruder))) {
// Park old head: 1) raise 2) move to park position 3) lower // Park old head: 1) raise 2) move to park position 3) lower
...@@ -6468,7 +6468,7 @@ inline void gcode_T(uint8_t tmp_extruder) { ...@@ -6468,7 +6468,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
current_position[i] += hotend_offset[i][target_extruder] - hotend_offset[i][active_extruder]; current_position[i] += hotend_offset[i][target_extruder] - hotend_offset[i][active_extruder];
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#if defined(MKR4) && (EXTRUDERS > 1) #if ENABLED(MKR4) && (EXTRUDERS > 1)
#if (EXTRUDERS == 4) && (E0E2_CHOICE_PIN >1) && (E1E3_CHOICE_PIN > 1) && (DRIVER_EXTRUDERS == 2) #if (EXTRUDERS == 4) && (E0E2_CHOICE_PIN >1) && (E1E3_CHOICE_PIN > 1) && (DRIVER_EXTRUDERS == 2)
st_synchronize(); // Finish all movement st_synchronize(); // Finish all movement
disable_e(); disable_e();
...@@ -6576,7 +6576,7 @@ inline void gcode_T(uint8_t tmp_extruder) { ...@@ -6576,7 +6576,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
active_extruder = target_extruder; active_extruder = target_extruder;
ECHO_LMV(DB, MSG_ACTIVE_DRIVER, active_driver); ECHO_LMV(DB, MSG_ACTIVE_DRIVER, active_driver);
ECHO_LMV(DB, MSG_ACTIVE_EXTRUDER, active_extruder); ECHO_LMV(DB, MSG_ACTIVE_EXTRUDER, active_extruder);
#elif defined(NPR2) #elif ENABLED(NPR2)
st_synchronize(); // Finish all movement st_synchronize(); // Finish all movement
if (old_color == 99) if (old_color == 99)
{ {
...@@ -6607,7 +6607,7 @@ inline void gcode_T(uint8_t tmp_extruder) { ...@@ -6607,7 +6607,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
if (make_move && IsRunning()) prepare_move(); if (make_move && IsRunning()) prepare_move();
} }
#ifdef EXT_SOLENOID #if ENABLED(EXT_SOLENOID)
st_synchronize(); st_synchronize();
disable_all_solenoids(); disable_all_solenoids();
enable_solenoid_on_active_extruder(); enable_solenoid_on_active_extruder();
...@@ -6672,7 +6672,7 @@ void process_next_command() { ...@@ -6672,7 +6672,7 @@ void process_next_command() {
gcode_G0_G1(); break; gcode_G0_G1(); break;
// G2, G3 // G2, G3
#ifndef SCARA #if !MECH(SCARA)
case 2: // G2 - CW ARC case 2: // G2 - CW ARC
case 3: // G3 - CCW ARC case 3: // G3 - CCW ARC
gcode_G2_G3(codenum == 2); break; gcode_G2_G3(codenum == 2); break;
...@@ -6682,7 +6682,7 @@ void process_next_command() { ...@@ -6682,7 +6682,7 @@ void process_next_command() {
case 4: case 4:
gcode_G4(); break; gcode_G4(); break;
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
case 10: // G10: retract case 10: // G10: retract
case 11: // G11: retract_recover case 11: // G11: retract_recover
gcode_G10_G11(codenum == 10); break; gcode_G10_G11(codenum == 10); break;
...@@ -6704,7 +6704,7 @@ void process_next_command() { ...@@ -6704,7 +6704,7 @@ void process_next_command() {
#endif // Z_PROBE_SLED #endif // Z_PROBE_SLED
#endif // AUTO_BED_LEVELING_FEATURE #endif // AUTO_BED_LEVELING_FEATURE
#if MECH(DELTA) && defined(Z_PROBE_ENDSTOP) #if MECH(DELTA) && ENABLED(Z_PROBE_ENDSTOP)
case 29: // G29 Detailed Z-Probe, probes the bed at more points. case 29: // G29 Detailed Z-Probe, probes the bed at more points.
gcode_G29(); gcode_M114(); break; gcode_G29(); gcode_M114(); break;
case 30: // G30 Delta AutoCalibration case 30: // G30 Delta AutoCalibration
...@@ -6726,13 +6726,13 @@ void process_next_command() { ...@@ -6726,13 +6726,13 @@ void process_next_command() {
case 'M': case 'm': switch (codenum) { case 'M': case 'm': switch (codenum) {
#ifdef ULTIPANEL #if ENABLED(ULTIPANEL)
case 0: // M0 - Unconditional stop - Wait for user button press on LCD case 0: // M0 - Unconditional stop - Wait for user button press on LCD
case 1: // M1 - Conditional stop - Wait for user button press on LCD case 1: // M1 - Conditional stop - Wait for user button press on LCD
gcode_M0_M1(); break; gcode_M0_M1(); break;
#endif //ULTIPANEL #endif //ULTIPANEL
#ifdef LASERBEAM #if ENABLED(LASERBEAM)
case 3: // M03 S - Setting laser beam case 3: // M03 S - Setting laser beam
gcode_M3(); break; gcode_M3(); break;
case 4: // M04 - Turn on laser beam case 4: // M04 - Turn on laser beam
...@@ -6775,7 +6775,7 @@ void process_next_command() { ...@@ -6775,7 +6775,7 @@ void process_next_command() {
case 32: // M32 - Select file and start SD print case 32: // M32 - Select file and start SD print
gcode_M32(); break; gcode_M32(); break;
#ifdef LONG_FILENAME_HOST_SUPPORT #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
case 33: // M33 - Get the long full path to a file or folder case 33: // M33 - Get the long full path to a file or folder
gcode_M33(); break; gcode_M33(); break;
#endif #endif
...@@ -6832,7 +6832,7 @@ void process_next_command() { ...@@ -6832,7 +6832,7 @@ void process_next_command() {
case 109: // M109 Wait for temperature case 109: // M109 Wait for temperature
gcode_M109(); break; gcode_M109(); break;
#ifdef M100_FREE_MEMORY_WATCHER #if ENABLED(M100_FREE_MEMORY_WATCHER)
case 100: case 100:
gcode_M100(); break; gcode_M100(); break;
#endif #endif
...@@ -6847,7 +6847,7 @@ void process_next_command() { ...@@ -6847,7 +6847,7 @@ void process_next_command() {
case 115: // M115 Report capabilities case 115: // M115 Report capabilities
gcode_M115(); break; gcode_M115(); break;
#if defined(ULTIPANEL) || defined (NEXTION) #if ENABLED(ULTIPANEL) || ENABLED(NEXTION)
case 117: // M117 display message case 117: // M117 display message
gcode_M117(); break; gcode_M117(); break;
#endif #endif
...@@ -6859,7 +6859,7 @@ void process_next_command() { ...@@ -6859,7 +6859,7 @@ void process_next_command() {
case 121: // M121 Disable endstops case 121: // M121 Disable endstops
gcode_M121(); break; gcode_M121(); break;
#ifdef BARICUDA #if ENABLED(BARICUDA)
// PWM for HEATER_1_PIN // PWM for HEATER_1_PIN
#if HAS(HEATER_1) #if HAS(HEATER_1)
case 126: // M126 valve open case 126: // M126 valve open
...@@ -6880,7 +6880,7 @@ void process_next_command() { ...@@ -6880,7 +6880,7 @@ void process_next_command() {
case 140: // M140 Set bed temp case 140: // M140 Set bed temp
gcode_M140(); break; gcode_M140(); break;
#ifdef BLINKM #if ENABLED(BLINKM)
case 150: // M150 case 150: // M150
gcode_M150(); break; gcode_M150(); break;
#endif //BLINKM #endif //BLINKM
...@@ -6908,7 +6908,7 @@ void process_next_command() { ...@@ -6908,7 +6908,7 @@ void process_next_command() {
case 206: // M206 additional homing offset case 206: // M206 additional homing offset
gcode_M206(); break; gcode_M206(); break;
#ifdef FWRETRACT #if ENABLED(FWRETRACT)
case 207: //M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop] case 207: //M207 - set retract length S[positive mm] F[feedrate mm/min] Z[additional zlift/hop]
gcode_M207(); break; gcode_M207(); break;
case 208: // M208 - set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/min] case 208: // M208 - set retract recover length S[positive mm surplus to the M207 S*] F[feedrate mm/min]
...@@ -6934,7 +6934,7 @@ void process_next_command() { ...@@ -6934,7 +6934,7 @@ void process_next_command() {
gcode_M240(); break; gcode_M240(); break;
#endif // HAS(CHDK) || HAS(PHOTOGRAPH) #endif // HAS(CHDK) || HAS(PHOTOGRAPH)
#if defined(DOGLCD) && LCD_CONTRAST >= 0 #if ENABLED(DOGLCD) && LCD_CONTRAST >= 0
case 250: // M250 Set LCD contrast value: C<value> (value 0..63) case 250: // M250 Set LCD contrast value: C<value> (value 0..63)
gcode_M250(); break; gcode_M250(); break;
#endif // DOGLCD #endif // DOGLCD
...@@ -6954,7 +6954,7 @@ void process_next_command() { ...@@ -6954,7 +6954,7 @@ void process_next_command() {
gcode_M301(); break; gcode_M301(); break;
#endif // PIDTEMP #endif // PIDTEMP
#ifdef PREVENT_DANGEROUS_EXTRUDE #if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
case 302: // allow cold extrudes, or set the minimum extrude temperature case 302: // allow cold extrudes, or set the minimum extrude temperature
gcode_M302(); break; gcode_M302(); break;
#endif // PREVENT_DANGEROUS_EXTRUDE #endif // PREVENT_DANGEROUS_EXTRUDE
...@@ -6976,7 +6976,7 @@ void process_next_command() { ...@@ -6976,7 +6976,7 @@ void process_next_command() {
gcode_M351(); break; gcode_M351(); break;
#endif // HAS(MICROSTEPS) #endif // HAS(MICROSTEPS)
#ifdef SCARA #if MECH(SCARA)
case 360: // M360 SCARA Theta pos1 case 360: // M360 SCARA Theta pos1
if (gcode_M360()) return; break; if (gcode_M360()) return; break;
case 361: // M361 SCARA Theta pos2 case 361: // M361 SCARA Theta pos2
...@@ -7001,7 +7001,7 @@ void process_next_command() { ...@@ -7001,7 +7001,7 @@ void process_next_command() {
gcode_M402(); break; gcode_M402(); break;
#endif #endif
#ifdef FILAMENT_SENSOR #if ENABLED(FILAMENT_SENSOR)
case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width case 404: //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or display nominal filament width
gcode_M404(); break; gcode_M404(); break;
case 405: //M405 Turn on filament sensor for control case 405: //M405 Turn on filament sensor for control
...@@ -7027,17 +7027,17 @@ void process_next_command() { ...@@ -7027,17 +7027,17 @@ void process_next_command() {
case 503: // M503 print settings currently in memory case 503: // M503 print settings currently in memory
gcode_M503(); break; gcode_M503(); break;
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED #if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
case 540: case 540:
gcode_M540(); break; gcode_M540(); break;
#endif #endif
#ifdef FILAMENTCHANGEENABLE #if ENABLED(FILAMENTCHANGEENABLE)
case 600: //Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal] case 600: //Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
gcode_M600(); break; gcode_M600(); break;
#endif #endif
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
case 605: case 605:
gcode_M605(); break; gcode_M605(); break;
#endif #endif
...@@ -7055,7 +7055,7 @@ void process_next_command() { ...@@ -7055,7 +7055,7 @@ void process_next_command() {
gcode_M908(); break; gcode_M908(); break;
#endif // HAS(DIGIPOTSS) #endif // HAS(DIGIPOTSS)
#ifdef NPR2 #if ENABLED(NPR2)
case 997: // M997 Cxx Move Carter xx gradi case 997: // M997 Cxx Move Carter xx gradi
gcode_M997(); break; gcode_M997(); break;
#endif // NPR2 #endif // NPR2
...@@ -7093,7 +7093,7 @@ void ok_to_send() { ...@@ -7093,7 +7093,7 @@ void ok_to_send() {
if (fromsd[cmd_queue_index_r]) return; if (fromsd[cmd_queue_index_r]) return;
#endif #endif
ECHO_S(OK); ECHO_S(OK);
#ifdef ADVANCED_OK #if ENABLED(ADVANCED_OK)
ECHO_MV("N", gcode_LastN); ECHO_MV("N", gcode_LastN);
ECHO_MV(" P", (int(BLOCK_BUFFER_SIZE - movesplanned() - 1))); ECHO_MV(" P", (int(BLOCK_BUFFER_SIZE - movesplanned() - 1)));
ECHO_MV(" B", BUFSIZE - commands_in_queue); ECHO_MV(" B", BUFSIZE - commands_in_queue);
...@@ -7131,7 +7131,7 @@ void clamp_to_software_endstops(float target[3]) { ...@@ -7131,7 +7131,7 @@ void clamp_to_software_endstops(float target[3]) {
curr_e = dest_e; // Behave as if the move really took place, but ignore E part curr_e = dest_e; // Behave as if the move really took place, but ignore E part
ECHO_LM(ER, MSG_ERR_COLD_EXTRUDE_STOP); ECHO_LM(ER, MSG_ERR_COLD_EXTRUDE_STOP);
} }
#ifdef PREVENT_LENGTHY_EXTRUDE #if ENABLED(PREVENT_LENGTHY_EXTRUDE)
if (labs(de) > EXTRUDE_MAXLENGTH) { if (labs(de) > EXTRUDE_MAXLENGTH) {
curr_e = dest_e; // Behave as if the move really took place, but ignore E part curr_e = dest_e; // Behave as if the move really took place, but ignore E part
ECHO_LM(ER, MSG_ERR_LONG_EXTRUDE_STOP); ECHO_LM(ER, MSG_ERR_LONG_EXTRUDE_STOP);
...@@ -7157,7 +7157,7 @@ void clamp_to_software_endstops(float target[3]) { ...@@ -7157,7 +7157,7 @@ void clamp_to_software_endstops(float target[3]) {
if (cartesian_mm < 0.000001) cartesian_mm = abs(difference[E_AXIS]); if (cartesian_mm < 0.000001) cartesian_mm = abs(difference[E_AXIS]);
if (cartesian_mm < 0.000001) return false; if (cartesian_mm < 0.000001) return false;
#if defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) #if ENABLED(DELTA_SEGMENTS_PER_SECOND) || ENABLED(SCARA_SEGMENTS_PER_SECOND)
float seconds = 6000 * cartesian_mm / feedrate / feedrate_multiplier; float seconds = 6000 * cartesian_mm / feedrate / feedrate_multiplier;
int steps = max(1, int(delta_segments_per_second * seconds)); int steps = max(1, int(delta_segments_per_second * seconds));
#else #else
...@@ -7180,7 +7180,7 @@ void clamp_to_software_endstops(float target[3]) { ...@@ -7180,7 +7180,7 @@ void clamp_to_software_endstops(float target[3]) {
for (int s = 1; s <= steps; s++) { for (int s = 1; s <= steps; s++) {
#if defined(DELTA_SEGMENTS_PER_SECOND) || defined(SCARA_SEGMENTS_PER_SECOND) #if ENABLED(DELTA_SEGMENTS_PER_SECOND) || ENABLED(SCARA_SEGMENTS_PER_SECOND)
float fraction = float(s) / float(steps); float fraction = float(s) / float(steps);
for (int8_t i = 0; i < NUM_AXIS; i++) for (int8_t i = 0; i < NUM_AXIS; i++)
target[i] = current_position[i] + difference[i] * fraction; target[i] = current_position[i] + difference[i] * fraction;
...@@ -7453,7 +7453,7 @@ void plan_arc( ...@@ -7453,7 +7453,7 @@ void plan_arc(
lastMotor = ms; //... set time to NOW so the fan will turn on lastMotor = ms; //... set time to NOW so the fan will turn on
} }
#ifdef INVERTED_HEATER_PINS #if ENABLED(INVERTED_HEATER_PINS)
uint8_t speed = (lastMotor == 0 || ms >= lastMotor + (CONTROLLERFAN_SECS * 1000UL)) ? 255 - CONTROLLERFAN_MIN_SPEED : (255 - CONTROLLERFAN_SPEED); uint8_t speed = (lastMotor == 0 || ms >= lastMotor + (CONTROLLERFAN_SECS * 1000UL)) ? 255 - CONTROLLERFAN_MIN_SPEED : (255 - CONTROLLERFAN_SPEED);
#else #else
uint8_t speed = (lastMotor == 0 || ms >= lastMotor + (CONTROLLERFAN_SECS * 1000UL)) ? CONTROLLERFAN_MIN_SPEED : CONTROLLERFAN_SPEED; uint8_t speed = (lastMotor == 0 || ms >= lastMotor + (CONTROLLERFAN_SECS * 1000UL)) ? CONTROLLERFAN_MIN_SPEED : CONTROLLERFAN_SPEED;
...@@ -7549,7 +7549,7 @@ void plan_arc( ...@@ -7549,7 +7549,7 @@ void plan_arc(
#endif // SCARA #endif // SCARA
#ifdef TEMP_STAT_LEDS #if ENABLED(TEMP_STAT_LEDS)
static bool red_led = false; static bool red_led = false;
static millis_t next_status_led_update_ms = 0; static millis_t next_status_led_update_ms = 0;
...@@ -7690,7 +7690,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { ...@@ -7690,7 +7690,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
controllerFan(); // Check if fan should be turned on to cool stepper drivers down controllerFan(); // Check if fan should be turned on to cool stepper drivers down
#endif #endif
#ifdef EXTRUDER_RUNOUT_PREVENT #if ENABLED(EXTRUDER_RUNOUT_PREVENT)
if (ms > previous_cmd_ms + EXTRUDER_RUNOUT_SECONDS * 1000) if (ms > previous_cmd_ms + EXTRUDER_RUNOUT_SECONDS * 1000)
if (degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) { if (degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) {
bool oldstatus; bool oldstatus;
...@@ -7750,7 +7750,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { ...@@ -7750,7 +7750,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
} }
#endif #endif
#ifdef DUAL_X_CARRIAGE #if ENABLED(DUAL_X_CARRIAGE)
// handle delayed move timeout // handle delayed move timeout
if (delayed_move_time && ms > delayed_move_time + 1000 && IsRunning()) { if (delayed_move_time && ms > delayed_move_time + 1000 && IsRunning()) {
// travel moves have been received so enact them // travel moves have been received so enact them
...@@ -7763,7 +7763,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { ...@@ -7763,7 +7763,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
#if ENABLED(IDLE_OOZING_PREVENT) #if ENABLED(IDLE_OOZING_PREVENT)
if (blocks_queued()) axis_last_activity = millis(); if (blocks_queued()) axis_last_activity = millis();
if (degHotend(active_extruder) > IDLE_OOZING_MINTEMP && !(debugLevel & DEBUG_DRYRUN) && IDLE_OOZING_enabled) { if (degHotend(active_extruder) > IDLE_OOZING_MINTEMP && !(debugLevel & DEBUG_DRYRUN) && IDLE_OOZING_enabled) {
#ifdef FILAMENTCHANGEENABLE #if ENABLED(FILAMENTCHANGEENABLE)
if (!filament_changing) if (!filament_changing)
#endif #endif
{ {
...@@ -7789,11 +7789,11 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { ...@@ -7789,11 +7789,11 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
} }
#endif #endif
#ifdef TEMP_STAT_LEDS #if ENABLED(TEMP_STAT_LEDS)
handle_status_leds(); handle_status_leds();
#endif #endif
#ifdef TEMP_STAT_LEDS #if ENABLED(TEMP_STAT_LEDS)
handle_status_leds(); handle_status_leds();
#endif #endif
...@@ -7801,7 +7801,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) { ...@@ -7801,7 +7801,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
} }
void kill(const char *lcd_msg) { void kill(const char *lcd_msg) {
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
lcd_setalertstatuspgm(lcd_msg); lcd_setalertstatuspgm(lcd_msg);
#endif #endif
...@@ -7833,7 +7833,7 @@ void kill(const char *lcd_msg) { ...@@ -7833,7 +7833,7 @@ void kill(const char *lcd_msg) {
} }
#endif #endif
#ifdef FAST_PWM_FAN #if ENABLED(FAST_PWM_FAN)
void setPwmFrequency(uint8_t pin, int val) { void setPwmFrequency(uint8_t pin, int val) {
val &= 0x07; val &= 0x07;
......
...@@ -1806,7 +1806,7 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) { ...@@ -1806,7 +1806,7 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// suppress cpplint warnings with NOLINT comment // suppress cpplint warnings with NOLINT comment
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN) #if ALLOW_DEPRECATED_FUNCTIONS && DISABLED(DOXYGEN)
void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0; // NOLINT void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0; // NOLINT
#endif // ALLOW_DEPRECATED_FUNCTIONS #endif // ALLOW_DEPRECATED_FUNCTIONS
......
...@@ -364,7 +364,7 @@ class SdBaseFile { ...@@ -364,7 +364,7 @@ class SdBaseFile {
uint8_t width, bool printSlash); uint8_t width, bool printSlash);
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Deprecated functions - suppress cpplint warnings with NOLINT comment // Deprecated functions - suppress cpplint warnings with NOLINT comment
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN) #if ALLOW_DEPRECATED_FUNCTIONS && DISABLED(DOXYGEN)
public: public:
/** \deprecated Use: /** \deprecated Use:
* bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock); * bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
......
...@@ -193,7 +193,7 @@ class SdVolume { ...@@ -193,7 +193,7 @@ class SdVolume {
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Deprecated functions - suppress cpplint warnings with NOLINT comment // Deprecated functions - suppress cpplint warnings with NOLINT comment
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN) #if ALLOW_DEPRECATED_FUNCTIONS && DISABLED(DOXYGEN)
public: public:
/** \deprecated Use: bool SdVolume::init(Sd2Card* dev); /** \deprecated Use: bool SdVolume::init(Sd2Card* dev);
* \param[in] dev The SD card where the volume is located. * \param[in] dev The SD card where the volume is located.
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#define REPRAP_DISCOUNT_SMART_CONTROLLER #define REPRAP_DISCOUNT_SMART_CONTROLLER
#endif #endif
#ifdef SPARK_FULL_GRAPHICS #if ENABLED(SPARK_FULL_GRAPHICS)
#define ENCODER_PULSES_PER_STEP 2 #define ENCODER_PULSES_PER_STEP 2
#define ENCODER_STEPS_PER_MENU_ITEM 1 #define ENCODER_STEPS_PER_MENU_ITEM 1
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
#define NEWPANEL #define NEWPANEL
#endif #endif
#ifdef RADDS_DISPLAY #if ENABLED(RADDS_DISPLAY)
#define ENCODER_PULSES_PER_STEP 2 #define ENCODER_PULSES_PER_STEP 2
#define ENCODER_STEPS_PER_MENU_ITEM 1 #define ENCODER_STEPS_PER_MENU_ITEM 1
...@@ -108,11 +108,11 @@ ...@@ -108,11 +108,11 @@
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander #define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD #define LCD_USE_I2C_BUZZER //comment out to disable buzzer on LCD
#ifndef ENCODER_PULSES_PER_STEP #if DISABLED(ENCODER_PULSES_PER_STEP)
#define ENCODER_PULSES_PER_STEP 4 #define ENCODER_PULSES_PER_STEP 4
#endif #endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM #if DISABLED(ENCODER_STEPS_PER_MENU_ITEM)
#define ENCODER_STEPS_PER_MENU_ITEM 1 #define ENCODER_STEPS_PER_MENU_ITEM 1
#endif #endif
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
/** /**
* DRIVER_EXTRUDERS * DRIVER_EXTRUDERS
*/ */
#if !defined(MKR4) && !defined(NPR2) #if DISABLED(MKR4) && DISABLED(NPR2)
#define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruder #define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruder
#endif #endif
...@@ -369,7 +369,7 @@ ...@@ -369,7 +369,7 @@
/** /**
* Servo Leveling * Servo Leveling
*/ */
#define SERVO_LEVELING (defined(SERVO_ENDSTOPS) && defined(DEACTIVATE_SERVOS_AFTER_MOVE)) #define SERVO_LEVELING (ENABLED(SERVO_ENDSTOPS) && ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE))
/** /**
* Sled Options * Sled Options
...@@ -427,7 +427,7 @@ ...@@ -427,7 +427,7 @@
* Power Signal Control Definitions * Power Signal Control Definitions
* By default use Normal definition * By default use Normal definition
*/ */
#ifndef POWER_SUPPLY #if DISABLED(POWER_SUPPLY)
#define POWER_SUPPLY 0 #define POWER_SUPPLY 0
#endif #endif
#if (POWER_SUPPLY == 1) // 1 = ATX #if (POWER_SUPPLY == 1) // 1 = ATX
...@@ -556,7 +556,7 @@ ...@@ -556,7 +556,7 @@
#define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3) #define HAS_AUTO_FAN (HAS_AUTO_FAN_0 || HAS_AUTO_FAN_1 || HAS_AUTO_FAN_2 || HAS_AUTO_FAN_3)
#define HAS_FAN (PIN_EXISTS(FAN)) #define HAS_FAN (PIN_EXISTS(FAN))
#define HAS_CONTROLLERFAN (ENABLED(CONTROLLERFAN) && PIN_EXISTS(CONTROLLERFAN)) #define HAS_CONTROLLERFAN (ENABLED(CONTROLLERFAN) && PIN_EXISTS(CONTROLLERFAN))
#define HAS_SERVOS (defined(NUM_SERVOS) && NUM_SERVOS > 0) #define HAS_SERVOS (ENABLED(NUM_SERVOS) && NUM_SERVOS > 0)
#define HAS_SERVO_0 (PIN_EXISTS(SERVO0)) #define HAS_SERVO_0 (PIN_EXISTS(SERVO0))
#define HAS_SERVO_1 (PIN_EXISTS(SERVO1)) #define HAS_SERVO_1 (PIN_EXISTS(SERVO1))
#define HAS_SERVO_2 (PIN_EXISTS(SERVO2)) #define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
...@@ -630,8 +630,8 @@ ...@@ -630,8 +630,8 @@
/** /**
* Shorthand for filament sensor and power sensor for ultralcd.cpp, dogm_lcd_implementation.h, ultralcd_implementation_hitachi_HD44780.h * Shorthand for filament sensor and power sensor for ultralcd.cpp, dogm_lcd_implementation.h, ultralcd_implementation_hitachi_HD44780.h
*/ */
#define HAS_LCD_FILAMENT_SENSOR (HAS_FILAMENT_SENSOR && defined(FILAMENT_LCD_DISPLAY)) #define HAS_LCD_FILAMENT_SENSOR (HAS_FILAMENT_SENSOR && ENABLED(FILAMENT_LCD_DISPLAY))
#define HAS_LCD_POWER_SENSOR (HAS_POWER_CONSUMPTION_SENSOR && defined(POWER_CONSUMPTION_LCD_DISPLAY)) #define HAS_LCD_POWER_SENSOR (HAS_POWER_CONSUMPTION_SENSOR && ENABLED(POWER_CONSUMPTION_LCD_DISPLAY))
/** /**
* Helper Macros for heaters and extruder fan * Helper Macros for heaters and extruder fan
...@@ -642,7 +642,7 @@ ...@@ -642,7 +642,7 @@
#define WRITE_HEATER(pin,value) WRITE(pin,value) #define WRITE_HEATER(pin,value) WRITE(pin,value)
#endif #endif
#define WRITE_HEATER_0P(v) WRITE_HEATER(HEATER_0_PIN, v) #define WRITE_HEATER_0P(v) WRITE_HEATER(HEATER_0_PIN, v)
#if HOTENDS > 1 || defined(HEATERS_PARALLEL) #if HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
#define WRITE_HEATER_1(v) WRITE_HEATER(HEATER_1_PIN, v) #define WRITE_HEATER_1(v) WRITE_HEATER(HEATER_1_PIN, v)
#if HOTENDS > 2 #if HOTENDS > 2
#define WRITE_HEATER_2(v) WRITE_HEATER(HEATER_2_PIN, v) #define WRITE_HEATER_2(v) WRITE_HEATER(HEATER_2_PIN, v)
...@@ -657,14 +657,14 @@ ...@@ -657,14 +657,14 @@
#define WRITE_HEATER_0(v) WRITE_HEATER_0P(v) #define WRITE_HEATER_0(v) WRITE_HEATER_0P(v)
#endif #endif
#if HAS_HEATER_BED #if HAS_HEATER_BED
#ifdef INVERTED_BED_PINS #if ENABLED(INVERTED_BED_PINS)
#define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN,!v) #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN,!v)
#else #else
#define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN,v) #define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN,v)
#endif #endif
#endif #endif
#if HAS_FAN #if HAS_FAN
#ifdef INVERTED_HEATER_PINS #if ENABLED(INVERTED_HEATER_PINS)
#define WRITE_FAN(v) WRITE(FAN_PIN, !v) #define WRITE_FAN(v) WRITE(FAN_PIN, !v)
#else #else
#define WRITE_FAN(v) WRITE(FAN_PIN, v) #define WRITE_FAN(v) WRITE(FAN_PIN, v)
...@@ -674,7 +674,7 @@ ...@@ -674,7 +674,7 @@
/** /**
* Buzzer * Buzzer
*/ */
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER)) #define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
/** /**
* Servos * Servos
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define CONFIGURATION_H #define CONFIGURATION_H
#include "macros.h" #include "macros.h"
#include "default_version.h" #include "Default_Version.h"
/* /*
* This configuration file contains basic settings. * This configuration file contains basic settings.
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
* - Extruders number * - Extruders number
* - UI Language * - UI Language
* *
* Mechanisms-settings can be found in configuration_xxxxxx.h (where xxxxxx can be: cartesian - delta - core - scara) * Mechanisms-settings can be found in Configuration_Xxxxxx.h (where Xxxxxx can be: Cartesian - Delta - Core - Scara)
* Feature-settings can be found in configuration_feature.h * Feature-settings can be found in Configuration_Feature.h
*/ */
/*********************************************************************** /***********************************************************************
...@@ -241,19 +241,19 @@ ...@@ -241,19 +241,19 @@
********************** Do not touch this section ********************** ********************** Do not touch this section **********************
***********************************************************************/ ***********************************************************************/
#if MECH(CARTESIAN) #if MECH(CARTESIAN)
#include "configuration_cartesian.h" #include "Configuration_Cartesian.h"
#elif MECH(COREXY) #elif MECH(COREXY)
#include "configuration_core.h" #include "Configuration_Core.h"
#elif MECH(COREXZ) #elif MECH(COREXZ)
#include "configuration_core.h" #include "Configuration_Core.h"
#elif MECH(DELTA) #elif MECH(DELTA)
#include "configuration_delta.h" #include "Configuration_Delta.h"
#elif MECH(SCARA) #elif MECH(SCARA)
#include "configuration_scara.h" #include "Configuration_Scara.h"
#endif #endif
#include "configuration_feature.h" #include "Configuration_Feature.h"
#include "configuration_overall.h" #include "Configuration_Overall.h"
#include "thermistortables.h" #include "thermistortables.h"
#include "conditionals.h" #include "conditionals.h"
......
#ifndef CONFIGURATION_FEATURE_H #ifndef Configuration_Feature_H
#define CONFIGURATION_FEATURE_H #define Configuration_Feature_H
/* /*
* This configuration file contains all features that can be enabled. * This configuration file contains all features that can be enabled.
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
* - Buffer stuff * - Buffer stuff
* - Whatchdog * - Whatchdog
* *
* Basic-settings can be found in configuration_basic.h * Basic-settings can be found in Configuration_Basic.h
* Mechanisms-settings can be found in configuration_xxxxxx.h (where xxxxxx can be: cartesian - delta - core - scara) * Mechanisms-settings can be found in Configuration_Xxxxxx.h (where Xxxxxx can be: Cartesian - Delta - Core - Scara)
* *
*/ */
......
...@@ -418,7 +418,7 @@ void Config_ResetDefault() { ...@@ -418,7 +418,7 @@ void Config_ResetDefault() {
float tmp8[] = DEFAULT_Kd; float tmp8[] = DEFAULT_Kd;
#endif // PIDTEMP #endif // PIDTEMP
#if defined(HOTEND_OFFSET_X) && defined(HOTEND_OFFSET_Y) #if ENABLED(HOTEND_OFFSET_X) && ENABLED(HOTEND_OFFSET_Y)
float tmp9[] = HOTEND_OFFSET_X; float tmp9[] = HOTEND_OFFSET_X;
float tmp10[] = HOTEND_OFFSET_Y; float tmp10[] = HOTEND_OFFSET_Y;
#else #else
...@@ -569,14 +569,14 @@ void Config_ResetDefault() { ...@@ -569,14 +569,14 @@ void Config_ResetDefault() {
calculate_volumetric_multipliers(); calculate_volumetric_multipliers();
#ifdef IDLE_OOZING_PREVENT #if ENABLED(IDLE_OOZING_PREVENT)
IDLE_OOZING_enabled = true; IDLE_OOZING_enabled = true;
#endif #endif
ECHO_LM(DB, "Hardcoded Default Settings Loaded"); ECHO_LM(DB, "Hardcoded Default Settings Loaded");
} }
#if !defined(DISABLE_M503) #if DISABLED(DISABLE_M503)
/** /**
* Print Configuration Settings - M503 * Print Configuration Settings - M503
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "ultralcd.h" #include "ultralcd.h"
#include "ultralcd_st7920_u8glib_rrd.h" #include "ultralcd_st7920_u8glib_rrd.h"
#include "Configuration.h" #include "Configuration_Basic.h"
#if DISABLED(MAPPER_C2C3) && DISABLED(MAPPER_NON) && ENABLED(USE_BIG_EDIT_FONT) #if DISABLED(MAPPER_C2C3) && DISABLED(MAPPER_NON) && ENABLED(USE_BIG_EDIT_FONT)
#undef USE_BIG_EDIT_FONT #undef USE_BIG_EDIT_FONT
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
#define LCD_WIDTH_EDIT 22 #define LCD_WIDTH_EDIT 22
#endif #endif
#ifndef TALL_FONT_CORRECTION #if DISABLED(TALL_FONT_CORRECTION)
#define TALL_FONT_CORRECTION 0 #define TALL_FONT_CORRECTION 0
#endif #endif
...@@ -137,10 +137,10 @@ ...@@ -137,10 +137,10 @@
U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0 U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
#endif #endif
#ifndef LCD_PIXEL_WIDTH #if DISABLED(LCD_PIXEL_WIDTH)
#define LCD_PIXEL_WIDTH 128 #define LCD_PIXEL_WIDTH 128
#endif #endif
#ifndef LCD_PIXEL_HEIGHT #if DISABLED(LCD_PIXEL_HEIGHT)
#define LCD_PIXEL_HEIGHT 64 #define LCD_PIXEL_HEIGHT 64
#endif #endif
...@@ -238,7 +238,7 @@ static void lcd_implementation_init() { ...@@ -238,7 +238,7 @@ static void lcd_implementation_init() {
if (show_bootscreen) { if (show_bootscreen) {
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp); u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
lcd_setFont(FONT_MENU); lcd_setFont(FONT_MENU);
#ifndef STRING_SPLASH_LINE2 #if DISABLED(STRING_SPLASH_LINE2)
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1); u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
#else #else
int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2; int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
......
...@@ -28,7 +28,7 @@ void FirmwareTest() ...@@ -28,7 +28,7 @@ void FirmwareTest()
ECHO_EM(" "); ECHO_EM(" ");
ECHO_EM("***** ENDSTOP X *****"); ECHO_EM("***** ENDSTOP X *****");
#if defined(X_MIN_PIN) && X_MIN_PIN > -1 && X_HOME_DIR == -1 #if ENABLED(X_MIN_PIN) && X_MIN_PIN > -1 && X_HOME_DIR == -1
if (!READ(X_MIN_PIN)^X_MIN_ENDSTOP_INVERTING) { if (!READ(X_MIN_PIN)^X_MIN_ENDSTOP_INVERTING) {
ECHO_M("MIN ENDSTOP X: "); ECHO_M("MIN ENDSTOP X: ");
ECHO_EV(MSG_ENDSTOP_OPEN); ECHO_EV(MSG_ENDSTOP_OPEN);
...@@ -70,7 +70,7 @@ void FirmwareTest() ...@@ -70,7 +70,7 @@ void FirmwareTest()
ECHO_EV(MSG_FWTEST_ENDSTOP_ERR); ECHO_EV(MSG_FWTEST_ENDSTOP_ERR);
return; return;
} }
#elif defined(X_MAX_PIN) && X_MAX_PIN > -1 && X_HOME_DIR == 1 #elif ENABLED(X_MAX_PIN) && X_MAX_PIN > -1 && X_HOME_DIR == 1
if (!READ(X_MAX_PIN)^X_MAX_ENDSTOP_INVERTING) { if (!READ(X_MAX_PIN)^X_MAX_ENDSTOP_INVERTING) {
ECHO_M("MAX ENDSTOP X: "); ECHO_M("MAX ENDSTOP X: ");
ECHO_EV(MSG_ENDSTOP_OPEN); ECHO_EV(MSG_ENDSTOP_OPEN);
...@@ -126,7 +126,7 @@ void FirmwareTest() ...@@ -126,7 +126,7 @@ void FirmwareTest()
ECHO_EM(" "); ECHO_EM(" ");
ECHO_EM("***** ENDSTOP Y *****"); ECHO_EM("***** ENDSTOP Y *****");
#if defined(Y_MIN_PIN) && Y_MIN_PIN > -1 && Y_HOME_DIR == -1 #if ENABLED(Y_MIN_PIN) && Y_MIN_PIN > -1 && Y_HOME_DIR == -1
if (!READ(Y_MIN_PIN)^Y_MIN_ENDSTOP_INVERTING){ if (!READ(Y_MIN_PIN)^Y_MIN_ENDSTOP_INVERTING){
ECHO_M("MIN ENDSTOP Y: "); ECHO_M("MIN ENDSTOP Y: ");
ECHO_EV(MSG_ENDSTOP_OPEN); ECHO_EV(MSG_ENDSTOP_OPEN);
...@@ -168,7 +168,7 @@ void FirmwareTest() ...@@ -168,7 +168,7 @@ void FirmwareTest()
ECHO_EV(MSG_FWTEST_ENDSTOP_ERR); ECHO_EV(MSG_FWTEST_ENDSTOP_ERR);
return; return;
} }
#elif defined(Y_MAX_PIN) && Y_MAX_PIN > -1 && Y_HOME_DIR == 1 #elif ENABLED(Y_MAX_PIN) && Y_MAX_PIN > -1 && Y_HOME_DIR == 1
if (!READ(Y_MAX_PIN)^Y_MAX_ENDSTOP_INVERTING){ if (!READ(Y_MAX_PIN)^Y_MAX_ENDSTOP_INVERTING){
ECHO_M("MAX ENDSTOP Y: "); ECHO_M("MAX ENDSTOP Y: ");
ECHO_EV(MSG_ENDSTOP_OPEN); ECHO_EV(MSG_ENDSTOP_OPEN);
...@@ -224,7 +224,7 @@ void FirmwareTest() ...@@ -224,7 +224,7 @@ void FirmwareTest()
ECHO_EM(" "); ECHO_EM(" ");
ECHO_EM("***** ENDSTOP Z *****"); ECHO_EM("***** ENDSTOP Z *****");
#if defined(Z_MIN_PIN) && Z_MIN_PIN > -1 && Z_HOME_DIR == -1 #if ENABLED(Z_MIN_PIN) && Z_MIN_PIN > -1 && Z_HOME_DIR == -1
if (!READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING){ if (!READ(Z_MIN_PIN)^Z_MIN_ENDSTOP_INVERTING){
ECHO_M("MIN ENDSTOP Z: "); ECHO_M("MIN ENDSTOP Z: ");
ECHO_EV(MSG_ENDSTOP_OPEN); ECHO_EV(MSG_ENDSTOP_OPEN);
...@@ -266,7 +266,7 @@ void FirmwareTest() ...@@ -266,7 +266,7 @@ void FirmwareTest()
ECHO_EV(MSG_FWTEST_ENDSTOP_ERR); ECHO_EV(MSG_FWTEST_ENDSTOP_ERR);
return; return;
} }
#elif defined(Z_MAX_PIN) && Z_MAX_PIN > -1 && Z_HOME_DIR == 1 #elif ENABLED(Z_MAX_PIN) && Z_MAX_PIN > -1 && Z_HOME_DIR == 1
if (!READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING){ if (!READ(Z_MAX_PIN)^Z_MAX_ENDSTOP_INVERTING){
ECHO_M("MAX ENDSTOP Z: "); ECHO_M("MAX ENDSTOP Z: ");
ECHO_EV(MSG_ENDSTOP_OPEN); ECHO_EV(MSG_ENDSTOP_OPEN);
......
#ifndef LANGUAGE_H #ifndef LANGUAGE_H
#define LANGUAGE_H #define LANGUAGE_H
#include "Configuration.h" #include "Configuration_Basic.h"
// NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES // NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES
// //
// ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration.h" // ==> ALWAYS TRY TO COMPILE MARLIN WITH/WITHOUT "ULTIPANEL" / "ULTRALCD" / "SDSUPPORT" #define IN "Configuration_Basic.h"
// ==> ALSO TRY ALL AVAILABLE "LANGUAGE_CHOICE" OPTIONS // ==> ALSO TRY ALL AVAILABLE "LANGUAGE_CHOICE" OPTIONS
// See also documentation/LCDLanguageFont.md // See also documentation/LCDLanguageFont.md
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
// 13 Basque-Euskera // 13 Basque-Euskera
// 14 Portuguese (Brazil) // 14 Portuguese (Brazil)
#ifndef LANGUAGE_CHOICE #if DISABLED(LANGUAGE_CHOICE)
#define LANGUAGE_CHOICE 7 // Pick your language from the list above #define LANGUAGE_CHOICE 7 // Pick your language from the list above
#endif #endif
...@@ -49,24 +49,24 @@ ...@@ -49,24 +49,24 @@
#elif MB(SAV_MKI) #elif MB(SAV_MKI)
#define MACHINE_NAME "SAV MkI" #define MACHINE_NAME "SAV MkI"
#define SOURCE_CODE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config" #define SOURCE_CODE_URL "https://github.com/fmalpartida/Marlin/tree/SAV-MkI-config"
#elif !defined(MACHINE_NAME) #elif DISABLED(MACHINE_NAME)
#define MACHINE_NAME "3D Printer" #define MACHINE_NAME "3D Printer"
#endif #endif
#ifdef CUSTOM_MACHINE_NAME #if ENABLED(CUSTOM_MACHINE_NAME)
#undef MACHINE_NAME #undef MACHINE_NAME
#define MACHINE_NAME CUSTOM_MACHINE_NAME #define MACHINE_NAME CUSTOM_MACHINE_NAME
#endif #endif
#ifndef SOURCE_CODE_URL #if DISABLED(SOURCE_CODE_URL)
#define SOURCE_CODE_URL "https://github.com/MagoKimbra/MarlinKimbra" #define SOURCE_CODE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#endif #endif
#ifndef BUILD_VERSION #if DISABLED(BUILD_VERSION)
#define BUILD_VERSION "V4; MarlinKimbra for 4 extruder" #define BUILD_VERSION "V4; MarlinKimbra for 4 extruder"
#endif #endif
#ifndef MACHINE_UUID #if DISABLED(MACHINE_UUID)
#define MACHINE_UUID "00000000-0000-0000-0000-000000000000" #define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
#endif #endif
...@@ -235,7 +235,7 @@ ...@@ -235,7 +235,7 @@
#define MSG_BED_LEVELLING_Z " Z: " #define MSG_BED_LEVELLING_Z " Z: "
// LCD Menu Messages // LCD Menu Messages
#if !(defined( DISPLAY_CHARSET_HD44780_JAPAN ) || defined( DISPLAY_CHARSET_HD44780_WESTERN ) || defined( DISPLAY_CHARSET_HD44780_CYRILLIC )) #if !(ENABLED( DISPLAY_CHARSET_HD44780_JAPAN ) || ENABLED( DISPLAY_CHARSET_HD44780_WESTERN ) || ENABLED( DISPLAY_CHARSET_HD44780_CYRILLIC ))
#define DISPLAY_CHARSET_HD44780_JAPAN #define DISPLAY_CHARSET_HD44780_JAPAN
#endif #endif
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED" #define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta // Calibrate Delta
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
#endif // DELTA #endif // DELTA
// Scara // Scara
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: " #define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test // Firmware Test
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED" #define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta // Calibrate Delta
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
#endif // DELTA #endif // DELTA
// Scara // Scara
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: " #define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test // Firmware Test
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED" #define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta // Calibrate Delta
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
#endif // DELTA #endif // DELTA
// Scara // Scara
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: " #define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test // Firmware Test
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
#ifndef LANGUAGE_EN_H #ifndef LANGUAGE_EN_H
#define LANGUAGE_EN_H #define LANGUAGE_EN_H
#if !( defined(MAPPER_NON)|| defined(MAPPER_C2C3)|| defined(MAPPER_D0D1)|| defined(MAPPER_D0D1_MOD)|| defined(MAPPER_E382E383) ) #if !( ENABLED(MAPPER_NON)|| ENABLED(MAPPER_C2C3)|| ENABLED(MAPPER_D0D1)|| ENABLED(MAPPER_D0D1_MOD)|| ENABLED(MAPPER_E382E383) )
#define MAPPER_NON // For direct asci codes #define MAPPER_NON // For direct asci codes
#endif #endif
//#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays //#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays
#if !( defined(SIMULATE_ROMFONT)|| defined(DISPLAY_CHARSET_ISO10646_1)|| defined(DISPLAY_CHARSET_ISO10646_5)|| defined(DISPLAY_CHARSET_ISO10646_KANA)|| defined(DISPLAY_CHARSET_ISO10646_CN) ) #if !( ENABLED(SIMULATE_ROMFONT)|| ENABLED(DISPLAY_CHARSET_ISO10646_1)|| ENABLED(DISPLAY_CHARSET_ISO10646_5)|| ENABLED(DISPLAY_CHARSET_ISO10646_KANA)|| ENABLED(DISPLAY_CHARSET_ISO10646_CN) )
#define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays. #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
#endif #endif
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED" #define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta // Calibrate Delta
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
#endif // DELTA #endif // DELTA
// Scara // Scara
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: " #define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test // Firmware Test
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED" #define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta // Calibrate Delta
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
#endif // DELTA #endif // DELTA
// Scara // Scara
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -189,7 +189,7 @@ ...@@ -189,7 +189,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: " #define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test // Firmware Test
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP" #define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA #endif // DELTA
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm" #define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm" #define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP" #define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Kalibrointi" #define MSG_DELTA_CALIBRATE "Delta Kalibrointi"
#define MSG_DELTA_CALIBRATE_X "Kalibroi X" #define MSG_DELTA_CALIBRATE_X "Kalibroi X"
#define MSG_DELTA_CALIBRATE_Y "Kalibroi Y" #define MSG_DELTA_CALIBRATE_Y "Kalibroi Y"
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Kalibroi Center" #define MSG_DELTA_CALIBRATE_CENTER "Kalibroi Center"
#endif // DELTA #endif // DELTA
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm" #define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm" #define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP" #define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA #endif // DELTA
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm" #define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm" #define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -163,7 +163,7 @@ ...@@ -163,7 +163,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG STAMPA A VUOTO" #define MSG_DEBUG_DRYRUN "DEBUG STAMPA A VUOTO"
// Calibrate Delta // Calibrate Delta
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Calibraz. Delta" #define MSG_DELTA_CALIBRATE "Calibraz. Delta"
#define MSG_DELTA_CALIBRATE_X "Calibra X" #define MSG_DELTA_CALIBRATE_X "Calibra X"
#define MSG_DELTA_CALIBRATE_Y "Calibra Y" #define MSG_DELTA_CALIBRATE_Y "Calibra Y"
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
#endif // DELTA #endif // DELTA
// Scara // Scara
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
#define MSG_INVALID_POS_SLOT "Slot invalido, slot totali: " #define MSG_INVALID_POS_SLOT "Slot invalido, slot totali: "
// Firmware Test // Firmware Test
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Dai il comando Y per andare avanti" #define MSG_FWTEST_YES "Dai il comando Y per andare avanti"
#define MSG_FWTEST_NO "Dai il comando N per andare avanti" #define MSG_FWTEST_NO "Dai il comando N per andare avanti"
#define MSG_FWTEST_YES_NO "Dai il comando Y o N per andare avanti" #define MSG_FWTEST_YES_NO "Dai il comando Y o N per andare avanti"
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP" #define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA #endif // DELTA
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm" #define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm" #define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP" #define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA #endif // DELTA
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm" #define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm" #define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
#ifndef LANGUAGE_PT_BR_H #ifndef LANGUAGE_PT_BR_H
#define LANGUAGE_PT_BR_H #define LANGUAGE_PT_BR_H
#if !( defined(MAPPER_NON)|| defined(MAPPER_C2C3)|| defined(MAPPER_D0D1)|| defined(MAPPER_D0D1_MOD)|| defined(MAPPER_E382E383) ) #if !( ENABLED(MAPPER_NON)|| ENABLED(MAPPER_C2C3)|| ENABLED(MAPPER_D0D1)|| ENABLED(MAPPER_D0D1_MOD)|| ENABLED(MAPPER_E382E383) )
#define MAPPER_NON // For direct asci codes #define MAPPER_NON // For direct asci codes
#endif #endif
//#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays //#define SIMULATE_ROMFONT //Comment in to see what is seen on the character based displays
#if !( defined(SIMULATE_ROMFONT)|| defined(DISPLAY_CHARSET_ISO10646_1)|| defined(DISPLAY_CHARSET_ISO10646_5)|| defined(DISPLAY_CHARSET_ISO10646_KANA) ) #if !( ENABLED(SIMULATE_ROMFONT)|| ENABLED(DISPLAY_CHARSET_ISO10646_1)|| ENABLED(DISPLAY_CHARSET_ISO10646_5)|| ENABLED(DISPLAY_CHARSET_ISO10646_KANA) )
#define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays. #define DISPLAY_CHARSET_ISO10646_1 // use the better font on full graphic displays.
#endif #endif
...@@ -152,7 +152,7 @@ ...@@ -152,7 +152,7 @@
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA #endif // DELTA
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm" #define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm" #define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP" #define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA #endif // DELTA
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm" #define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm" #define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP" #define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED" #define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA #if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration" #define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X" #define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y" #define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center" #define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA #endif // DELTA
#ifdef SCARA #if MECH(SCARA)
#define MSG_XSCALE "X Scale" #define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale" #define MSG_YSCALE "Y Scale"
#endif #endif
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm" #define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_LENGTH) "mm"
#define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm" #define MSG_RETRACT_XMM "Retract " STRINGIFY(LCD_RETRACT_LENGTH) "mm"
#ifdef FIRMWARE_TEST #if ENABLED(FIRMWARE_TEST)
#define MSG_FWTEST_YES "Put the Y command to go next" #define MSG_FWTEST_YES "Put the Y command to go next"
#define MSG_FWTEST_NO "Put the N command to go next" #define MSG_FWTEST_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next" #define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif #endif
#ifndef GEN7_VERSION #if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 12 // v1.x #define GEN7_VERSION 12 // v1.x
#endif #endif
...@@ -263,7 +263,7 @@ ...@@ -263,7 +263,7 @@
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu. #error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif #endif
#ifndef GEN7_VERSION #if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 13 // v1.x #define GEN7_VERSION 13 // v1.x
#endif #endif
...@@ -504,7 +504,7 @@ ...@@ -504,7 +504,7 @@
#error Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu. #error Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu.
#endif #endif
#ifndef GEN7_VERSION #if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 12 // v1.x #define GEN7_VERSION 12 // v1.x
#endif #endif
...@@ -640,7 +640,7 @@ ...@@ -640,7 +640,7 @@
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/ // Data from: http://www.doc-diy.net/photo/rc-1_hacked/
#define PHOTOGRAPH_PIN 29 #define PHOTOGRAPH_PIN 29
#ifdef RA_CONTROL_PANEL #if ENABLED(RA_CONTROL_PANEL)
#define SDSS 53 #define SDSS 53
#define SD_DETECT_PIN 28 #define SD_DETECT_PIN 28
...@@ -653,7 +653,7 @@ ...@@ -653,7 +653,7 @@
#define BLEN_A 0 #define BLEN_A 0
#endif //RA_CONTROL_PANEL #endif //RA_CONTROL_PANEL
#ifdef RA_DISCO #if ENABLED(RA_DISCO)
//variables for which pins the TLC5947 is using //variables for which pins the TLC5947 is using
#define TLC_CLOCK_PIN 25 #define TLC_CLOCK_PIN 25
#define TLC_BLANK_PIN 23 #define TLC_BLANK_PIN 23
...@@ -805,7 +805,7 @@ ...@@ -805,7 +805,7 @@
#define PS_ON_PIN -1 #define PS_ON_PIN -1
#define KILL_PIN -1 #define KILL_PIN -1
#ifdef RAMPS_V_1_0 // RAMPS_V_1_0 #if ENABLED(RAMPS_V_1_0) // RAMPS_V_1_0
#define ORIG_HEATER_0_PIN 12 // RAMPS 1.0 #define ORIG_HEATER_0_PIN 12 // RAMPS 1.0
#define ORIG_HEATER_BED_PIN -1 // RAMPS 1.0 #define ORIG_HEATER_BED_PIN -1 // RAMPS 1.0
#define ORIG_FAN_PIN 11 // RAMPS 1.0 #define ORIG_FAN_PIN 11 // RAMPS 1.0
...@@ -823,13 +823,13 @@ ...@@ -823,13 +823,13 @@
#define ORIG_TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!! #define ORIG_TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
#define MAX6675_SS 66// Do not use pin 53 if there is even the remote possibility of using Display/SD card #define MAX6675_SS 66// Do not use pin 53 if there is even the remote possibility of using Display/SD card
#else #else
#define MAX6675_SS 66// Do not 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 66// Do not use pin 49 as this is tied to the switch inside the SD card socket to detect if there is an SD card present
#endif #endif
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -916,7 +916,7 @@ ...@@ -916,7 +916,7 @@
#define ORIG_HEATER_BED_PIN 8 // BED #define ORIG_HEATER_BED_PIN 8 // BED
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING #define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL) #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41 #define KILL_PIN 41
#else #else
#define KILL_PIN -1 #define KILL_PIN -1
...@@ -935,9 +935,9 @@ ...@@ -935,9 +935,9 @@
#endif #endif
#endif #endif
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
#ifdef PANEL_ONE #if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40 #define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42 #define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65 #define LCD_PINS_D4 65
...@@ -953,7 +953,7 @@ ...@@ -953,7 +953,7 @@
#define LCD_PINS_D7 29 #define LCD_PINS_D7 29
#endif //PANEL_ONE #endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37 #define BEEPER_PIN 37
#define BTN_EN1 31 #define BTN_EN1 31
...@@ -961,20 +961,20 @@ ...@@ -961,20 +961,20 @@
#define BTN_ENC 35 #define BTN_ENC 35
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(LCD_I2C_PANELOLU2) #elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43 #define BTN_EN2 43
#define BTN_ENC 32 #define BTN_ENC 32
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define KILL_PIN 41 #define KILL_PIN 41
#elif defined(LCD_I2C_VIKI) #elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7 #define BTN_EN2 7
#define BTN_ENC -1 #define BTN_ENC -1
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER) #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way. #define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37 #define BTN_EN2 37
#define BTN_ENC 31 #define BTN_ENC 31
...@@ -990,14 +990,14 @@ ...@@ -990,14 +990,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4 #define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2 //buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD #if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder #define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder #define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button #define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register #define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register #define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register #define SHIFT_LD 42 // shift register
#elif defined(PANEL_ONE) #elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3 #define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4 #define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7 #define BTN_ENC 49 // AUX3 PIN 7
...@@ -1007,7 +1007,7 @@ ...@@ -1007,7 +1007,7 @@
#define BTN_ENC 31 //the click #define BTN_ENC 31 //the click
#endif #endif
#ifdef G3D_PANEL #if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#else #else
#define SD_DETECT_PIN -1 // Ramps does not use this port #define SD_DETECT_PIN -1 // Ramps does not use this port
...@@ -1036,7 +1036,7 @@ ...@@ -1036,7 +1036,7 @@
#endif //ULTRA_LCD #endif //ULTRA_LCD
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -1138,9 +1138,9 @@ ...@@ -1138,9 +1138,9 @@
#endif #endif
#endif #endif
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
#ifdef PANEL_ONE #if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40 #define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42 #define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65 #define LCD_PINS_D4 65
...@@ -1156,7 +1156,7 @@ ...@@ -1156,7 +1156,7 @@
#define LCD_PINS_D7 29 #define LCD_PINS_D7 29
#endif //PANEL_ONE #endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37 #define BEEPER_PIN 37
#define BTN_EN1 31 #define BTN_EN1 31
...@@ -1164,20 +1164,20 @@ ...@@ -1164,20 +1164,20 @@
#define BTN_ENC 35 #define BTN_ENC 35
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(LCD_I2C_PANELOLU2) #elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43 #define BTN_EN2 43
#define BTN_ENC 32 #define BTN_ENC 32
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define KILL_PIN 41 #define KILL_PIN 41
#elif defined(LCD_I2C_VIKI) #elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7 #define BTN_EN2 7
#define BTN_ENC -1 #define BTN_ENC -1
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER) #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way. #define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37 #define BTN_EN2 37
#define BTN_ENC 31 #define BTN_ENC 31
...@@ -1193,14 +1193,14 @@ ...@@ -1193,14 +1193,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4 #define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2 //buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD #if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder #define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder #define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button #define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register #define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register #define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register #define SHIFT_LD 42 // shift register
#elif defined(PANEL_ONE) #elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3 #define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4 #define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7 #define BTN_ENC 49 // AUX3 PIN 7
...@@ -1210,7 +1210,7 @@ ...@@ -1210,7 +1210,7 @@
#define BTN_ENC 31 //the click #define BTN_ENC 31 //the click
#endif #endif
#ifdef G3D_PANEL #if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#else #else
#define SD_DETECT_PIN -1 // Ramps does not use this port #define SD_DETECT_PIN -1 // Ramps does not use this port
...@@ -1239,7 +1239,7 @@ ...@@ -1239,7 +1239,7 @@
#endif //ULTRA_LCD #endif //ULTRA_LCD
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -1341,9 +1341,9 @@ ...@@ -1341,9 +1341,9 @@
#endif #endif
#endif #endif
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
#ifdef PANEL_ONE #if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40 #define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42 #define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65 #define LCD_PINS_D4 65
...@@ -1359,7 +1359,7 @@ ...@@ -1359,7 +1359,7 @@
#define LCD_PINS_D7 29 #define LCD_PINS_D7 29
#endif //PANEL_ONE #endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37 #define BEEPER_PIN 37
#define BTN_EN1 31 #define BTN_EN1 31
...@@ -1367,20 +1367,20 @@ ...@@ -1367,20 +1367,20 @@
#define BTN_ENC 35 #define BTN_ENC 35
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(LCD_I2C_PANELOLU2) #elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43 #define BTN_EN2 43
#define BTN_ENC 32 #define BTN_ENC 32
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define KILL_PIN 41 #define KILL_PIN 41
#elif defined(LCD_I2C_VIKI) #elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7 #define BTN_EN2 7
#define BTN_ENC -1 #define BTN_ENC -1
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER) #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way. #define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37 #define BTN_EN2 37
#define BTN_ENC 31 #define BTN_ENC 31
...@@ -1396,14 +1396,14 @@ ...@@ -1396,14 +1396,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4 #define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2 //buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD #if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder #define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder #define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button #define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register #define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register #define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register #define SHIFT_LD 42 // shift register
#elif defined(PANEL_ONE) #elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3 #define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4 #define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7 #define BTN_ENC 49 // AUX3 PIN 7
...@@ -1413,7 +1413,7 @@ ...@@ -1413,7 +1413,7 @@
#define BTN_ENC 31 //the click #define BTN_ENC 31 //the click
#endif #endif
#ifdef G3D_PANEL #if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#else #else
#define SD_DETECT_PIN -1 // Ramps does not use this port #define SD_DETECT_PIN -1 // Ramps does not use this port
...@@ -1442,7 +1442,7 @@ ...@@ -1442,7 +1442,7 @@
#endif //ULTRA_LCD #endif //ULTRA_LCD
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -1544,9 +1544,9 @@ ...@@ -1544,9 +1544,9 @@
#endif #endif
#endif #endif
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
#ifdef PANEL_ONE #if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40 #define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42 #define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65 #define LCD_PINS_D4 65
...@@ -1562,7 +1562,7 @@ ...@@ -1562,7 +1562,7 @@
#define LCD_PINS_D7 29 #define LCD_PINS_D7 29
#endif //PANEL_ONE #endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37 #define BEEPER_PIN 37
#define BTN_EN1 31 #define BTN_EN1 31
...@@ -1570,20 +1570,20 @@ ...@@ -1570,20 +1570,20 @@
#define BTN_ENC 35 #define BTN_ENC 35
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(LCD_I2C_PANELOLU2) #elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43 #define BTN_EN2 43
#define BTN_ENC 32 #define BTN_ENC 32
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define KILL_PIN 41 #define KILL_PIN 41
#elif defined(LCD_I2C_VIKI) #elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7 #define BTN_EN2 7
#define BTN_ENC -1 #define BTN_ENC -1
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER) #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way. #define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37 #define BTN_EN2 37
#define BTN_ENC 31 #define BTN_ENC 31
...@@ -1599,14 +1599,14 @@ ...@@ -1599,14 +1599,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4 #define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2 //buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD #if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder #define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder #define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button #define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register #define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register #define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register #define SHIFT_LD 42 // shift register
#elif defined(PANEL_ONE) #elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3 #define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4 #define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7 #define BTN_ENC 49 // AUX3 PIN 7
...@@ -1616,7 +1616,7 @@ ...@@ -1616,7 +1616,7 @@
#define BTN_ENC 31 //the click #define BTN_ENC 31 //the click
#endif #endif
#ifdef G3D_PANEL #if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#else #else
#define SD_DETECT_PIN -1 // Ramps does not use this port #define SD_DETECT_PIN -1 // Ramps does not use this port
...@@ -1645,7 +1645,7 @@ ...@@ -1645,7 +1645,7 @@
#endif //ULTRA_LCD #endif //ULTRA_LCD
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -1747,9 +1747,9 @@ ...@@ -1747,9 +1747,9 @@
#endif #endif
#endif #endif
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
#ifdef PANEL_ONE #if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40 #define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42 #define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65 #define LCD_PINS_D4 65
...@@ -1765,7 +1765,7 @@ ...@@ -1765,7 +1765,7 @@
#define LCD_PINS_D7 29 #define LCD_PINS_D7 29
#endif //PANEL_ONE #endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37 #define BEEPER_PIN 37
#define BTN_EN1 31 #define BTN_EN1 31
...@@ -1773,20 +1773,20 @@ ...@@ -1773,20 +1773,20 @@
#define BTN_ENC 35 #define BTN_ENC 35
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(LCD_I2C_PANELOLU2) #elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43 #define BTN_EN2 43
#define BTN_ENC 32 #define BTN_ENC 32
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define KILL_PIN 41 #define KILL_PIN 41
#elif defined(LCD_I2C_VIKI) #elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7 #define BTN_EN2 7
#define BTN_ENC -1 #define BTN_ENC -1
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(ELB_FULL_GRAPHIC_CONTROLLER) #elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35 // reverse if the encoder turns the wrong way. #define BTN_EN1 35 // reverse if the encoder turns the wrong way.
#define BTN_EN2 37 #define BTN_EN2 37
#define BTN_ENC 31 #define BTN_ENC 31
...@@ -1802,14 +1802,14 @@ ...@@ -1802,14 +1802,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4 #define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2 //buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD #if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder #define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder #define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button #define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register #define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // shift register #define SHIFT_CLK 44 // shift register
#define SHIFT_LD 42 // shift register #define SHIFT_LD 42 // shift register
#elif defined(PANEL_ONE) #elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3 #define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4 #define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7 #define BTN_ENC 49 // AUX3 PIN 7
...@@ -1819,7 +1819,7 @@ ...@@ -1819,7 +1819,7 @@
#define BTN_ENC 31 //the click #define BTN_ENC 31 //the click
#endif #endif
#ifdef G3D_PANEL #if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#else #else
#define SD_DETECT_PIN -1 // Ramps does not use this port #define SD_DETECT_PIN -1 // Ramps does not use this port
...@@ -1848,7 +1848,7 @@ ...@@ -1848,7 +1848,7 @@
#endif //ULTRA_LCD #endif //ULTRA_LCD
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -1910,7 +1910,7 @@ ...@@ -1910,7 +1910,7 @@
#define ORIG_HEATER_1_PIN 7 #define ORIG_HEATER_1_PIN 7
#define ORIG_TEMP_1_PIN 1 #define ORIG_TEMP_1_PIN 1
#ifdef BARICUDA #if ENABLED(BARICUDA)
#define ORIG_HEATER_2_PIN 6 #define ORIG_HEATER_2_PIN 6
#else #else
#define ORIG_HEATER_2_PIN -1 #define ORIG_HEATER_2_PIN -1
...@@ -1940,9 +1940,9 @@ ...@@ -1940,9 +1940,9 @@
#define KILL_PIN -1 //80 with Smart Controller LCD #define KILL_PIN -1 //80 with Smart Controller LCD
#define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing. #define SUICIDE_PIN -1 //PIN that has to be turned on right after start, to keep power flowing.
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#define KILL_PIN 80 #define KILL_PIN 80
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
//arduino pin which triggers an piezzo beeper //arduino pin which triggers an piezzo beeper
#define BEEPER_PIN 79 // Beeper on AUX-4 #define BEEPER_PIN 79 // Beeper on AUX-4
#define LCD_PINS_RS 70 #define LCD_PINS_RS 70
...@@ -2122,7 +2122,7 @@ ...@@ -2122,7 +2122,7 @@
#ifdef NUM_SERVOS #if ENABLED(NUM_SERVOS)
#define SERVO0_PIN 5 #define SERVO0_PIN 5
#if NUM_SERVOS > 1 #if NUM_SERVOS > 1
...@@ -2139,9 +2139,9 @@ ...@@ -2139,9 +2139,9 @@
#endif #endif
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
// RADDS LCD panel // RADDS LCD panel
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
#define LCD_PINS_RS 42 #define LCD_PINS_RS 42
#define LCD_PINS_ENABLE 43 #define LCD_PINS_ENABLE 43
#define LCD_PINS_D4 44 #define LCD_PINS_D4 44
...@@ -2149,7 +2149,7 @@ ...@@ -2149,7 +2149,7 @@
#define LCD_PINS_D6 46 #define LCD_PINS_D6 46
#define LCD_PINS_D7 47 #define LCD_PINS_D7 47
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 41 #define BEEPER_PIN 41
#define BTN_EN1 52 #define BTN_EN1 52
#define BTN_EN2 50 #define BTN_EN2 50
...@@ -2162,7 +2162,7 @@ ...@@ -2162,7 +2162,7 @@
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
//works with radds??? #ifndef SDSUPPORT //works with radds??? #if DISABLED(SDSUPPORT)
//// these pins are defined in the SD library if building with SD support //// these pins are defined in the SD library if building with SD support
// #define MAX_SCK_PIN 52 // #define MAX_SCK_PIN 52
// #define MAX_MISO_PIN 50 // #define MAX_MISO_PIN 50
...@@ -2264,7 +2264,7 @@ ...@@ -2264,7 +2264,7 @@
#ifdef NUM_SERVOS #if ENABLED(NUM_SERVOS)
#define SERVO0_PIN 11 #define SERVO0_PIN 11
#if NUM_SERVOS > 1 #if NUM_SERVOS > 1
...@@ -2280,8 +2280,8 @@ ...@@ -2280,8 +2280,8 @@
#endif #endif
#endif #endif
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
// ramps-fd lcd adaptor // ramps-fd lcd adaptor
#define LCD_PINS_RS 16 #define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17 #define LCD_PINS_ENABLE 17
...@@ -2290,7 +2290,7 @@ ...@@ -2290,7 +2290,7 @@
#define LCD_PINS_D6 27 #define LCD_PINS_D6 27
#define LCD_PINS_D7 29 #define LCD_PINS_D7 29
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37 #define BEEPER_PIN 37
#define BTN_EN1 33 #define BTN_EN1 33
...@@ -2304,7 +2304,7 @@ ...@@ -2304,7 +2304,7 @@
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define MAX_SCK_PIN 52 #define MAX_SCK_PIN 52
#define MAX_MISO_PIN 50 #define MAX_MISO_PIN 50
...@@ -2560,7 +2560,7 @@ ...@@ -2560,7 +2560,7 @@
/** Display **/ /** Display **/
// GLCD on expansion port // GLCD on expansion port
#ifdef REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define LCD_PINS_RS 18 #define LCD_PINS_RS 18
#define LCD_PINS_ENABLE 15 #define LCD_PINS_ENABLE 15
...@@ -2578,7 +2578,7 @@ ...@@ -2578,7 +2578,7 @@
#endif //REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER #endif //REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#ifdef NUM_SERVOS #if ENABLED(NUM_SERVOS)
#define SERVO0_PIN 36 #define SERVO0_PIN 36
#if NUM_SERVOS > 1 #if NUM_SERVOS > 1
...@@ -2692,7 +2692,7 @@ ...@@ -2692,7 +2692,7 @@
#define ORIG_HEATER_1_PIN -1 #define ORIG_HEATER_1_PIN -1
#define ORIG_HEATER_2_PIN -1 #define ORIG_HEATER_2_PIN -1
#ifdef SANGUINOLOLU_V_1_2 #if ENABLED(SANGUINOLOLU_V_1_2)
#define ORIG_HEATER_BED_PIN 12 // (bed) #define ORIG_HEATER_BED_PIN 12 // (bed)
#define ORIG_X_ENABLE_PIN 14 #define ORIG_X_ENABLE_PIN 14
...@@ -2700,7 +2700,7 @@ ...@@ -2700,7 +2700,7 @@
#define ORIG_Z_ENABLE_PIN 26 #define ORIG_Z_ENABLE_PIN 26
#define ORIG_E0_ENABLE_PIN 14 #define ORIG_E0_ENABLE_PIN 14
#ifdef LCD_I2C_PANELOLU2 #if ENABLED(LCD_I2C_PANELOLU2)
#define ORIG_FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan #define ORIG_FAN_PIN 4 // Uses Transistor1 (PWM) on Panelolu2's Sanguino Adapter Board to drive the fan
#endif #endif
...@@ -2724,13 +2724,13 @@ ...@@ -2724,13 +2724,13 @@
/* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs SDSS as pin 24. But you better upgrade your Sanguino libraries! See #368. */ /* On some broken versions of the Sanguino libraries the pin definitions are wrong, which then needs SDSS as pin 24. But you better upgrade your Sanguino libraries! See #368. */
//#define SDSS 24 //#define SDSS 24
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
//we have no buzzer installed //we have no buzzer installed
#define BEEPER_PIN -1 #define BEEPER_PIN -1
//LCD Pins //LCD Pins
#ifdef DOGLCD #if ENABLED(DOGLCD)
#ifdef U8GLIB_ST7920 //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0 #if ENABLED(U8GLIB_ST7920) //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
#define LCD_PINS_RS 30 //CS chip select /SS chip slave select #define LCD_PINS_RS 30 //CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 29 //SID (MOSI) #define LCD_PINS_ENABLE 29 //SID (MOSI)
#define LCD_PINS_D4 17 //SCK (CLK) clock #define LCD_PINS_D4 17 //SCK (CLK) clock
...@@ -2757,8 +2757,8 @@ ...@@ -2757,8 +2757,8 @@
//The encoder and click button //The encoder and click button
#define BTN_EN1 11 #define BTN_EN1 11
#define BTN_EN2 10 #define BTN_EN2 10
#ifdef LCD_I2C_PANELOLU2 #if ENABLED(LCD_I2C_PANELOLU2)
#ifdef MELZI #if ENABLED(MELZI)
#define BTN_ENC 29 //the click switch #define BTN_ENC 29 //the click switch
#define LCD_SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board #define LCD_SDSS 30 //to use the SD card reader on the Panelolu2 rather than the melzi board
#else #else
...@@ -2774,7 +2774,7 @@ ...@@ -2774,7 +2774,7 @@
#endif //Newpanel #endif //Newpanel
#endif //ULTRA_LCD #endif //ULTRA_LCD
#ifdef MAKRPANEL #if ENABLED(MAKRPANEL)
#define BEEPER_PIN 29 #define BEEPER_PIN 29
// Pins for DOGM SPI LCD Support // Pins for DOGM SPI LCD Support
#define DOGLCD_A0 30 #define DOGLCD_A0 30
...@@ -2855,7 +2855,7 @@ ...@@ -2855,7 +2855,7 @@
#define ORIG_FAN_PIN 9 #define ORIG_FAN_PIN 9
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL) #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41 #define KILL_PIN 41
#else #else
#define KILL_PIN -1 #define KILL_PIN -1
...@@ -2890,14 +2890,14 @@ ...@@ -2890,14 +2890,14 @@
#define SERVO3_PIN 4 #define SERVO3_PIN 4
#endif #endif
#ifdef TEMP_STAT_LEDS #if ENABLED(TEMP_STAT_LEDS)
#define STAT_LED_RED 6 #define STAT_LED_RED 6
#define STAT_LED_BLUE 11 #define STAT_LED_BLUE 11
#endif #endif
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
#define LCD_PINS_RS 16 #define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17 #define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23 #define LCD_PINS_D4 23
...@@ -2905,7 +2905,7 @@ ...@@ -2905,7 +2905,7 @@
#define LCD_PINS_D6 27 #define LCD_PINS_D6 27
#define LCD_PINS_D7 29 #define LCD_PINS_D7 29
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37 #define BEEPER_PIN 37
#define BTN_EN1 31 #define BTN_EN1 31
...@@ -2913,14 +2913,14 @@ ...@@ -2913,14 +2913,14 @@
#define BTN_ENC 35 #define BTN_ENC 35
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(LCD_I2C_PANELOLU2) #elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43 #define BTN_EN2 43
#define BTN_ENC 32 #define BTN_ENC 32
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define KILL_PIN 41 #define KILL_PIN 41
#elif defined(LCD_I2C_VIKI) #elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7 #define BTN_EN2 7
#define BTN_ENC -1 #define BTN_ENC -1
...@@ -2931,7 +2931,7 @@ ...@@ -2931,7 +2931,7 @@
#define BEEPER_PIN 33 // Beeper on AUX-4 #define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2 //buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD #if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder #define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder #define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button #define BTN_ENC 63 // enter button
...@@ -2944,7 +2944,7 @@ ...@@ -2944,7 +2944,7 @@
#define BTN_ENC 31 //the click #define BTN_ENC 31 //the click
#endif #endif
#ifdef G3D_PANEL #if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#else #else
#define SD_DETECT_PIN -1 // Ramps does not use this port #define SD_DETECT_PIN -1 // Ramps does not use this port
...@@ -2975,7 +2975,7 @@ ...@@ -2975,7 +2975,7 @@
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -3057,7 +3057,7 @@ ...@@ -3057,7 +3057,7 @@
#define CONTROLLERFAN_PIN 4 #define CONTROLLERFAN_PIN 4
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL) #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41 #define KILL_PIN 41
#else #else
#define KILL_PIN -1 #define KILL_PIN -1
...@@ -3080,7 +3080,7 @@ ...@@ -3080,7 +3080,7 @@
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING #define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#ifdef NUM_SERVOS #if ENABLED(NUM_SERVOS)
#define SERVO0_PIN 47 #define SERVO0_PIN 47
#if NUM_SERVOS > 1 #if NUM_SERVOS > 1
#define SERVO1_PIN -1 #define SERVO1_PIN -1
...@@ -3093,14 +3093,14 @@ ...@@ -3093,14 +3093,14 @@
#endif #endif
#endif #endif
#ifdef TEMP_STAT_LEDS #if ENABLED(TEMP_STAT_LEDS)
#define STAT_LED_RED 32 #define STAT_LED_RED 32
#define STAT_LED_BLUE 35 #define STAT_LED_BLUE 35
#endif #endif
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
#define LCD_PINS_RS 16 #define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17 #define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23 #define LCD_PINS_D4 23
...@@ -3108,7 +3108,7 @@ ...@@ -3108,7 +3108,7 @@
#define LCD_PINS_D6 27 #define LCD_PINS_D6 27
#define LCD_PINS_D7 29 #define LCD_PINS_D7 29
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37 #define BEEPER_PIN 37
#define BTN_EN1 31 #define BTN_EN1 31
...@@ -3116,14 +3116,14 @@ ...@@ -3116,14 +3116,14 @@
#define BTN_ENC 35 #define BTN_ENC 35
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#elif defined(LCD_I2C_PANELOLU2) #elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47 //reverse if the encoder turns the wrong way. #define BTN_EN1 47 //reverse if the encoder turns the wrong way.
#define BTN_EN2 43 #define BTN_EN2 43
#define BTN_ENC 32 #define BTN_ENC 32
#define LCD_SDSS 53 #define LCD_SDSS 53
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#define KILL_PIN 41 #define KILL_PIN 41
#elif defined(LCD_I2C_VIKI) #elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 //reverse if the encoder turns the wrong way. #define BTN_EN1 22 //reverse if the encoder turns the wrong way.
#define BTN_EN2 7 #define BTN_EN2 7
#define BTN_ENC -1 #define BTN_ENC -1
...@@ -3134,7 +3134,7 @@ ...@@ -3134,7 +3134,7 @@
#define BEEPER_PIN 33 // Beeper on AUX-4 #define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2 //buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD #if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder #define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder #define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button #define BTN_ENC 63 // enter button
...@@ -3147,7 +3147,7 @@ ...@@ -3147,7 +3147,7 @@
#define BTN_ENC 31 //the click #define BTN_ENC 31 //the click
#endif #endif
#ifdef G3D_PANEL #if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#else #else
#define SD_DETECT_PIN -1 // Ramps does not use this port #define SD_DETECT_PIN -1 // Ramps does not use this port
...@@ -3176,7 +3176,7 @@ ...@@ -3176,7 +3176,7 @@
#endif //ULTRA_LCD #endif //ULTRA_LCD
#if defined(VIKI2) || defined(miniVIKI) #if ENABLED(VIKI2) || ENABLED(miniVIKI)
#define BEEPER_PIN 33 #define BEEPER_PIN 33
// Pins for DOGM SPI LCD Support // Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44 #define DOGLCD_A0 44
...@@ -3194,7 +3194,7 @@ ...@@ -3194,7 +3194,7 @@
#define KILL_PIN 31 #define KILL_PIN 31
#endif #endif
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -3271,9 +3271,9 @@ ...@@ -3271,9 +3271,9 @@
#define KILL_PIN -1 #define KILL_PIN -1
#define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing. #define SUICIDE_PIN 54 //PIN that has to be turned on right after start, to keep power flowing.
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
//arduino pin witch triggers an piezzo beeper //arduino pin witch triggers an piezzo beeper
#define BEEPER_PIN 18 #define BEEPER_PIN 18
...@@ -3385,9 +3385,9 @@ ...@@ -3385,9 +3385,9 @@
#define BEEPER_PIN 33 // Beeper on AUX-4 #define BEEPER_PIN 33 // Beeper on AUX-4
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL #if ENABLED(NEWPANEL)
//arduino pin which triggers an piezzo beeper //arduino pin which triggers an piezzo beeper
#define LCD_PINS_RS 16 #define LCD_PINS_RS 16
...@@ -3973,7 +3973,7 @@ ...@@ -3973,7 +3973,7 @@
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL) #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41 #define KILL_PIN 41
#else #else
#define KILL_PIN -1 #define KILL_PIN -1
...@@ -4010,7 +4010,7 @@ ...@@ -4010,7 +4010,7 @@
#define BEEPER_PIN 33 #define BEEPER_PIN 33
#if defined(ULTRA_LCD) && defined(NEWPANEL) #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
#define BEEPER_PIN -1 #define BEEPER_PIN -1
#define LCD_PINS_RS 27 #define LCD_PINS_RS 27
...@@ -4027,7 +4027,7 @@ ...@@ -4027,7 +4027,7 @@
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -4099,7 +4099,7 @@ ...@@ -4099,7 +4099,7 @@
#define PS_ON_PIN 12 #define PS_ON_PIN 12
#if defined(REPRAP_DISCOUNT_SMART_CONTROLLER) || defined(G3D_PANEL) #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) || ENABLED(G3D_PANEL)
#define KILL_PIN 41 #define KILL_PIN 41
#else #else
#define KILL_PIN -1 #define KILL_PIN -1
...@@ -4136,7 +4136,7 @@ ...@@ -4136,7 +4136,7 @@
#define BEEPER_PIN 33 #define BEEPER_PIN 33
#if defined(ULTRA_LCD) && defined(NEWPANEL) #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
#define BEEPER_PIN -1 #define BEEPER_PIN -1
#define LCD_PINS_RS 27 #define LCD_PINS_RS 27
...@@ -4153,7 +4153,7 @@ ...@@ -4153,7 +4153,7 @@
#endif // ULTRA_LCD && NEWPANEL #endif // ULTRA_LCD && NEWPANEL
// SPI for Max6675 Thermocouple // SPI for Max6675 Thermocouple
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
...@@ -4238,7 +4238,7 @@ ...@@ -4238,7 +4238,7 @@
#define KILL_PIN -1 #define KILL_PIN -1
#define ALARM_PIN -1 #define ALARM_PIN -1
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 9 #define SCK_PIN 9
#define MISO_PIN 11 #define MISO_PIN 11
...@@ -4437,7 +4437,7 @@ ...@@ -4437,7 +4437,7 @@
#define KILL_PIN -1 #define KILL_PIN -1
#define ALARM_PIN -1 #define ALARM_PIN -1
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 9 #define SCK_PIN 9
#define MISO_PIN 11 #define MISO_PIN 11
...@@ -4509,7 +4509,7 @@ ...@@ -4509,7 +4509,7 @@
#define SD_DETECT_PIN -1 #define SD_DETECT_PIN -1
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 9 #define SCK_PIN 9
#define MISO_PIN 11 #define MISO_PIN 11
...@@ -4524,7 +4524,7 @@ ...@@ -4524,7 +4524,7 @@
#define LCD_PINS_D6 -1 #define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1 #define LCD_PINS_D7 -1
#ifdef SAV_3DLCD #if ENABLED(SAV_3DLCD)
// For LCD SHIFT register LCD // For LCD SHIFT register LCD
#define SR_DATA_PIN 1 #define SR_DATA_PIN 1
#define SR_CLK_PIN 0 #define SR_CLK_PIN 0
...@@ -4536,7 +4536,7 @@ ...@@ -4536,7 +4536,7 @@
#define KILL_PIN 42 // A2 = 42 - teensy = 40 #define KILL_PIN 42 // A2 = 42 - teensy = 40
#define HOME_PIN -1 // A4 = marlin 44 - teensy = 42 #define HOME_PIN -1 // A4 = marlin 44 - teensy = 42
#ifdef NUM_SERVOS #if ENABLED(NUM_SERVOS)
#define SERVO0_PIN 41 // In teensy's pin definition for pinMode (in Servo.cpp) #define SERVO0_PIN 41 // In teensy's pin definition for pinMode (in Servo.cpp)
#endif #endif
...@@ -4649,14 +4649,14 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -4649,14 +4649,14 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define KILL_PIN -1 #define KILL_PIN -1
#define ALARM_PIN -1 #define ALARM_PIN -1
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 21 // 9 #define SCK_PIN 21 // 9
#define MISO_PIN 23 // 11 #define MISO_PIN 23 // 11
#define MOSI_PIN 22 // 10 #define MOSI_PIN 22 // 10
#endif #endif
#ifdef ULTIPANEL #if ENABLED(ULTIPANEL)
#define LCD_PINS_RS 8 #define LCD_PINS_RS 8
#define LCD_PINS_ENABLE 9 #define LCD_PINS_ENABLE 9
#define LCD_PINS_D4 10 #define LCD_PINS_D4 10
...@@ -4733,7 +4733,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -4733,7 +4733,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
// The SDSS pin uses a different pin mapping from file Sd2PinMap.h // The SDSS pin uses a different pin mapping from file Sd2PinMap.h
#define SDSS 20 #define SDSS 20
#ifndef SDSUPPORT #if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support // these pins are defined in the SD library if building with SD support
#define SCK_PIN 9 #define SCK_PIN 9
#define MISO_PIN 11 #define MISO_PIN 11
...@@ -5123,7 +5123,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5123,7 +5123,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
********************************* END MOTHERBOARD *************************************** ********************************* END MOTHERBOARD ***************************************
/****************************************************************************************/ /****************************************************************************************/
#ifndef KNOWN_BOARD #if DISABLED(KNOWN_BOARD)
#error Unknown MOTHERBOARD value in configuration.h #error Unknown MOTHERBOARD value in configuration.h
#endif #endif
...@@ -5146,7 +5146,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5146,7 +5146,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define ORIG_TEMP_3_PIN -1 #define ORIG_TEMP_3_PIN -1
#endif #endif
#ifdef X_STOP_PIN #if ENABLED(X_STOP_PIN)
#if X_HOME_DIR < 0 #if X_HOME_DIR < 0
#define X_MIN_PIN X_STOP_PIN #define X_MIN_PIN X_STOP_PIN
#define X_MAX_PIN -1 #define X_MAX_PIN -1
...@@ -5156,7 +5156,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5156,7 +5156,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#endif #endif
#endif #endif
#ifdef Y_STOP_PIN #if ENABLED(Y_STOP_PIN)
#if Y_HOME_DIR < 0 #if Y_HOME_DIR < 0
#define Y_MIN_PIN Y_STOP_PIN #define Y_MIN_PIN Y_STOP_PIN
#define Y_MAX_PIN -1 #define Y_MAX_PIN -1
...@@ -5166,7 +5166,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5166,7 +5166,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#endif #endif
#endif #endif
#ifdef Z_STOP_PIN #if ENABLED(Z_STOP_PIN)
#if Z_HOME_DIR < 0 #if Z_HOME_DIR < 0
#define Z_MIN_PIN Z_STOP_PIN #define Z_MIN_PIN Z_STOP_PIN
#define Z_MAX_PIN -1 #define Z_MAX_PIN -1
...@@ -5194,35 +5194,35 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5194,35 +5194,35 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define Z_MAX_PIN -1 #define Z_MAX_PIN -1
#endif //Z_HOME_DIR > 0 #endif //Z_HOME_DIR > 0
#ifndef Z_PROBE_ENDSTOP // Allow code to compile regardless of Z_PROBE_ENDSTOP setting. #if DISABLED(Z_PROBE_ENDSTOP) // Allow code to compile regardless of Z_PROBE_ENDSTOP setting.
#define Z_PROBE_PIN -1 #define Z_PROBE_PIN -1
#endif #endif
#ifdef DISABLE_XMAX_ENDSTOP #if ENABLED(DISABLE_XMAX_ENDSTOP)
#undef X_MAX_PIN #undef X_MAX_PIN
#define X_MAX_PIN -1 #define X_MAX_PIN -1
#endif #endif
#ifdef DISABLE_XMIN_ENDSTOP #if ENABLED(DISABLE_XMIN_ENDSTOP)
#undef X_MIN_PIN #undef X_MIN_PIN
#define X_MIN_PIN -1 #define X_MIN_PIN -1
#endif #endif
#ifdef DISABLE_YMAX_ENDSTOP #if ENABLED(DISABLE_YMAX_ENDSTOP)
#define Y_MAX_PIN -1 #define Y_MAX_PIN -1
#endif #endif
#ifdef DISABLE_YMIN_ENDSTOP #if ENABLED(DISABLE_YMIN_ENDSTOP)
#undef Y_MIN_PIN #undef Y_MIN_PIN
#define Y_MIN_PIN -1 #define Y_MIN_PIN -1
#endif #endif
#ifdef DISABLE_ZMAX_ENDSTOP #if ENABLED(DISABLE_ZMAX_ENDSTOP)
#undef Z_MAX_PIN #undef Z_MAX_PIN
#define Z_MAX_PIN -1 #define Z_MAX_PIN -1
#endif #endif
#ifdef DISABLE_ZMIN_ENDSTOP #if ENABLED(DISABLE_ZMIN_ENDSTOP)
#undef Z_MIN_PIN #undef Z_MIN_PIN
#define Z_MIN_PIN -1 #define Z_MIN_PIN -1
#endif #endif
...@@ -5263,7 +5263,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a ...@@ -5263,7 +5263,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define ORIG_TEMP_3_PIN -1 #define ORIG_TEMP_3_PIN -1
#endif #endif
#ifdef MKR4 #if ENABLED(MKR4)
#if (EXTRUDERS == 2) && (DRIVER_EXTRUDERS == 1) // Use this for one driver and two extruder #if (EXTRUDERS == 2) && (DRIVER_EXTRUDERS == 1) // Use this for one driver and two extruder
#define E0E1_CHOICE_PIN 5 #define E0E1_CHOICE_PIN 5
#elif (EXTRUDERS == 3) && (DRIVER_EXTRUDERS == 1) // Use this for one driver and 3 extruder #elif (EXTRUDERS == 3) && (DRIVER_EXTRUDERS == 1) // Use this for one driver and 3 extruder
......
...@@ -109,7 +109,7 @@ static float previous_nominal_speed; // Nominal speed of previous path line se ...@@ -109,7 +109,7 @@ static float previous_nominal_speed; // Nominal speed of previous path line se
unsigned char g_uc_extruder_last_move[4] = {0,0,0,0}; unsigned char g_uc_extruder_last_move[4] = {0,0,0,0};
#ifdef XY_FREQUENCY_LIMIT #if ENABLED(XY_FREQUENCY_LIMIT)
// Used for the frequency limit // Used for the frequency limit
#define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT) #define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
// Old direction bits. Used for speed calculations // Old direction bits. Used for speed calculations
...@@ -429,7 +429,7 @@ void check_axes_activity() { ...@@ -429,7 +429,7 @@ void check_axes_activity() {
} }
#if HAS(FAN) #if HAS(FAN)
#ifdef FAN_KICKSTART_TIME #if ENABLED(FAN_KICKSTART_TIME)
static millis_t fan_kick_end; static millis_t fan_kick_end;
if (tail_fan_speed) { if (tail_fan_speed) {
millis_t ms = millis(); millis_t ms = millis();
...@@ -803,7 +803,7 @@ float junction_deviation = 0.1; ...@@ -803,7 +803,7 @@ float junction_deviation = 0.1;
if (segment_time < minsegmenttime) { if (segment_time < minsegmenttime) {
// buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more. // buffer is draining, add extra time. The amount of time added increases if the buffer is still emptied more.
inverse_second = 1000000.0 / (segment_time + lround(2 * (minsegmenttime - segment_time) / moves_queued)); inverse_second = 1000000.0 / (segment_time + lround(2 * (minsegmenttime - segment_time) / moves_queued));
#ifdef XY_FREQUENCY_LIMIT #if ENABLED(XY_FREQUENCY_LIMIT)
segment_time = lround(1000000.0 / inverse_second); segment_time = lround(1000000.0 / inverse_second);
#endif #endif
} }
...@@ -850,7 +850,7 @@ float junction_deviation = 0.1; ...@@ -850,7 +850,7 @@ float junction_deviation = 0.1;
} }
// Max segement time in us. // Max segement time in us.
#ifdef XY_FREQUENCY_LIMIT #if ENABLED(XY_FREQUENCY_LIMIT)
#define MAX_FREQ_TIME (1000000.0 / XY_FREQUENCY_LIMIT) #define MAX_FREQ_TIME (1000000.0 / XY_FREQUENCY_LIMIT)
// Check and limit the xy direction change frequency // Check and limit the xy direction change frequency
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
#if NUM_SERVOS > 4 #if NUM_SERVOS > 4
#error The maximum number of SERVOS in Marlin is 4. #error The maximum number of SERVOS in Marlin is 4.
#endif #endif
#if defined(NUM_SERVOS) && NUM_SERVOS > 0 #if ENABLED(NUM_SERVOS) && NUM_SERVOS > 0
#if X_ENDSTOP_SERVO_NR >= 0 || Y_ENDSTOP_SERVO_NR >= 0 || Z_ENDSTOP_SERVO_NR >= 0 #if X_ENDSTOP_SERVO_NR >= 0 || Y_ENDSTOP_SERVO_NR >= 0 || Z_ENDSTOP_SERVO_NR >= 0
#if X_ENDSTOP_SERVO_NR >= NUM_SERVOS #if X_ENDSTOP_SERVO_NR >= NUM_SERVOS
#error X_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS. #error X_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS.
...@@ -143,23 +143,24 @@ ...@@ -143,23 +143,24 @@
* Require a Z Probe Pin if Z_PROBE_ENDSTOP is enabled. * Require a Z Probe Pin if Z_PROBE_ENDSTOP is enabled.
*/ */
#if ENABLED(Z_PROBE_ENDSTOP) #if ENABLED(Z_PROBE_ENDSTOP)
#ifndef Z_PROBE_PIN #if DISABLED(Z_PROBE_PIN)
#error You must have a Z_PROBE_PIN defined in pins2tool.h file if you enable Z_PROBE_ENDSTOP. #error You must have a Z_PROBE_PIN defined in pins2tool.h file if you enable Z_PROBE_ENDSTOP.
#erro sistema pins2tool.h
#endif #endif
#if Z_PROBE_PIN == -1 #if Z_PROBE_PIN == -1
#error You must set Z_PROBE_PIN to a valid pin if you enable Z_PROBE_ENDSTOP. #error You must set Z_PROBE_PIN to a valid pin if you enable Z_PROBE_ENDSTOP.
#endif #endif
// Forcing Servo definitions can break some hall effect sensor setups. Leaving these here for further comment. // Forcing Servo definitions can break some hall effect sensor setups. Leaving these here for further comment.
// #ifndef NUM_SERVOS // #if DISABLED(NUM_SERVOS)
// #error You must have NUM_SERVOS defined and there must be at least 1 configured to use Z_PROBE_ENDSTOP. // #error You must have NUM_SERVOS defined and there must be at least 1 configured to use Z_PROBE_ENDSTOP.
// #endif // #endif
// #if defined(NUM_SERVOS) && NUM_SERVOS < 1 // #if ENABLED(NUM_SERVOS) && NUM_SERVOS < 1
// #error You must have at least 1 servo defined for NUM_SERVOS to use Z_PROBE_ENDSTOP. // #error You must have at least 1 servo defined for NUM_SERVOS to use Z_PROBE_ENDSTOP.
// #endif // #endif
// #if Z_ENDSTOP_SERVO_NR < 0 // #if Z_ENDSTOP_SERVO_NR < 0
// #error You must have Z_ENDSTOP_SERVO_NR set to at least 0 or above to use Z_PROBE_ENDSTOP. // #error You must have Z_ENDSTOP_SERVO_NR set to at least 0 or above to use Z_PROBE_ENDSTOP.
// #endif // #endif
// #ifndef SERVO_ENDSTOP_ANGLES // #if DISABLED(ERVO_ENDSTOP_ANGLES)
// #error You must have SERVO_ENDSTOP_ANGLES defined for Z Extend and Retract to use Z_PROBE_ENDSTOP. // #error You must have SERVO_ENDSTOP_ANGLES defined for Z Extend and Retract to use Z_PROBE_ENDSTOP.
// #endif // #endif
#endif #endif
...@@ -208,7 +209,7 @@ ...@@ -208,7 +209,7 @@
/** /**
* ULTIPANEL encoder * ULTIPANEL encoder
*/ */
#if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && !defined(SHIFT_CLK) #if ENABLED(ULTIPANEL) && DISABLED(NEWPANEL) && DISABLED(SR_LCD_2W_NL) && DISABLED(SHIFT_CLK)
#error ULTIPANEL requires some kind of encoder. #error ULTIPANEL requires some kind of encoder.
#endif #endif
...@@ -216,7 +217,7 @@ ...@@ -216,7 +217,7 @@
* Delta & Z_PROBE_ENDSTOP * Delta & Z_PROBE_ENDSTOP
*/ */
#if MECH(DELTA) && ENABLED(Z_PROBE_ENDSTOP) #if MECH(DELTA) && ENABLED(Z_PROBE_ENDSTOP)
#ifndef Z_PROBE_PIN #if DISABLED(Z_PROBE_PIN)
#error You must have a Z_PROBE_PIN defined in your pins2tool.h file if you enable Z_PROBE_ENDSTOP #error You must have a Z_PROBE_PIN defined in your pins2tool.h file if you enable Z_PROBE_ENDSTOP
#endif #endif
#if Z_PROBE_PIN == -1 #if Z_PROBE_PIN == -1
...@@ -230,7 +231,7 @@ ...@@ -230,7 +231,7 @@
#if ENABLED(DUAL_X_CARRIAGE) #if ENABLED(DUAL_X_CARRIAGE)
#if EXTRUDERS == 1 || MECH(COREXY) \ #if EXTRUDERS == 1 || MECH(COREXY) \
|| HASNT(X2_ENABLE) || HASNT(X2_STEP) || HASNT(X2_DIR) \ || HASNT(X2_ENABLE) || HASNT(X2_STEP) || HASNT(X2_DIR) \
|| !defined(X2_HOME_POS) || !defined(X2_MIN_POS) || !defined(X2_MAX_POS) \ || DISABLED(X2_HOME_POS) || DISABLED(X2_MIN_POS) || DISABLED(X2_MAX_POS) \
|| HASNT(X_MAX) || HASNT(X_MAX)
#error Missing or invalid definitions for DUAL_X_CARRIAGE mode. #error Missing or invalid definitions for DUAL_X_CARRIAGE mode.
#endif #endif
...@@ -269,7 +270,7 @@ ...@@ -269,7 +270,7 @@
#if HASNT(HEATER_2) #if HASNT(HEATER_2)
#error HEATER_2_PIN not defined for this board #error HEATER_2_PIN not defined for this board
#endif #endif
#elif HOTENDS > 1 || defined(HEATERS_PARALLEL) #elif HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
#if HASNT(HEATER_1) #if HASNT(HEATER_1)
#error HEATER_1_PIN not defined for this board #error HEATER_1_PIN not defined for this board
#endif #endif
...@@ -286,7 +287,7 @@ ...@@ -286,7 +287,7 @@
/** /**
* Warnings for old configurations * Warnings for old configurations
*/ */
#ifdef X_HOME_RETRACT_MM #if ENABLED(X_HOME_RETRACT_MM)
#error [XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM. #error [XYZ]_HOME_RETRACT_MM settings have been renamed [XYZ]_HOME_BUMP_MM.
#endif #endif
...@@ -294,11 +295,11 @@ ...@@ -294,11 +295,11 @@
#error WATCH_TEMP_PERIOD now uses seconds instead of milliseconds. #error WATCH_TEMP_PERIOD now uses seconds instead of milliseconds.
#endif #endif
#if DISABLED(THERMAL_PROTECTION_HOTENDS) && (defined(WATCH_TEMP_PERIOD) || defined(THERMAL_PROTECTION_PERIOD)) #if DISABLED(THERMAL_PROTECTION_HOTENDS) && (ENABLED(WATCH_TEMP_PERIOD) || ENABLED(THERMAL_PROTECTION_PERIOD))
#error Thermal Runaway Protection for hotends must now be enabled with THERMAL_PROTECTION_HOTENDS. #error Thermal Runaway Protection for hotends must now be enabled with THERMAL_PROTECTION_HOTENDS.
#endif #endif
#if DISABLED(THERMAL_PROTECTION_BED) && defined(THERMAL_PROTECTION_BED_PERIOD) #if DISABLED(THERMAL_PROTECTION_BED) && ENABLED(THERMAL_PROTECTION_BED_PERIOD)
#error Thermal Runaway Protection for the bed must now be enabled with THERMAL_PROTECTION_BED. #error Thermal Runaway Protection for the bed must now be enabled with THERMAL_PROTECTION_BED.
#endif #endif
...@@ -310,11 +311,11 @@ ...@@ -310,11 +311,11 @@
#error "Z_LATE_ENABLE can't be used with COREXZ." #error "Z_LATE_ENABLE can't be used with COREXZ."
#endif #endif
#ifdef BEEPER #if ENABLED(BEEPER)
#error BEEPER has been replaced with BEEPER_PIN. Please update your pins definitions. #error BEEPER has been replaced with BEEPER_PIN. Please update your pins definitions.
#endif #endif
#ifdef SDCARDDETECT #if ENABLED(SDCARDDETECT)
#error SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions. #error SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions.
#endif #endif
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
detach() - Stops an attached servos from pulsing its i/o pin. detach() - Stops an attached servos from pulsing its i/o pin.
*/ */
#include "Configuration.h" #include "Configuration_Basic.h"
#if HAS(SERVOS) #if HAS(SERVOS)
...@@ -103,15 +103,15 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t ...@@ -103,15 +103,15 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
#ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform #ifndef WIRING // Wiring pre-defines signal handlers so don't define any if compiling for the Wiring platform
// Interrupt handlers for Arduino // Interrupt handlers for Arduino
#if ENABLED(_useTimer1) #ifdef _useTimer1
SIGNAL (TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); } SIGNAL (TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
#endif #endif
#if ENABLED(_useTimer3) #ifdef _useTimer3
SIGNAL (TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); } SIGNAL (TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
#endif #endif
#if ENABLED(_useTimer4) #ifdef _useTimer4
SIGNAL (TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); } SIGNAL (TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); }
#endif #endif
...@@ -122,10 +122,10 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t ...@@ -122,10 +122,10 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
#else //!WIRING #else //!WIRING
// Interrupt handlers for Wiring // Interrupt handlers for Wiring
#if ENABLED(_useTimer1) #ifdef _useTimer1
void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); } void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
#endif #endif
#if ENABLED(_useTimer3) #ifdef _useTimer3
void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); } void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
#endif #endif
...@@ -133,7 +133,7 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t ...@@ -133,7 +133,7 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
static void initISR(timer16_Sequence_t timer) { static void initISR(timer16_Sequence_t timer) {
#if ENABLED(_useTimer1) #ifdef _useTimer1
if (timer == _timer1) { if (timer == _timer1) {
TCCR1A = 0; // normal counting mode TCCR1A = 0; // normal counting mode
TCCR1B = _BV(CS11); // set prescaler of 8 TCCR1B = _BV(CS11); // set prescaler of 8
...@@ -152,7 +152,7 @@ static void initISR(timer16_Sequence_t timer) { ...@@ -152,7 +152,7 @@ static void initISR(timer16_Sequence_t timer) {
} }
#endif #endif
#if ENABLED(_useTimer3) #ifdef _useTimer3
if (timer == _timer3) { if (timer == _timer3) {
TCCR3A = 0; // normal counting mode TCCR3A = 0; // normal counting mode
TCCR3B = _BV(CS31); // set prescaler of 8 TCCR3B = _BV(CS31); // set prescaler of 8
...@@ -170,7 +170,7 @@ static void initISR(timer16_Sequence_t timer) { ...@@ -170,7 +170,7 @@ static void initISR(timer16_Sequence_t timer) {
} }
#endif #endif
#if ENABLED(_useTimer4) #ifdef _useTimer4
if (timer == _timer4) { if (timer == _timer4) {
TCCR4A = 0; // normal counting mode TCCR4A = 0; // normal counting mode
TCCR4B = _BV(CS41); // set prescaler of 8 TCCR4B = _BV(CS41); // set prescaler of 8
...@@ -180,7 +180,7 @@ static void initISR(timer16_Sequence_t timer) { ...@@ -180,7 +180,7 @@ static void initISR(timer16_Sequence_t timer) {
} }
#endif #endif
#if ENABLED(_useTimer5) #ifdef _useTimer5
if (timer == _timer5) { if (timer == _timer5) {
TCCR5A = 0; // normal counting mode TCCR5A = 0; // normal counting mode
TCCR5B = _BV(CS51); // set prescaler of 8 TCCR5B = _BV(CS51); // set prescaler of 8
...@@ -307,7 +307,7 @@ bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; } ...@@ -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
......
...@@ -262,7 +262,7 @@ void checkHitEndstops() { ...@@ -262,7 +262,7 @@ void checkHitEndstops() {
ECHO_MV(MSG_ENDSTOP_Z, (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]); ECHO_MV(MSG_ENDSTOP_Z, (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT MSG_ENDSTOP_ZS); LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT MSG_ENDSTOP_ZS);
} }
#ifdef Z_PROBE_ENDSTOP #if ENABLED(Z_PROBE_ENDSTOP)
if (endstop_hit_bits & BIT(Z_PROBE)) { if (endstop_hit_bits & BIT(Z_PROBE)) {
ECHO_MV(MSG_ENDSTOP_ZPS, (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]); ECHO_MV(MSG_ENDSTOP_ZPS, (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT MSG_ENDSTOP_ZPS); LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT MSG_ENDSTOP_ZPS);
...@@ -603,7 +603,7 @@ ISR(TIMER1_COMPA_vect) { ...@@ -603,7 +603,7 @@ ISR(TIMER1_COMPA_vect) {
if (cleaning_buffer_counter) { if (cleaning_buffer_counter) {
current_block = NULL; current_block = NULL;
plan_discard_current_block(); plan_discard_current_block();
#ifdef SD_FINISHED_RELEASECOMMAND #if ENABLED(SD_FINISHED_RELEASECOMMAND)
if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enqueuecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND)); if ((cleaning_buffer_counter == 1) && (SD_FINISHED_STEPPERRELEASE)) enqueuecommands_P(PSTR(SD_FINISHED_RELEASECOMMAND));
#endif #endif
cleaning_buffer_counter--; cleaning_buffer_counter--;
...@@ -669,7 +669,7 @@ ISR(TIMER1_COMPA_vect) { ...@@ -669,7 +669,7 @@ ISR(TIMER1_COMPA_vect) {
STEP_START(x,X); STEP_START(x,X);
STEP_START(y,Y); STEP_START(y,Y);
STEP_START(z,Z); STEP_START(z,Z);
#ifndef ADVANCE #if DISABLED(ADVANCE)
STEP_START(e,E); STEP_START(e,E);
#endif #endif
...@@ -1251,7 +1251,7 @@ void digipot_init() { ...@@ -1251,7 +1251,7 @@ void digipot_init() {
digipot_current(i,digipot_motor_current[i]); digipot_current(i,digipot_motor_current[i]);
} }
#endif #endif
#ifdef MOTOR_CURRENT_PWM_XY_PIN #if ENABLED(MOTOR_CURRENT_PWM_XY_PIN)
pinMode(MOTOR_CURRENT_PWM_XY_PIN, OUTPUT); pinMode(MOTOR_CURRENT_PWM_XY_PIN, OUTPUT);
pinMode(MOTOR_CURRENT_PWM_Z_PIN, OUTPUT); pinMode(MOTOR_CURRENT_PWM_Z_PIN, OUTPUT);
pinMode(MOTOR_CURRENT_PWM_E_PIN, OUTPUT); pinMode(MOTOR_CURRENT_PWM_E_PIN, OUTPUT);
...@@ -1277,7 +1277,7 @@ void digipot_current(uint8_t driver, int current) { ...@@ -1277,7 +1277,7 @@ void digipot_current(uint8_t driver, int current) {
const uint8_t digipot_ch[] = DIGIPOT_CHANNELS; const uint8_t digipot_ch[] = DIGIPOT_CHANNELS;
digitalPotWrite(digipot_ch[driver], current); digitalPotWrite(digipot_ch[driver], current);
#endif #endif
#ifdef MOTOR_CURRENT_PWM_XY_PIN #if ENABLED(MOTOR_CURRENT_PWM_XY_PIN)
switch(driver) { switch(driver) {
case 0: analogWrite(MOTOR_CURRENT_PWM_XY_PIN, 255L * current / MOTOR_CURRENT_PWM_RANGE); break; case 0: analogWrite(MOTOR_CURRENT_PWM_XY_PIN, 255L * current / MOTOR_CURRENT_PWM_RANGE); break;
case 1: analogWrite(MOTOR_CURRENT_PWM_Z_PIN, 255L * current / MOTOR_CURRENT_PWM_RANGE); break; case 1: analogWrite(MOTOR_CURRENT_PWM_Z_PIN, 255L * current / MOTOR_CURRENT_PWM_RANGE); break;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#define NORM_E_DIR() { if(current_block->active_driver == 2) { E2_DIR_WRITE(!INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}} #define NORM_E_DIR() { if(current_block->active_driver == 2) { E2_DIR_WRITE(!INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}}
#define REV_E_DIR() { if(current_block->active_driver == 2) { E2_DIR_WRITE(INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}} #define REV_E_DIR() { if(current_block->active_driver == 2) { E2_DIR_WRITE(INVERT_E2_DIR); } else { if(current_block->active_driver == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}}
#elif DRIVER_EXTRUDERS > 1 #elif DRIVER_EXTRUDERS > 1
#ifndef DUAL_X_CARRIAGE #if DISABLED(DUAL_X_CARRIAGE)
#define E_STEP_WRITE(v) { if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }} #define E_STEP_WRITE(v) { if(current_block->active_driver == 1) { E1_STEP_WRITE(v); } else { E0_STEP_WRITE(v); }}
#define NORM_E_DIR() { if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }} #define NORM_E_DIR() { if(current_block->active_driver == 1) { E1_DIR_WRITE(!INVERT_E1_DIR); } else { E0_DIR_WRITE(!INVERT_E0_DIR); }}
#define REV_E_DIR() { if(current_block->active_driver == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }} #define REV_E_DIR() { if(current_block->active_driver == 1) { E1_DIR_WRITE(INVERT_E1_DIR); } else { E0_DIR_WRITE(INVERT_E0_DIR); }}
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
//================================== macros ================================= //================================== macros =================================
//=========================================================================== //===========================================================================
#ifdef K1 // Defined in Configuration.h in the PID settings #if ENABLED(K1) // Defined in Configuration.h in the PID settings
#define K2 (1.0 - K1) #define K2 (1.0 - K1)
#endif #endif
...@@ -154,10 +154,10 @@ static int minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS( HEATER_0_RAW_LO_TEMP , HEAT ...@@ -154,10 +154,10 @@ static int minttemp_raw[HOTENDS] = ARRAY_BY_HOTENDS( HEATER_0_RAW_LO_TEMP , HEAT
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 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 minttemp[HOTENDS] = { 0 };
static int maxttemp[HOTENDS] = ARRAY_BY_HOTENDS1( 16383 ); static int maxttemp[HOTENDS] = ARRAY_BY_HOTENDS1( 16383 );
#ifdef BED_MINTEMP #if ENABLED(BED_MINTEMP)
static int bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP; static int bed_minttemp_raw = HEATER_BED_RAW_LO_TEMP;
#endif #endif
#ifdef BED_MAXTEMP #if ENABLED(BED_MAXTEMP)
static int bed_maxttemp_raw = HEATER_BED_RAW_HI_TEMP; static int bed_maxttemp_raw = HEATER_BED_RAW_HI_TEMP;
#endif #endif
...@@ -173,12 +173,12 @@ static float analog2temp(int raw, uint8_t e); ...@@ -173,12 +173,12 @@ static float analog2temp(int raw, uint8_t e);
static float analog2tempBed(int raw); static float analog2tempBed(int raw);
static void updateTemperaturesFromRawValues(); static void updateTemperaturesFromRawValues();
#ifdef THERMAL_PROTECTION_HOTENDS #if ENABLED(THERMAL_PROTECTION_HOTENDS)
int watch_target_temp[HOTENDS] = { 0 }; int watch_target_temp[HOTENDS] = { 0 };
millis_t watch_heater_next_ms[HOTENDS] = { 0 }; millis_t watch_heater_next_ms[HOTENDS] = { 0 };
#endif #endif
#ifndef SOFT_PWM_SCALE #if DISABLED(SOFT_PWM_SCALE)
#define SOFT_PWM_SCALE 0 #define SOFT_PWM_SCALE 0
#endif #endif
...@@ -471,7 +471,7 @@ inline void _temp_error(int e, const char *serial_msg, const char *lcd_msg) { ...@@ -471,7 +471,7 @@ inline void _temp_error(int e, const char *serial_msg, const char *lcd_msg) {
PS_PGM(serial_msg); PS_PGM(serial_msg);
ECHO_M(MSG_STOPPED_HEATER); ECHO_M(MSG_STOPPED_HEATER);
if (e >= 0) ECHO_EV((int)e); else ECHO_EM(MSG_HEATER_BED); if (e >= 0) ECHO_EV((int)e); else ECHO_EM(MSG_HEATER_BED);
#ifdef ULTRA_LCD #if ENABLED(ULTRA_LCD)
lcd_setalertstatuspgm(lcd_msg); lcd_setalertstatuspgm(lcd_msg);
#endif #endif
} }
...@@ -775,7 +775,7 @@ static float analog2tempBed(int raw) { ...@@ -775,7 +775,7 @@ static float analog2tempBed(int raw) {
if (i == BEDTEMPTABLE_LEN) celsius = PGM_RD_W(BEDTEMPTABLE[i-1][1]); if (i == BEDTEMPTABLE_LEN) celsius = PGM_RD_W(BEDTEMPTABLE[i-1][1]);
return celsius; return celsius;
#elif defined BED_USES_AD595 #elif ENABLED(BED_USES_AD595)
return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET; return ((raw * ((5.0 * 100.0) / 1024.0) / OVERSAMPLENR) * TEMP_SENSOR_AD595_GAIN) + TEMP_SENSOR_AD595_OFFSET;
#else #else
return 0; return 0;
...@@ -1049,38 +1049,38 @@ void tp_init() { ...@@ -1049,38 +1049,38 @@ void tp_init() {
maxttemp_raw[NR] += OVERSAMPLENR; \ maxttemp_raw[NR] += OVERSAMPLENR; \
} }
#ifdef HEATER_0_MINTEMP #if ENABLED(HEATER_0_MINTEMP)
TEMP_MIN_ROUTINE(0); TEMP_MIN_ROUTINE(0);
#endif #endif
#ifdef HEATER_0_MAXTEMP #if ENABLED(HEATER_0_MAXTEMP)
TEMP_MAX_ROUTINE(0); TEMP_MAX_ROUTINE(0);
#endif #endif
#if HOTENDS > 1 #if HOTENDS > 1
#ifdef HEATER_1_MINTEMP #if ENABLED(HEATER_1_MINTEMP)
TEMP_MIN_ROUTINE(1); TEMP_MIN_ROUTINE(1);
#endif #endif
#ifdef HEATER_1_MAXTEMP #if ENABLED(HEATER_1_MAXTEMP)
TEMP_MAX_ROUTINE(1); TEMP_MAX_ROUTINE(1);
#endif #endif
#if HOTENDS > 2 #if HOTENDS > 2
#ifdef HEATER_2_MINTEMP #if ENABLED(HEATER_2_MINTEMP)
TEMP_MIN_ROUTINE(2); TEMP_MIN_ROUTINE(2);
#endif #endif
#ifdef HEATER_2_MAXTEMP #if ENABLED(HEATER_2_MAXTEMP)
TEMP_MAX_ROUTINE(2); TEMP_MAX_ROUTINE(2);
#endif #endif
#if HOTENDS > 3 #if HOTENDS > 3
#ifdef HEATER_3_MINTEMP #if ENABLED(HEATER_3_MINTEMP)
TEMP_MIN_ROUTINE(3); TEMP_MIN_ROUTINE(3);
#endif #endif
#ifdef HEATER_3_MAXTEMP #if ENABLED(HEATER_3_MAXTEMP)
TEMP_MAX_ROUTINE(3); TEMP_MAX_ROUTINE(3);
#endif #endif
#endif // HOTENDS > 3 #endif // HOTENDS > 3
#endif // HOTENDS > 2 #endif // HOTENDS > 2
#endif // HOTENDS > 1 #endif // HOTENDS > 1
#ifdef BED_MINTEMP #if ENABLED(BED_MINTEMP)
while(analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) { while(analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
#if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
bed_minttemp_raw += OVERSAMPLENR; bed_minttemp_raw += OVERSAMPLENR;
...@@ -1089,7 +1089,7 @@ void tp_init() { ...@@ -1089,7 +1089,7 @@ void tp_init() {
#endif #endif
} }
#endif //BED_MINTEMP #endif //BED_MINTEMP
#ifdef BED_MAXTEMP #if ENABLED(BED_MAXTEMP)
while(analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) { while(analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) {
#if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP #if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
bed_maxttemp_raw -= OVERSAMPLENR; bed_maxttemp_raw -= OVERSAMPLENR;
...@@ -1471,7 +1471,7 @@ ISR(TIMER0_COMPB_vect) { ...@@ -1471,7 +1471,7 @@ ISR(TIMER0_COMPB_vect) {
* *
* for heaters drived by relay * for heaters drived by relay
*/ */
#ifndef MIN_STATE_TIME #if DISABLED(MIN_STATE_TIME)
#define MIN_STATE_TIME 16 // MIN_STATE_TIME * 65.5 = time in milliseconds #define MIN_STATE_TIME 16 // MIN_STATE_TIME * 65.5 = time in milliseconds
#endif #endif
......
...@@ -97,7 +97,7 @@ extern float current_temperature_bed; ...@@ -97,7 +97,7 @@ extern float current_temperature_bed;
FORCE_INLINE float degHotend(uint8_t hotend) { return current_temperature[HOTEND_ARG]; } FORCE_INLINE float degHotend(uint8_t hotend) { return current_temperature[HOTEND_ARG]; }
FORCE_INLINE float degBed() { return current_temperature_bed; } FORCE_INLINE float degBed() { return current_temperature_bed; }
#ifdef SHOW_TEMP_ADC_VALUES #if ENABLED(SHOW_TEMP_ADC_VALUES)
FORCE_INLINE float rawHotendTemp(uint8_t hotend) { return current_temperature_raw[HOTEND_ARG]; } FORCE_INLINE float rawHotendTemp(uint8_t hotend) { return current_temperature_raw[HOTEND_ARG]; }
FORCE_INLINE float rawBedTemp() { return current_temperature_bed_raw; } FORCE_INLINE float rawBedTemp() { return current_temperature_bed_raw; }
#endif #endif
...@@ -105,7 +105,7 @@ FORCE_INLINE float degBed() { return current_temperature_bed; } ...@@ -105,7 +105,7 @@ FORCE_INLINE float degBed() { return current_temperature_bed; }
FORCE_INLINE float degTargetHotend(uint8_t hotend) { return target_temperature[HOTEND_ARG]; } FORCE_INLINE float degTargetHotend(uint8_t hotend) { return target_temperature[HOTEND_ARG]; }
FORCE_INLINE float degTargetBed() { return target_temperature_bed; } FORCE_INLINE float degTargetBed() { return target_temperature_bed; }
#ifdef THERMAL_PROTECTION_HOTENDS #if ENABLED(THERMAL_PROTECTION_HOTENDS)
void start_watching_heater(int e=0); void start_watching_heater(int e=0);
#endif #endif
......
...@@ -656,24 +656,24 @@ const short temptable_13[][2] PROGMEM = { ...@@ -656,24 +656,24 @@ const short temptable_13[][2] PROGMEM = {
/* The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature. /* The PT100 in the Ultimaker v2.0 electronics has a high sample value for a high temperature.
This does not match the normal thermistor behaviour so we need to set the following defines */ This does not match the normal thermistor behaviour so we need to set the following defines */
#if (THERMISTORHEATER_0 == 20) #if (THERMISTORHEATER_0 == 20)
# define HEATER_0_RAW_HI_TEMP 16383 #define HEATER_0_RAW_HI_TEMP 16383
# define HEATER_0_RAW_LO_TEMP 0 #define HEATER_0_RAW_LO_TEMP 0
#endif #endif
#if (THERMISTORHEATER_1 == 20) #if (THERMISTORHEATER_1 == 20)
# define HEATER_1_RAW_HI_TEMP 16383 #define HEATER_1_RAW_HI_TEMP 16383
# define HEATER_1_RAW_LO_TEMP 0 #define HEATER_1_RAW_LO_TEMP 0
#endif #endif
#if (THERMISTORHEATER_2 == 20) #if (THERMISTORHEATER_2 == 20)
# define HEATER_2_RAW_HI_TEMP 16383 #define HEATER_2_RAW_HI_TEMP 16383
# define HEATER_2_RAW_LO_TEMP 0 #define HEATER_2_RAW_LO_TEMP 0
#endif #endif
#if (THERMISTORHEATER_3 == 20) #if (THERMISTORHEATER_3 == 20)
# define HEATER_3_RAW_HI_TEMP 16383 #define HEATER_3_RAW_HI_TEMP 16383
# define HEATER_3_RAW_LO_TEMP 0 #define HEATER_3_RAW_LO_TEMP 0
#endif #endif
#if (THERMISTORBED == 20) #if (THERMISTORBED == 20)
# define HEATER_BED_RAW_HI_TEMP 16383 #define HEATER_BED_RAW_HI_TEMP 16383
# define HEATER_BED_RAW_LO_TEMP 0 #define HEATER_BED_RAW_LO_TEMP 0
#endif #endif
const short temptable_20[][2] PROGMEM = { const short temptable_20[][2] PROGMEM = {
{0 * OVERSAMPLENR, 0}, {0 * OVERSAMPLENR, 0},
...@@ -1059,7 +1059,7 @@ const short temptable_1047[][2] PROGMEM = { ...@@ -1059,7 +1059,7 @@ const short temptable_1047[][2] PROGMEM = {
#if (THERMISTORHEATER_0 == 999) || (THERMISTORHEATER_1 == 999) || (THERMISTORHEATER_2 == 999) || (THERMISTORHEATER_3 == 999) || (THERMISTORBED == 999) //User defined table #if (THERMISTORHEATER_0 == 999) || (THERMISTORHEATER_1 == 999) || (THERMISTORHEATER_2 == 999) || (THERMISTORHEATER_3 == 999) || (THERMISTORBED == 999) //User defined table
// Dummy Thermistor table.. It will ALWAYS read a fixed value. // Dummy Thermistor table.. It will ALWAYS read a fixed value.
#ifndef DUMMY_THERMISTOR_999_VALUE #if DISABLED(DUMMY_THERMISTOR_999_VALUE)
#define DUMMY_THERMISTOR_999_VALUE 25 #define DUMMY_THERMISTOR_999_VALUE 25
#endif #endif
const short temptable_999[][2] PROGMEM = { const short temptable_999[][2] PROGMEM = {
...@@ -1070,7 +1070,7 @@ const short temptable_1047[][2] PROGMEM = { ...@@ -1070,7 +1070,7 @@ const short temptable_1047[][2] PROGMEM = {
#if (THERMISTORHEATER_0 == 998) || (THERMISTORHEATER_1 == 998) || (THERMISTORHEATER_2 == 998) || (THERMISTORHEATER_3 == 998) || (THERMISTORBED == 998) //User defined table #if (THERMISTORHEATER_0 == 998) || (THERMISTORHEATER_1 == 998) || (THERMISTORHEATER_2 == 998) || (THERMISTORHEATER_3 == 998) || (THERMISTORBED == 998) //User defined table
// Dummy Thermistor table.. It will ALWAYS read a fixed value. // Dummy Thermistor table.. It will ALWAYS read a fixed value.
#ifndef DUMMY_THERMISTOR_998_VALUE #if DISABLED(UMMY_THERMISTOR_998_VALUE)
#define DUMMY_THERMISTOR_998_VALUE 25 #define DUMMY_THERMISTOR_998_VALUE 25
#endif #endif
const short temptable_998[][2] PROGMEM = { const short temptable_998[][2] PROGMEM = {
...@@ -1080,119 +1080,119 @@ const short temptable_1047[][2] PROGMEM = { ...@@ -1080,119 +1080,119 @@ const short temptable_1047[][2] PROGMEM = {
#endif #endif
#define _TT_NAME(_N) temptable_ ## _N #define _TT_NAME(_N) temptable_ # #_N
#define TT_NAME(_N) _TT_NAME(_N) #define TT_NAME(_N) _TT_NAME(_N)
#ifdef THERMISTORHEATER_0 #if ENABLED(THERMISTORHEATER_0)
# define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0) #define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0)
# define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE) #define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE)
#else #else
# ifdef HEATER_0_USES_THERMISTOR #if ENABLED(HEATER_0_USES_THERMISTOR)
# error No heater 0 thermistor table specified #error No heater 0 thermistor table specified
# else // HEATER_0_USES_THERMISTOR #else // HEATER_0_USES_THERMISTOR
# define HEATER_0_TEMPTABLE NULL #define HEATER_0_TEMPTABLE NULL
# define HEATER_0_TEMPTABLE_LEN 0 #define HEATER_0_TEMPTABLE_LEN 0
# endif // HEATER_0_USES_THERMISTOR #endif // HEATER_0_USES_THERMISTOR
#endif #endif
//Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature //Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature
#ifndef HEATER_0_RAW_HI_TEMP #if DISABLED(HEATER_0_RAW_HI_TEMP)
# ifdef HEATER_0_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value #if ENABLED(HEATER_0_USES_THERMISTOR) //In case of a thermistor the highest temperature results in the lowest ADC value
# define HEATER_0_RAW_HI_TEMP 0 #define HEATER_0_RAW_HI_TEMP 0
# define HEATER_0_RAW_LO_TEMP 16383 #define HEATER_0_RAW_LO_TEMP 16383
# else //In case of an thermocouple the highest temperature results in the highest ADC value #else //In case of an thermocouple the highest temperature results in the highest ADC value
# define HEATER_0_RAW_HI_TEMP 16383 #define HEATER_0_RAW_HI_TEMP 16383
# define HEATER_0_RAW_LO_TEMP 0 #define HEATER_0_RAW_LO_TEMP 0
# endif #endif
#endif #endif
#ifdef THERMISTORHEATER_1 #if ENABLED(THERMISTORHEATER_1)
# define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1) #define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1)
# define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE) #define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE)
#else #else
# ifdef HEATER_1_USES_THERMISTOR #if ENABLED(HEATER_1_USES_THERMISTOR)
# error No heater 1 thermistor table specified #error No heater 1 thermistor table specified
# else // HEATER_1_USES_THERMISTOR #else // HEATER_1_USES_THERMISTOR
# define HEATER_1_TEMPTABLE NULL #define HEATER_1_TEMPTABLE NULL
# define HEATER_1_TEMPTABLE_LEN 0 #define HEATER_1_TEMPTABLE_LEN 0
# endif // HEATER_1_USES_THERMISTOR #endif // HEATER_1_USES_THERMISTOR
#endif #endif
//Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature //Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature
#ifndef HEATER_1_RAW_HI_TEMP #if DISABLED(HEATER_1_RAW_HI_TEMP)
# ifdef HEATER_1_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value #if ENABLED(HEATER_1_USES_THERMISTOR) //In case of a thermistor the highest temperature results in the lowest ADC value
# define HEATER_1_RAW_HI_TEMP 0 #define HEATER_1_RAW_HI_TEMP 0
# define HEATER_1_RAW_LO_TEMP 16383 #define HEATER_1_RAW_LO_TEMP 16383
# else //In case of an thermocouple the highest temperature results in the highest ADC value #else //In case of an thermocouple the highest temperature results in the highest ADC value
# define HEATER_1_RAW_HI_TEMP 16383 #define HEATER_1_RAW_HI_TEMP 16383
# define HEATER_1_RAW_LO_TEMP 0 #define HEATER_1_RAW_LO_TEMP 0
# endif #endif
#endif #endif
#ifdef THERMISTORHEATER_2 #if ENABLED(THERMISTORHEATER_2)
# define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2) #define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2)
# define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE) #define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE)
#else #else
# ifdef HEATER_2_USES_THERMISTOR #if ENABLED(HEATER_2_USES_THERMISTOR)
# error No heater 2 thermistor table specified #error No heater 2 thermistor table specified
# else // HEATER_2_USES_THERMISTOR #else // HEATER_2_USES_THERMISTOR
# define HEATER_2_TEMPTABLE NULL #define HEATER_2_TEMPTABLE NULL
# define HEATER_2_TEMPTABLE_LEN 0 #define HEATER_2_TEMPTABLE_LEN 0
# endif // HEATER_2_USES_THERMISTOR #endif // HEATER_2_USES_THERMISTOR
#endif #endif
//Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature //Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature
#ifndef HEATER_2_RAW_HI_TEMP #if DISABLED(HEATER_2_RAW_HI_TEMP)
# ifdef HEATER_2_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value #if ENABLED(HEATER_2_USES_THERMISTOR) //In case of a thermistor the highest temperature results in the lowest ADC value
# define HEATER_2_RAW_HI_TEMP 0 #define HEATER_2_RAW_HI_TEMP 0
# define HEATER_2_RAW_LO_TEMP 16383 #define HEATER_2_RAW_LO_TEMP 16383
# else //In case of an thermocouple the highest temperature results in the highest ADC value #else //In case of an thermocouple the highest temperature results in the highest ADC value
# define HEATER_2_RAW_HI_TEMP 16383 #define HEATER_2_RAW_HI_TEMP 16383
# define HEATER_2_RAW_LO_TEMP 0 #define HEATER_2_RAW_LO_TEMP 0
# endif #endif
#endif #endif
#ifdef THERMISTORHEATER_3 #if ENABLED(THERMISTORHEATER_3)
# define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3) #define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3)
# define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE) #define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE)
#else #else
# ifdef HEATER_3_USES_THERMISTOR #if ENABLED(HEATER_3_USES_THERMISTOR)
# error No heater 3 thermistor table specified #error No heater 3 thermistor table specified
# else // HEATER_3_USES_THERMISTOR #else // HEATER_3_USES_THERMISTOR
# define HEATER_3_TEMPTABLE NULL #define HEATER_3_TEMPTABLE NULL
# define HEATER_3_TEMPTABLE_LEN 0 #define HEATER_3_TEMPTABLE_LEN 0
# endif // HEATER_3_USES_THERMISTOR #endif // HEATER_3_USES_THERMISTOR
#endif #endif
//Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature //Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature
#ifndef HEATER_3_RAW_HI_TEMP #if DISABLED(HEATER_3_RAW_HI_TEMP)
# ifdef HEATER_3_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value #if ENABLED(HEATER_3_USES_THERMISTOR) //In case of a thermistor the highest temperature results in the lowest ADC value
# define HEATER_3_RAW_HI_TEMP 0 #define HEATER_3_RAW_HI_TEMP 0
# define HEATER_3_RAW_LO_TEMP 16383 #define HEATER_3_RAW_LO_TEMP 16383
# else //In case of an thermocouple the highest temperature results in the highest ADC value #else //In case of an thermocouple the highest temperature results in the highest ADC value
# define HEATER_3_RAW_HI_TEMP 16383 #define HEATER_3_RAW_HI_TEMP 16383
# define HEATER_3_RAW_LO_TEMP 0 #define HEATER_3_RAW_LO_TEMP 0
# endif #endif
#endif #endif
#ifdef THERMISTORBED #if ENABLED(THERMISTORBED)
# define BEDTEMPTABLE TT_NAME(THERMISTORBED) #define BEDTEMPTABLE TT_NAME(THERMISTORBED)
# define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE) #define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE)
#else #else
# ifdef BED_USES_THERMISTOR #if ENABLED(BED_USES_THERMISTOR)
# error No bed thermistor table specified #error No bed thermistor table specified
# endif // BED_USES_THERMISTOR #endif // BED_USES_THERMISTOR
#endif #endif
//Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature //Set the high and low raw values for the heater,this indicates which raw value is a high or low temperature
#ifndef HEATER_BED_RAW_HI_TEMP #if DISABLED(HEATER_BED_RAW_HI_TEMP)
# ifdef BED_USES_THERMISTOR //In case of a thermistor the highest temperature results in the lowest ADC value #if ENABLED(BED_USES_THERMISTOR) //In case of a thermistor the highest temperature results in the lowest ADC value
# define HEATER_BED_RAW_HI_TEMP 0 #define HEATER_BED_RAW_HI_TEMP 0
# define HEATER_BED_RAW_LO_TEMP 16383 #define HEATER_BED_RAW_LO_TEMP 16383
# else //In case of an thermocouple the highest temperature results in the highest ADC value #else //In case of an thermocouple the highest temperature results in the highest ADC value
# define HEATER_BED_RAW_HI_TEMP 16383 #define HEATER_BED_RAW_HI_TEMP 16383
# define HEATER_BED_RAW_LO_TEMP 0 #define HEATER_BED_RAW_LO_TEMP 0
# endif #endif
#endif #endif
#endif //THERMISTORTABLES_H_ #endif //THERMISTORTABLES_H_
...@@ -118,17 +118,17 @@ static void lcd_status_screen(); ...@@ -118,17 +118,17 @@ static void lcd_status_screen();
#define ENCODER_FEEDRATE_DEADZONE 10 #define ENCODER_FEEDRATE_DEADZONE 10
#if DISABLED(LCD_I2C_VIKI) #if DISABLED(LCD_I2C_VIKI)
#ifndef ENCODER_STEPS_PER_MENU_ITEM #if DISABLED(ENCODER_STEPS_PER_MENU_ITEM)
#define ENCODER_STEPS_PER_MENU_ITEM 5 #define ENCODER_STEPS_PER_MENU_ITEM 5
#endif #endif
#ifndef ENCODER_PULSES_PER_STEP #if DISABLED(ENCODER_PULSES_PER_STEP)
#define ENCODER_PULSES_PER_STEP 1 #define ENCODER_PULSES_PER_STEP 1
#endif #endif
#else #else
#ifndef ENCODER_STEPS_PER_MENU_ITEM #if DISABLED(ENCODER_STEPS_PER_MENU_ITEM)
#define ENCODER_STEPS_PER_MENU_ITEM 2 // VIKI LCD rotary encoder uses a different number of steps per rotation #define ENCODER_STEPS_PER_MENU_ITEM 2 // VIKI LCD rotary encoder uses a different number of steps per rotation
#endif #endif
#ifndef ENCODER_PULSES_PER_STEP #if DISABLED(ENCODER_PULSES_PER_STEP)
#define ENCODER_PULSES_PER_STEP 1 #define ENCODER_PULSES_PER_STEP 1
#endif #endif
#endif #endif
...@@ -139,7 +139,7 @@ static void lcd_status_screen(); ...@@ -139,7 +139,7 @@ static void lcd_status_screen();
/** /**
* START_MENU generates the init code for a menu function * START_MENU generates the init code for a menu function
*/ */
#if defined(BTN_BACK) && BTN_BACK > 0 #if ENABLED(BTN_BACK) && BTN_BACK > 0
#define START_MENU(last_menu) do { \ #define START_MENU(last_menu) do { \
encoderRateMultiplierEnabled = false; \ encoderRateMultiplierEnabled = false; \
if (encoderPosition > 0x8000) encoderPosition = 0; \ if (encoderPosition > 0x8000) encoderPosition = 0; \
...@@ -308,7 +308,7 @@ static void lcd_status_screen() { ...@@ -308,7 +308,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(ROGRESS_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;
} }
...@@ -1560,23 +1560,23 @@ void lcd_quick_feedback() { ...@@ -1560,23 +1560,23 @@ void lcd_quick_feedback() {
next_button_update_ms = millis() + 500; next_button_update_ms = millis() + 500;
#if ENABLED(LCD_USE_I2C_BUZZER) #if ENABLED(LCD_USE_I2C_BUZZER)
#ifndef LCD_FEEDBACK_FREQUENCY_HZ #if DISABLED(LCD_FEEDBACK_FREQUENCY_HZ)
#define LCD_FEEDBACK_FREQUENCY_HZ 100 #define LCD_FEEDBACK_FREQUENCY_HZ 100
#endif #endif
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS #if DISABLED(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6) #define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6)
#endif #endif
lcd.buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); lcd.buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#elif PIN_EXISTS(BEEPER) #elif PIN_EXISTS(BEEPER)
#ifndef LCD_FEEDBACK_FREQUENCY_HZ #if DISABLED(LCD_FEEDBACK_FREQUENCY_HZ)
#define LCD_FEEDBACK_FREQUENCY_HZ 5000 #define LCD_FEEDBACK_FREQUENCY_HZ 5000
#endif #endif
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS #if DISABLED(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
#endif #endif
buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ); buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#else #else
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS #if DISABLED(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2 #define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
#endif #endif
delay(LCD_FEEDBACK_FREQUENCY_DURATION_MS); delay(LCD_FEEDBACK_FREQUENCY_DURATION_MS);
...@@ -1638,7 +1638,7 @@ void lcd_init() { ...@@ -1638,7 +1638,7 @@ void lcd_init() {
#if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register #if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register
pinMode (SR_DATA_PIN, OUTPUT); pinMode (SR_DATA_PIN, OUTPUT);
pinMode (SR_CLK_PIN, OUTPUT); pinMode (SR_CLK_PIN, OUTPUT);
#elif defined(SHIFT_CLK) #elif ENABLED(SHIFT_CLK)
pinMode(SHIFT_CLK,OUTPUT); pinMode(SHIFT_CLK,OUTPUT);
pinMode(SHIFT_LD,OUTPUT); pinMode(SHIFT_LD,OUTPUT);
pinMode(SHIFT_EN,OUTPUT); pinMode(SHIFT_EN,OUTPUT);
...@@ -1928,7 +1928,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; } ...@@ -1928,7 +1928,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
* These values are independent of which pins are used for EN_A and EN_B indications * These values are independent of which pins are used for EN_A and EN_B indications
* The rotary encoder part is also independent to the chipset used for the LCD * The rotary encoder part is also independent to the chipset used for the LCD
*/ */
#if defined(EN_A) && defined(EN_B) #if ENABLED(EN_A) && ENABLED(EN_B)
#define encrot0 0 #define encrot0 0
#define encrot1 2 #define encrot1 2
#define encrot2 3 #define encrot2 3
...@@ -1952,7 +1952,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; } ...@@ -1952,7 +1952,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#if BTN_ENC > 0 #if BTN_ENC > 0
millis_t ms = millis(); millis_t ms = millis();
if (ms > next_button_update_ms && READ(BTN_ENC) == 0) newbutton |= EN_C; if (ms > next_button_update_ms && READ(BTN_ENC) == 0) newbutton |= EN_C;
#if defined(BTN_BACK) && BTN_BACK > 0 #if ENABLED(BTN_BACK) && BTN_BACK > 0
if (ms > next_button_update_ms && READ(BTN_BACK) == 0) newbutton |= EN_D; if (ms > next_button_update_ms && READ(BTN_BACK) == 0) newbutton |= EN_D;
#endif #endif
#endif #endif
...@@ -2620,7 +2620,7 @@ static void coordtoLCD() { ...@@ -2620,7 +2620,7 @@ static void coordtoLCD() {
memset(buffer, 0, sizeof(buffer)); memset(buffer, 0, sizeof(buffer));
strcat(buffer, "X"); strcat(buffer, "X");
if (axis_known_position[X_AXIS]) { if (axis_known_position[X_AXIS]) {
#ifdef DELTA #if MECH(DELTA)
valuetemp = ftostr30(current_position[X_AXIS]); valuetemp = ftostr30(current_position[X_AXIS]);
#else #else
valuetemp = ftostr3(current_position[X_AXIS]); valuetemp = ftostr3(current_position[X_AXIS]);
...@@ -2632,7 +2632,7 @@ static void coordtoLCD() { ...@@ -2632,7 +2632,7 @@ static void coordtoLCD() {
strcat(buffer, " Y"); strcat(buffer, " Y");
if (axis_known_position[Y_AXIS]) { if (axis_known_position[Y_AXIS]) {
#ifdef DELTA #if MECH(DELTA)
valuetemp = ftostr30(current_position[Y_AXIS]); valuetemp = ftostr30(current_position[Y_AXIS]);
#else #else
valuetemp = ftostr3(current_position[Y_AXIS]); valuetemp = ftostr3(current_position[Y_AXIS]);
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
#define EN_A BIT(BLEN_A) #define EN_A BIT(BLEN_A)
#define LCD_CLICKED (buttons&EN_C) #define LCD_CLICKED (buttons&EN_C)
#if defined(BTN_BACK) && BTN_BACK > 0 #if ENABLED(BTN_BACK) && BTN_BACK > 0
#define EN_D BIT(BLEN_D) #define EN_D BIT(BLEN_D)
#define LCD_BACK_CLICKED (buttons&EN_D) #define LCD_BACK_CLICKED (buttons&EN_D)
#endif #endif
......
...@@ -6,7 +6,7 @@ ...@@ -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.
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#define EN_B BIT(BLEN_B) // The two encoder pins are connected through BTN_EN1 and BTN_EN2 #define EN_B BIT(BLEN_B) // The two encoder pins are connected through BTN_EN1 and BTN_EN2
#define EN_A BIT(BLEN_A) #define EN_A BIT(BLEN_A)
#if defined(BTN_ENC) && BTN_ENC > -1 #if ENABLED(BTN_ENC) && BTN_ENC > -1
// encoder click is directly connected // encoder click is directly connected
#define BLEN_C 2 #define BLEN_C 2
#define EN_C BIT(BLEN_C) #define EN_C BIT(BLEN_C)
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
#define B_DW (BUTTON_DOWN<<B_I2C_BTN_OFFSET) #define B_DW (BUTTON_DOWN<<B_I2C_BTN_OFFSET)
#define B_RI (BUTTON_RIGHT<<B_I2C_BTN_OFFSET) #define B_RI (BUTTON_RIGHT<<B_I2C_BTN_OFFSET)
#if defined(BTN_ENC) && BTN_ENC > -1 #if ENABLED(BTN_ENC) && BTN_ENC > -1
// the pause/stop/restart button is connected to BTN_ENC when used // the pause/stop/restart button is connected to BTN_ENC when used
#define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name #define B_ST (EN_C) // Map the pause/stop/resume button into its normalized functional name
#define LCD_CLICKED (buttons&(B_MI|B_RI|B_ST)) // pause/stop button also acts as click until we implement proper pause/stop. #define LCD_CLICKED (buttons&(B_MI|B_RI|B_ST)) // pause/stop button also acts as click until we implement proper pause/stop.
...@@ -380,7 +380,7 @@ static void lcd_implementation_init( ...@@ -380,7 +380,7 @@ static void lcd_implementation_init(
#if ENABLED(LCD_I2C_TYPE_PCF8575) #if ENABLED(LCD_I2C_TYPE_PCF8575)
lcd.begin(LCD_WIDTH, LCD_HEIGHT); lcd.begin(LCD_WIDTH, LCD_HEIGHT);
#ifdef LCD_I2C_PIN_BL #if ENABLED(LCD_I2C_PIN_BL)
lcd.setBacklightPin(LCD_I2C_PIN_BL, POSITIVE); lcd.setBacklightPin(LCD_I2C_PIN_BL, POSITIVE);
lcd.setBacklight(HIGH); lcd.setBacklight(HIGH);
#endif #endif
...@@ -554,7 +554,7 @@ static void lcd_implementation_status_screen() { ...@@ -554,7 +554,7 @@ static void lcd_implementation_status_screen() {
lcd.print('X'); lcd.print('X');
if (axis_known_position[X_AXIS]) if (axis_known_position[X_AXIS])
#ifdef DELTA #if MECH(DELTA)
lcd.print(ftostr30(current_position[X_AXIS])); lcd.print(ftostr30(current_position[X_AXIS]));
#else #else
lcd.print(ftostr3(current_position[X_AXIS])); lcd.print(ftostr3(current_position[X_AXIS]));
...@@ -562,7 +562,7 @@ static void lcd_implementation_status_screen() { ...@@ -562,7 +562,7 @@ static void lcd_implementation_status_screen() {
else else
lcd_printPGM(PSTR("---")); lcd_printPGM(PSTR("---"));
#ifdef DELTA #if MECH(DELTA)
lcd_printPGM(PSTR(" Y")); lcd_printPGM(PSTR(" Y"));
if (axis_known_position[Y_AXIS]) if (axis_known_position[Y_AXIS])
lcd.print(ftostr30(current_position[Y_AXIS])); lcd.print(ftostr30(current_position[Y_AXIS]));
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
} }
else if (seen_c2){ else if (seen_c2){
d &= 0x3f; d &= 0x3f;
#ifndef MAPPER_ONE_TO_ONE #if DISABLED(MAPPER_ONE_TO_ONE)
HARDWARE_CHAR_OUT( (char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x20 ) ); HARDWARE_CHAR_OUT( (char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x20 ) );
#else #else
HARDWARE_CHAR_OUT( (char) (0x80 + ( utf_hi_char << 6 ) + d) ) ; HARDWARE_CHAR_OUT( (char) (0x80 + ( utf_hi_char << 6 ) + d) ) ;
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
return 0; return 0;
} else if (seen_d5) { } else if (seen_d5) {
d &= 0x3fu; d &= 0x3fu;
#ifndef MAPPER_ONE_TO_ONE #if DISABLED(MAPPER_ONE_TO_ONE)
HARDWARE_CHAR_OUT( (char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x20 ) ); HARDWARE_CHAR_OUT( (char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x20 ) );
#else #else
HARDWARE_CHAR_OUT( (char) (0xa0u + ( utf_hi_char << 6 ) + d ) ) ; HARDWARE_CHAR_OUT( (char) (0xa0u + ( utf_hi_char << 6 ) + d ) ) ;
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
return 0; return 0;
} else if ((seen_e3 == true) && (seen_82_83 == true)){ } else if ((seen_e3 == true) && (seen_82_83 == true)){
d &= 0x3f; d &= 0x3f;
#ifndef MAPPER_ONE_TO_ONE #if DISABLED(MAPPER_ONE_TO_ONE)
HARDWARE_CHAR_OUT( (char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x20 ) ); HARDWARE_CHAR_OUT( (char) pgm_read_byte_near( utf_recode + d + ( utf_hi_char << 6 ) - 0x20 ) );
#else #else
HARDWARE_CHAR_OUT( (char) (0x80 + ( utf_hi_char << 6 ) + d ) ) ; HARDWARE_CHAR_OUT( (char) (0x80 + ( utf_hi_char << 6 ) + d ) ) ;
......
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