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

Update 4.2.X apha

Code clean
parent 55c929f1
#ifndef CONFIGURATION_MECHANISM
#define CONFIGURATION_MECHANISM
#define KNOWN_MECH 1
/*
* This configuration file contains mechanism settings for cartesian printer.
*
......@@ -22,8 +22,8 @@
* - Homing feedrate
* - Hotend offset
*
* Basic-settings can be found in configuration_basic.h
* Feature-settings can be found in configuration_feature.h
* Basic-settings can be found in Configuration_Basic.h
* Feature-settings can be found in Configuration_Feature.h
*/
/*****************************************************************************************
......
#ifndef CONFIGURATION_MECHANISM
#define CONFIGURATION_MECHANISM
#define KNOWN_MECH 1
/*
* This configuration file contains mechanism settings for cartesian printer.
......@@ -23,8 +24,8 @@
* - Homing feedrate
* - Hotend offset
*
* Basic-settings can be found in configuration_basic.h
* Feature-settings can be found in configuration_feature.h
* Basic-settings can be found in Configuration_Basic.h
* Feature-settings can be found in Configuration_Feature.h
*/
/*****************************************************************************************
......
#ifndef CONFIGURATION_MECHANISM
#define CONFIGURATION_MECHANISM
#define KNOWN_MECH 1
/*
* This configuration file contains mechanism settings for cartesian printer.
......@@ -22,8 +23,8 @@
* - Homing feedrate
* - Hotend offset
*
* Basic-settings can be found in configuration_basic.h
* Feature-settings can be found in configuration_feature.h
* Basic-settings can be found in Configuration_Basic.h
* Feature-settings can be found in Configuration_Feature.h
*/
/*****************************************************************************************
......
#ifndef CONFIGURATION_MECHANISM
#define CONFIGURATION_MECHANISM
#define KNOWN_MECH 1
/*
* This configuration file contains mechanism settings for cartesian printer.
......@@ -23,8 +24,8 @@
* - Homing feedrate
* - Hotend offset
*
* Basic-settings can be found in configuration_basic.h
* Feature-settings can be found in configuration_feature.h
* Basic-settings can be found in Configuration_Basic.h
* Feature-settings can be found in Configuration_Feature.h
*/
/*****************************************************************************************
......
......@@ -23,7 +23,7 @@
#include "Marlin.h"
#ifdef M100_FREE_MEMORY_WATCHER
#if ENABLED(M100_FREE_MEMORY_WATCHER)
extern void *__brkval;
extern size_t __heap_start, __heap_end, __flp;
......@@ -59,7 +59,7 @@
// probably caused by bad pointers. Any unexpected values will be flagged in
// 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') ) {
ptr = (unsigned char *) __brkval;
......@@ -151,7 +151,7 @@
// 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.
//
#ifdef M100_FREE_MEMORY_CORRUPTOR
#if ENABLED(M100_FREE_MEMORY_CORRUPTOR)
if ( code_seen('C') ) {
int x; // x gets the # of locations to corrupt within the memory pool
x = code_value();
......
......@@ -22,7 +22,7 @@
#include <avr/pgmspace.h>
#include <avr/interrupt.h>
#include "Configuration.h"
#include "Configuration_Basic.h"
#include "pins.h"
#ifndef SANITYCHECK_H
......@@ -225,7 +225,7 @@ extern float home_offset[3];
// Hotend offset
#if HOTENDS > 1
#ifndef DUAL_X_CARRIAGE
#if DISABLED(DUAL_X_CARRIAGE)
#define NUM_HOTEND_OFFSETS 2 // only in XY plane
#else
#define NUM_HOTEND_OFFSETS 3 // supports offsets in XYZ plane
......
......@@ -30,27 +30,27 @@
/* 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 */
#include "Configuration.h"
#include "Configuration_Basic.h"
#include "pins.h"
#ifdef ULTRA_LCD
#if defined(LCD_I2C_TYPE_PCF8575)
#if ENABLED(ULTRA_LCD)
#if ENABLED(LCD_I2C_TYPE_PCF8575)
#include <Wire.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 <LiquidTWI2.h>
#elif defined(DOGLCD)
#elif ENABLED(DOGLCD)
#include <U8glib.h> // library for graphics LCD by Oli Kraus (https://code.google.com/p/u8glib/)
#else
#include <LiquidCrystal.h> // library for character LCD
#endif
#endif
#if defined(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
#if ENABLED(DIGIPOTSS_PIN) && DIGIPOTSS_PIN > -1
#include <SPI.h>
#endif
#if defined(DIGIPOT_I2C)
#if ENABLED(DIGIPOT_I2C)
#include <Wire.h>
#endif
......@@ -310,7 +310,7 @@ unsigned long printer_usage_seconds;
// Hotend offset
#if HOTENDS > 1
#ifndef DUAL_X_CARRIAGE
#if DISABLED(DUAL_X_CARRIAGE)
#define NUM_HOTEND_OFFSETS 2 // only in XY plane
#else
#define NUM_HOTEND_OFFSETS 3 // supports offsets in XYZ plane
......@@ -772,12 +772,12 @@ void setup() {
setup_homepin();
#ifdef STAT_LED_RED
#if ENABLED(STAT_LED_RED)
pinMode(STAT_LED_RED, OUTPUT);
digitalWrite(STAT_LED_RED, LOW); // turn it off
#endif
#ifdef STAT_LED_BLUE
#if ENABLED(STAT_LED_BLUE)
pinMode(STAT_LED_BLUE, OUTPUT);
digitalWrite(STAT_LED_BLUE, LOW); // turn it off
#endif
......@@ -1215,7 +1215,7 @@ static void set_axis_is_at_home(AxisEnum axis) {
*/
inline void set_homing_bump_feedrate(AxisEnum axis) {
const int homing_bump_divisor[] = HOMING_BUMP_DIVISOR;
#ifdef DELTA
#if MECH(DELTA)
if (homing_bump_divisor[X_AXIS] >= 1)
feedrate = homing_feedrate[axis] / homing_bump_divisor[X_AXIS];
#else // No DELTA
......@@ -1580,7 +1580,7 @@ static void clean_up_after_endstop_move() {
print_xyz("> TRIGGER ENDSTOP > current_position", current_position);
}
#ifdef Z_DUAL_ENDSTOPS
#if ENABLED(Z_DUAL_ENDSTOPS)
if (axis == Z_AXIS) {
float adj = fabs(z_endstop_adj);
bool lockZ1;
......@@ -2569,7 +2569,7 @@ static void clean_up_after_endstop_move() {
sync_plan_position_delta();
#ifdef ENDSTOPS_ONLY_FOR_HOMING
#if ENABLED(ENDSTOPS_ONLY_FOR_HOMING)
enable_endstops(false);
#endif
......@@ -2673,7 +2673,7 @@ static void clean_up_after_endstop_move() {
}
#endif
#ifdef FWRETRACT
#if ENABLED(FWRETRACT)
void retract(bool retracting, bool swapping = false) {
if (retracting == retracted[active_extruder]) return;
......@@ -2726,7 +2726,7 @@ static void clean_up_after_endstop_move() {
#if ENABLED(Z_PROBE_SLED)
#ifndef SLED_DOCKING_OFFSET
#if DISABLED(SLED_DOCKING_OFFSET)
#define SLED_DOCKING_OFFSET 0
#endif
......@@ -2772,7 +2772,7 @@ inline void wait_heater() {
cancel_heatup = false;
#ifdef TEMP_RESIDENCY_TIME
#if ENABLED(TEMP_RESIDENCY_TIME)
long residency_start_ms = -1;
/* continue to loop until we have reached the target temp
_and_ until TEMP_RESIDENCY_TIME hasn't passed since we reached it */
......@@ -2786,7 +2786,7 @@ inline void wait_heater() {
if (millis() > temp_ms + 1000UL) { //Print temp & remaining time every 1s while waiting
ECHO_MV(MSG_T, degHotend(target_extruder), 1);
ECHO_MV(" E:", (int)target_extruder);
#ifdef TEMP_RESIDENCY_TIME
#if ENABLED(TEMP_RESIDENCY_TIME)
ECHO_M(" " MSG_W);
if (residency_start_ms > -1) {
temp_ms = ((TEMP_RESIDENCY_TIME * 1000UL) - (millis() - residency_start_ms)) / 1000UL;
......@@ -2803,7 +2803,7 @@ inline void wait_heater() {
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
// 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))) ||
......@@ -2882,7 +2882,7 @@ inline void gcode_G0_G1() {
if (IsRunning()) {
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')) {
float echange = destination[E_AXIS] - current_position[E_AXIS];
// Is this move an attempt to retract or recover?
......@@ -2906,14 +2906,14 @@ inline void gcode_G0_G1() {
inline void gcode_G2_G3(bool clockwise) {
if (IsRunning()) {
#ifdef SF_ARC_FIX
#if ENABLED(SF_ARC_FIX)
bool relative_mode_backup = relative_mode;
relative_mode = true;
#endif
gcode_get_destination();
#ifdef SF_ARC_FIX
#if ENABLED(SF_ARC_FIX)
relative_mode = relative_mode_backup;
#endif
......@@ -2948,7 +2948,7 @@ inline void gcode_G4() {
while (millis() < codenum) idle();
}
#ifdef FWRETRACT
#if ENABLED(FWRETRACT)
/**
* G10 - Retract filament according to settings of M207
......@@ -3019,7 +3019,7 @@ inline void gcode_G28() {
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]))) {
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);
......@@ -3087,13 +3087,13 @@ inline void gcode_G28() {
} // home_all_axis || homeZ
#ifdef QUICK_HOME
#if ENABLED(QUICK_HOME)
if (home_all_axis || (homeX && homeY)) { // First diagonal move
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);
extruder_duplication_enabled = false;
#else
......@@ -3140,14 +3140,14 @@ inline void gcode_G28() {
}
#endif // QUICK_HOME
#ifdef HOME_Y_BEFORE_X
#if ENABLED(HOME_Y_BEFORE_X)
// Home Y
if (home_all_axis || homeY) HOMEAXIS(Y);
#endif
// Home X
if (home_all_axis || homeX) {
#ifdef DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
int tmp_extruder = active_extruder;
extruder_duplication_enabled = false;
active_extruder = !active_extruder;
......@@ -3184,7 +3184,7 @@ inline void gcode_G28() {
#if DISABLED(Z_SAFE_HOMING)
if (code_seen('M') && !(homeX || homeY)) {
// Manual G28 bed level
#ifdef ULTIPANEL
#if ENABLED(ULTIPANEL)
ECHO_LM(DB, " --LEVEL PLATE SCRIPT--");
while(!lcd_clicked()) {
idle(true);
......@@ -3209,7 +3209,7 @@ inline void gcode_G28() {
#endif
sync_plan_position();
#ifdef ENDSTOPS_ONLY_FOR_HOMING
#if ENABLED(ENDSTOPS_ONLY_FOR_HOMING)
enable_endstops(false);
#endif
......@@ -4175,7 +4175,7 @@ inline void gcode_G92() {
}
}
#ifdef ULTIPANEL
#if ENABLED(ULTIPANEL)
/**
* M0: // M0 - Unconditional stop - Wait for user button press on LCD
......@@ -4199,7 +4199,7 @@ inline void gcode_G92() {
lcd_setstatus(args, true);
else {
LCD_MESSAGEPGM(MSG_USERWAIT);
#if defined(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
#if ENABLED(LCD_PROGRESS_BAR) && PROGRESS_MSG_EXPIRE > 0
dontExpireStatus();
#endif
}
......@@ -4223,7 +4223,7 @@ inline void gcode_G92() {
}
#endif //ULTIPANEL
#ifdef LASERBEAM
#if ENABLED(LASERBEAM)
/**
* M3: S - Setting laser beam
*/
......@@ -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
......@@ -4737,7 +4737,7 @@ inline void gcode_M42() {
OUT_WRITE(SUICIDE_PIN, HIGH);
#endif
#if defined(ULTIPANEL) || defined(NEXTION)
#if ENABLED(ULTIPANEL) || ENABLED(NEXTION)
powersupply = true;
LCD_MESSAGEPGM(WELCOME_MSG);
lcd_update();
......@@ -4763,7 +4763,7 @@ inline void gcode_M81() {
#elif HAS(POWER_SWITCH)
OUT_WRITE(PS_ON_PIN, PS_ON_ASLEEP);
#endif
#ifdef ULTIPANEL
#if ENABLED(ULTIPANEL)
#if HAS(POWER_SWITCH)
powersupply = false;
#endif
......@@ -4850,7 +4850,7 @@ inline void gcode_M104() {
if (code_seen('S')) {
float temp = code_value();
setTargetHotend(temp, target_extruder);
#ifdef DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
#endif
......@@ -4863,7 +4863,7 @@ inline void gcode_M104() {
inline void gcode_M105() {
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);
#if HAS(TEMP_0)
ECHO_MV(MSG_T, degHotend(target_extruder), 1);
......@@ -4883,20 +4883,20 @@ inline void gcode_M105() {
#endif
ECHO_M(" " MSG_AT);
#ifdef HOTEND_WATTS
#if ENABLED(HOTEND_WATTS)
ECHO_VM((HOTEND_WATTS * getHeaterPower(target_extruder))/127, "W");
#else
ECHO_V(getHeaterPower(target_extruder));
#endif
ECHO_M(" " MSG_BAT);
#ifdef BED_WATTS
#if ENABLED(BED_WATTS)
ECHO_VM((BED_WATTS * getHeaterPower(-1))/127, "W");
#else
ECHO_V(getHeaterPower(-1));
#endif
#ifdef SHOW_TEMP_ADC_VALUES
#if ENABLED(SHOW_TEMP_ADC_VALUES)
#if HAS(TEMP_BED)
ECHO_MV(" ADC B:", degBed(), 1);
ECHO_MV("C->", rawBedTemp()/OVERSAMPLENR, 0);
......@@ -4940,13 +4940,13 @@ inline void gcode_M109() {
if (no_wait_for_cooling || code_seen('R')) {
float temp = code_value();
setTargetHotend(temp, target_extruder);
#ifdef DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_DUPLICATION_MODE && target_extruder == 0)
setTargetHotend1(temp == 0.0 ? 0.0 : temp + duplicate_extruder_temp_offset);
#endif
}
#ifdef AUTOTEMP
#if ENABLED(AUTOTEMP)
autotemp_enabled = code_seen('F');
if (autotemp_enabled) autotemp_factor = code_value();
if (code_seen('S')) autotemp_min = code_value();
......@@ -4995,7 +4995,7 @@ inline void gcode_M114() {
ECHO_MV(" Y:", st_get_position_mm(Y_AXIS));
ECHO_EMV(" Z:", st_get_position_mm(Z_AXIS));
#ifdef SCARA
#if MECH(SCARA)
//MESSAGE for Host
ECHO_SMV(OK, " SCARA Theta:", delta[X_AXIS]);
ECHO_EMV(" Psi+Theta:", delta[Y_AXIS]);
......@@ -5018,7 +5018,7 @@ inline void gcode_M114() {
ECHO_MV(" Y:", st_get_position_mm(Y_AXIS));
ECHO_EMV(" Z:", st_get_position_mm(Z_AXIS));
#ifdef SCARA
#if MECH(SCARA)
//MESSAGE for User
ECHO_SMV(OK, " SCARA Theta:", delta[X_AXIS]);
ECHO_EMV(" Psi+Theta:", delta[Y_AXIS]);
......@@ -5039,7 +5039,7 @@ inline void gcode_M115() {
ECHO_M(MSG_M115_REPORT);
}
#if defined(ULTIPANEL) || defined(NEXTION)
#if ENABLED(ULTIPANEL) || ENABLED(NEXTION)
/**
* M117: Set LCD Status Message
......@@ -5098,7 +5098,7 @@ inline void gcode_M120() { enable_endstops(true); }
*/
inline void gcode_M121() { enable_endstops(false); }
#ifdef BARICUDA
#if ENABLED(BARICUDA)
#if HAS(HEATER_1)
/**
* M126: Heater 1 valve open
......@@ -5131,7 +5131,7 @@ inline void gcode_M140() {
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
......@@ -5202,7 +5202,7 @@ inline void gcode_M140() {
#endif
#ifdef BLINKM
#if ENABLED(BLINKM)
/**
* M150: Set Status LED Color - Use R-U-B for R-G-B
*/
......@@ -5366,13 +5366,13 @@ inline void gcode_M206() {
home_offset[i] = code_value();
}
}
#ifdef SCARA
#if MECH(SCARA)
if (code_seen('T')) home_offset[X_AXIS] = code_value(); // Theta
if (code_seen('P')) home_offset[Y_AXIS] = code_value(); // Psi
#endif
}
#ifdef FWRETRACT
#if ENABLED(FWRETRACT)
/**
* M207: Set firmware retraction values
......@@ -5440,7 +5440,7 @@ inline void gcode_M206() {
if (code_seen('X')) hotend_offset[X_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();
#endif
......@@ -5448,7 +5448,7 @@ inline void gcode_M206() {
for (int e = 0; e < HOTENDS; e++) {
ECHO_MV(" ", hotend_offset[X_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]);
#endif
}
......@@ -5554,7 +5554,7 @@ inline void gcode_M226() {
}
#endif // HAS(CHDK) || PHOTOGRAPH_PIN
#ifdef HAS(LCD_CONTRAST)
#if HAS(LCD_CONTRAST)
/**
* M250: Read and optionally set the LCD contrast
*/
......@@ -5639,7 +5639,7 @@ inline void gcode_M226() {
}
#endif // PIDTEMP
#ifdef PREVENT_DANGEROUS_EXTRUDE
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
void set_extrude_min_temp(float temp) { extrude_min_temp = temp; }
......@@ -5709,7 +5709,7 @@ inline void gcode_M226() {
}
#endif // HAS(MICROSTEPS)
#ifdef SCARA
#if MECH(SCARA)
bool SCARA_move_to_cal(uint8_t delta_x, uint8_t delta_y) {
//SoftEndsEnabled = false; // Ignore soft endstops during calibration
//ECHO_LM(DB, " Soft endstops disabled ");
......@@ -5779,7 +5779,7 @@ inline void gcode_M226() {
}
#endif // SCARA
#ifdef EXT_SOLENOID
#if ENABLED(EXT_SOLENOID)
void enable_solenoid(uint8_t num) {
switch(num) {
case 0:
......@@ -5856,7 +5856,7 @@ inline void gcode_M400() { st_synchronize(); }
#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>
......@@ -5934,7 +5934,7 @@ inline void gcode_M428() {
memcpy(new_offs, home_offset, sizeof(new_offs));
for (int8_t i = X_AXIS; i <= Z_AXIS; 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,
#else
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() {
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>)
......@@ -6011,7 +6011,7 @@ inline void gcode_M503() {
#endif // ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
#ifdef FILAMENTCHANGEENABLE
#if ENABLED(FILAMENTCHANGEENABLE)
/**
* M600: Pause for filament change
*
......@@ -6037,7 +6037,7 @@ inline void gcode_M503() {
for (int i = 0; i < NUM_AXIS; i++)
lastpos[i] = destination[i] = current_position[i];
#ifdef DELTA
#if MECH(DELTA)
#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);
#else
......@@ -6046,7 +6046,7 @@ inline void gcode_M503() {
//retract by E
if (code_seen('E')) destination[E_AXIS] += code_value();
#ifdef FILAMENTCHANGE_FIRSTRETRACT
#if ENABLED(FILAMENTCHANGE_FIRSTRETRACT)
else destination[E_AXIS] += FILAMENTCHANGE_FIRSTRETRACT;
#endif
......@@ -6054,7 +6054,7 @@ inline void gcode_M503() {
//lift Z
if (code_seen('Z')) destination[Z_AXIS] += code_value();
#ifdef FILAMENTCHANGE_ZADD
#if ENABLED(FILAMENTCHANGE_ZADD)
else destination[Z_AXIS] += FILAMENTCHANGE_ZADD;
#endif
......@@ -6062,19 +6062,19 @@ inline void gcode_M503() {
//move xy
if (code_seen('X')) destination[X_AXIS] = code_value();
#ifdef FILAMENTCHANGE_XPOS
#if ENABLED(FILAMENTCHANGE_XPOS)
else destination[X_AXIS] = FILAMENTCHANGE_XPOS;
#endif
if (code_seen('Y')) destination[Y_AXIS] = code_value();
#ifdef FILAMENTCHANGE_YPOS
#if ENABLED(FILAMENTCHANGE_YPOS)
else destination[Y_AXIS] = FILAMENTCHANGE_YPOS;
#endif
RUNPLAN
if (code_seen('L')) destination[E_AXIS] += code_value();
#ifdef FILAMENTCHANGE_FINALRETRACT
#if ENABLED(FILAMENTCHANGE_FINALRETRACT)
else destination[E_AXIS] += FILAMENTCHANGE_FINALRETRACT;
#endif
......@@ -6137,7 +6137,7 @@ inline void gcode_M503() {
//return to normal
if (code_seen('L')) destination[E_AXIS] -= code_value();
#ifdef FILAMENTCHANGE_FINALRETRACT
#if ENABLED(FILAMENTCHANGE_FINALRETRACT)
else destination[E_AXIS] -= FILAMENTCHANGE_FINALRETRACT;
#endif
......@@ -6148,7 +6148,7 @@ inline void gcode_M503() {
lcd_reset_alert_level();
#ifdef DELTA
#if MECH(DELTA)
// Move XYZ to starting position, then E
calculate_delta(lastpos);
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() {
}
#endif //FILAMENTCHANGEENABLE
#ifdef DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
/**
* M605: Set dual x-carriage movement mode
*
......@@ -6325,16 +6325,16 @@ inline void gcode_M907() {
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());
#endif
#ifdef MOTOR_CURRENT_PWM_XY_PIN
#if ENABLED(MOTOR_CURRENT_PWM_XY_PIN)
if (code_seen('X')) digipot_current(0, code_value());
#endif
#ifdef MOTOR_CURRENT_PWM_Z_PIN
#if ENABLED(MOTOR_CURRENT_PWM_Z_PIN)
if (code_seen('Z')) digipot_current(1, code_value());
#endif
#ifdef MOTOR_CURRENT_PWM_E_PIN
#if ENABLED(MOTOR_CURRENT_PWM_E_PIN)
if (code_seen('E')) digipot_current(2, code_value());
#endif
#ifdef DIGIPOT_I2C
#if ENABLED(DIGIPOT_I2C)
// 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 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) {
if (next_feedrate > 0.0) feedrate = next_feedrate;
}
#if EXTRUDERS > 1
#ifdef NPR2
#if ENABLED(NPR2)
if(target_extruder != old_color)
#else
if(target_extruder != active_extruder)
......@@ -6415,7 +6415,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
{
// Save current position to return to after applying extruder offset
set_destination_to_current();
#ifdef DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
if (dual_x_carriage_mode == DXC_AUTO_PARK_MODE && IsRunning() &&
(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
......@@ -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];
#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)
st_synchronize(); // Finish all movement
disable_e();
......@@ -6576,7 +6576,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
active_extruder = target_extruder;
ECHO_LMV(DB, MSG_ACTIVE_DRIVER, active_driver);
ECHO_LMV(DB, MSG_ACTIVE_EXTRUDER, active_extruder);
#elif defined(NPR2)
#elif ENABLED(NPR2)
st_synchronize(); // Finish all movement
if (old_color == 99)
{
......@@ -6607,7 +6607,7 @@ inline void gcode_T(uint8_t tmp_extruder) {
if (make_move && IsRunning()) prepare_move();
}
#ifdef EXT_SOLENOID
#if ENABLED(EXT_SOLENOID)
st_synchronize();
disable_all_solenoids();
enable_solenoid_on_active_extruder();
......@@ -6672,7 +6672,7 @@ void process_next_command() {
gcode_G0_G1(); break;
// G2, G3
#ifndef SCARA
#if !MECH(SCARA)
case 2: // G2 - CW ARC
case 3: // G3 - CCW ARC
gcode_G2_G3(codenum == 2); break;
......@@ -6682,7 +6682,7 @@ void process_next_command() {
case 4:
gcode_G4(); break;
#ifdef FWRETRACT
#if ENABLED(FWRETRACT)
case 10: // G10: retract
case 11: // G11: retract_recover
gcode_G10_G11(codenum == 10); break;
......@@ -6704,7 +6704,7 @@ void process_next_command() {
#endif // Z_PROBE_SLED
#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.
gcode_G29(); gcode_M114(); break;
case 30: // G30 Delta AutoCalibration
......@@ -6726,13 +6726,13 @@ void process_next_command() {
case 'M': case 'm': switch (codenum) {
#ifdef ULTIPANEL
#if ENABLED(ULTIPANEL)
case 0: // M0 - Unconditional stop - Wait for user button press on LCD
case 1: // M1 - Conditional stop - Wait for user button press on LCD
gcode_M0_M1(); break;
#endif //ULTIPANEL
#ifdef LASERBEAM
#if ENABLED(LASERBEAM)
case 3: // M03 S - Setting laser beam
gcode_M3(); break;
case 4: // M04 - Turn on laser beam
......@@ -6775,7 +6775,7 @@ void process_next_command() {
case 32: // M32 - Select file and start SD print
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
gcode_M33(); break;
#endif
......@@ -6832,7 +6832,7 @@ void process_next_command() {
case 109: // M109 Wait for temperature
gcode_M109(); break;
#ifdef M100_FREE_MEMORY_WATCHER
#if ENABLED(M100_FREE_MEMORY_WATCHER)
case 100:
gcode_M100(); break;
#endif
......@@ -6847,7 +6847,7 @@ void process_next_command() {
case 115: // M115 Report capabilities
gcode_M115(); break;
#if defined(ULTIPANEL) || defined (NEXTION)
#if ENABLED(ULTIPANEL) || ENABLED(NEXTION)
case 117: // M117 display message
gcode_M117(); break;
#endif
......@@ -6859,7 +6859,7 @@ void process_next_command() {
case 121: // M121 Disable endstops
gcode_M121(); break;
#ifdef BARICUDA
#if ENABLED(BARICUDA)
// PWM for HEATER_1_PIN
#if HAS(HEATER_1)
case 126: // M126 valve open
......@@ -6880,7 +6880,7 @@ void process_next_command() {
case 140: // M140 Set bed temp
gcode_M140(); break;
#ifdef BLINKM
#if ENABLED(BLINKM)
case 150: // M150
gcode_M150(); break;
#endif //BLINKM
......@@ -6908,7 +6908,7 @@ void process_next_command() {
case 206: // M206 additional homing offset
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]
gcode_M207(); break;
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() {
gcode_M240(); break;
#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)
gcode_M250(); break;
#endif // DOGLCD
......@@ -6954,7 +6954,7 @@ void process_next_command() {
gcode_M301(); break;
#endif // PIDTEMP
#ifdef PREVENT_DANGEROUS_EXTRUDE
#if ENABLED(PREVENT_DANGEROUS_EXTRUDE)
case 302: // allow cold extrudes, or set the minimum extrude temperature
gcode_M302(); break;
#endif // PREVENT_DANGEROUS_EXTRUDE
......@@ -6976,7 +6976,7 @@ void process_next_command() {
gcode_M351(); break;
#endif // HAS(MICROSTEPS)
#ifdef SCARA
#if MECH(SCARA)
case 360: // M360 SCARA Theta pos1
if (gcode_M360()) return; break;
case 361: // M361 SCARA Theta pos2
......@@ -7001,7 +7001,7 @@ void process_next_command() {
gcode_M402(); break;
#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
gcode_M404(); break;
case 405: //M405 Turn on filament sensor for control
......@@ -7027,17 +7027,17 @@ void process_next_command() {
case 503: // M503 print settings currently in memory
gcode_M503(); break;
#ifdef ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED
#if ENABLED(ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
case 540:
gcode_M540(); break;
#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]
gcode_M600(); break;
#endif
#ifdef DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
case 605:
gcode_M605(); break;
#endif
......@@ -7055,7 +7055,7 @@ void process_next_command() {
gcode_M908(); break;
#endif // HAS(DIGIPOTSS)
#ifdef NPR2
#if ENABLED(NPR2)
case 997: // M997 Cxx Move Carter xx gradi
gcode_M997(); break;
#endif // NPR2
......@@ -7093,7 +7093,7 @@ void ok_to_send() {
if (fromsd[cmd_queue_index_r]) return;
#endif
ECHO_S(OK);
#ifdef ADVANCED_OK
#if ENABLED(ADVANCED_OK)
ECHO_MV("N", gcode_LastN);
ECHO_MV(" P", (int(BLOCK_BUFFER_SIZE - movesplanned() - 1)));
ECHO_MV(" B", BUFSIZE - commands_in_queue);
......@@ -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
ECHO_LM(ER, MSG_ERR_COLD_EXTRUDE_STOP);
}
#ifdef PREVENT_LENGTHY_EXTRUDE
#if ENABLED(PREVENT_LENGTHY_EXTRUDE)
if (labs(de) > EXTRUDE_MAXLENGTH) {
curr_e = dest_e; // Behave as if the move really took place, but ignore E part
ECHO_LM(ER, MSG_ERR_LONG_EXTRUDE_STOP);
......@@ -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) 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;
int steps = max(1, int(delta_segments_per_second * seconds));
#else
......@@ -7180,7 +7180,7 @@ void clamp_to_software_endstops(float target[3]) {
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);
for (int8_t i = 0; i < NUM_AXIS; i++)
target[i] = current_position[i] + difference[i] * fraction;
......@@ -7453,7 +7453,7 @@ void plan_arc(
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);
#else
uint8_t speed = (lastMotor == 0 || ms >= lastMotor + (CONTROLLERFAN_SECS * 1000UL)) ? CONTROLLERFAN_MIN_SPEED : CONTROLLERFAN_SPEED;
......@@ -7549,7 +7549,7 @@ void plan_arc(
#endif // SCARA
#ifdef TEMP_STAT_LEDS
#if ENABLED(TEMP_STAT_LEDS)
static bool red_led = false;
static millis_t next_status_led_update_ms = 0;
......@@ -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
#endif
#ifdef EXTRUDER_RUNOUT_PREVENT
#if ENABLED(EXTRUDER_RUNOUT_PREVENT)
if (ms > previous_cmd_ms + EXTRUDER_RUNOUT_SECONDS * 1000)
if (degHotend(active_extruder) > EXTRUDER_RUNOUT_MINTEMP) {
bool oldstatus;
......@@ -7750,7 +7750,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
}
#endif
#ifdef DUAL_X_CARRIAGE
#if ENABLED(DUAL_X_CARRIAGE)
// handle delayed move timeout
if (delayed_move_time && ms > delayed_move_time + 1000 && IsRunning()) {
// travel moves have been received so enact them
......@@ -7763,7 +7763,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
#if ENABLED(IDLE_OOZING_PREVENT)
if (blocks_queued()) axis_last_activity = millis();
if (degHotend(active_extruder) > IDLE_OOZING_MINTEMP && !(debugLevel & DEBUG_DRYRUN) && IDLE_OOZING_enabled) {
#ifdef FILAMENTCHANGEENABLE
#if ENABLED(FILAMENTCHANGEENABLE)
if (!filament_changing)
#endif
{
......@@ -7789,11 +7789,11 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
}
#endif
#ifdef TEMP_STAT_LEDS
#if ENABLED(TEMP_STAT_LEDS)
handle_status_leds();
#endif
#ifdef TEMP_STAT_LEDS
#if ENABLED(TEMP_STAT_LEDS)
handle_status_leds();
#endif
......@@ -7801,7 +7801,7 @@ void manage_inactivity(bool ignore_stepper_queue/*=false*/) {
}
void kill(const char *lcd_msg) {
#ifdef ULTRA_LCD
#if ENABLED(ULTRA_LCD)
lcd_setalertstatuspgm(lcd_msg);
#endif
......@@ -7833,7 +7833,7 @@ void kill(const char *lcd_msg) {
}
#endif
#ifdef FAST_PWM_FAN
#if ENABLED(FAST_PWM_FAN)
void setPwmFrequency(uint8_t pin, int val) {
val &= 0x07;
......
......@@ -1806,7 +1806,7 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) {
}
//------------------------------------------------------------------------------
// 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
#endif // ALLOW_DEPRECATED_FUNCTIONS
......
......@@ -364,7 +364,7 @@ class SdBaseFile {
uint8_t width, bool printSlash);
//------------------------------------------------------------------------------
// Deprecated functions - suppress cpplint warnings with NOLINT comment
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
#if ALLOW_DEPRECATED_FUNCTIONS && DISABLED(DOXYGEN)
public:
/** \deprecated Use:
* bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
......
......@@ -193,7 +193,7 @@ class SdVolume {
}
//------------------------------------------------------------------------------
// Deprecated functions - suppress cpplint warnings with NOLINT comment
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
#if ALLOW_DEPRECATED_FUNCTIONS && DISABLED(DOXYGEN)
public:
/** \deprecated Use: bool SdVolume::init(Sd2Card* dev);
* \param[in] dev The SD card where the volume is located.
......
......@@ -48,7 +48,7 @@
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#endif
#ifdef SPARK_FULL_GRAPHICS
#if ENABLED(SPARK_FULL_GRAPHICS)
#define ENCODER_PULSES_PER_STEP 2
#define ENCODER_STEPS_PER_MENU_ITEM 1
......@@ -62,7 +62,7 @@
#define NEWPANEL
#endif
#ifdef RADDS_DISPLAY
#if ENABLED(RADDS_DISPLAY)
#define ENCODER_PULSES_PER_STEP 2
#define ENCODER_STEPS_PER_MENU_ITEM 1
......@@ -108,11 +108,11 @@
#define LCD_I2C_ADDRESS 0x20 // I2C Address of the port expander
#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
#endif
#ifndef ENCODER_STEPS_PER_MENU_ITEM
#if DISABLED(ENCODER_STEPS_PER_MENU_ITEM)
#define ENCODER_STEPS_PER_MENU_ITEM 1
#endif
......@@ -232,7 +232,7 @@
/**
* DRIVER_EXTRUDERS
*/
#if !defined(MKR4) && !defined(NPR2)
#if DISABLED(MKR4) && DISABLED(NPR2)
#define DRIVER_EXTRUDERS EXTRUDERS // This defines the number of Driver extruder
#endif
......@@ -369,7 +369,7 @@
/**
* 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
......@@ -427,7 +427,7 @@
* Power Signal Control Definitions
* By default use Normal definition
*/
#ifndef POWER_SUPPLY
#if DISABLED(POWER_SUPPLY)
#define POWER_SUPPLY 0
#endif
#if (POWER_SUPPLY == 1) // 1 = ATX
......@@ -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_FAN (PIN_EXISTS(FAN))
#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_1 (PIN_EXISTS(SERVO1))
#define HAS_SERVO_2 (PIN_EXISTS(SERVO2))
......@@ -630,8 +630,8 @@
/**
* 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_POWER_SENSOR (HAS_POWER_CONSUMPTION_SENSOR && defined(POWER_CONSUMPTION_LCD_DISPLAY))
#define HAS_LCD_FILAMENT_SENSOR (HAS_FILAMENT_SENSOR && ENABLED(FILAMENT_LCD_DISPLAY))
#define HAS_LCD_POWER_SENSOR (HAS_POWER_CONSUMPTION_SENSOR && ENABLED(POWER_CONSUMPTION_LCD_DISPLAY))
/**
* Helper Macros for heaters and extruder fan
......@@ -642,7 +642,7 @@
#define WRITE_HEATER(pin,value) WRITE(pin,value)
#endif
#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)
#if HOTENDS > 2
#define WRITE_HEATER_2(v) WRITE_HEATER(HEATER_2_PIN, v)
......@@ -657,14 +657,14 @@
#define WRITE_HEATER_0(v) WRITE_HEATER_0P(v)
#endif
#if HAS_HEATER_BED
#ifdef INVERTED_BED_PINS
#if ENABLED(INVERTED_BED_PINS)
#define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN,!v)
#else
#define WRITE_HEATER_BED(v) WRITE(HEATER_BED_PIN,v)
#endif
#endif
#if HAS_FAN
#ifdef INVERTED_HEATER_PINS
#if ENABLED(INVERTED_HEATER_PINS)
#define WRITE_FAN(v) WRITE(FAN_PIN, !v)
#else
#define WRITE_FAN(v) WRITE(FAN_PIN, v)
......@@ -674,7 +674,7 @@
/**
* Buzzer
*/
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || defined(LCD_USE_I2C_BUZZER))
#define HAS_BUZZER (PIN_EXISTS(BEEPER) || ENABLED(LCD_USE_I2C_BUZZER))
/**
* Servos
......
......@@ -2,7 +2,7 @@
#define CONFIGURATION_H
#include "macros.h"
#include "default_version.h"
#include "Default_Version.h"
/*
* This configuration file contains basic settings.
......@@ -15,8 +15,8 @@
* - Extruders number
* - UI Language
*
* 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
* 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
*/
/***********************************************************************
......@@ -241,19 +241,19 @@
********************** Do not touch this section **********************
***********************************************************************/
#if MECH(CARTESIAN)
#include "configuration_cartesian.h"
#include "Configuration_Cartesian.h"
#elif MECH(COREXY)
#include "configuration_core.h"
#include "Configuration_Core.h"
#elif MECH(COREXZ)
#include "configuration_core.h"
#include "Configuration_Core.h"
#elif MECH(DELTA)
#include "configuration_delta.h"
#include "Configuration_Delta.h"
#elif MECH(SCARA)
#include "configuration_scara.h"
#include "Configuration_Scara.h"
#endif
#include "configuration_feature.h"
#include "configuration_overall.h"
#include "Configuration_Feature.h"
#include "Configuration_Overall.h"
#include "thermistortables.h"
#include "conditionals.h"
......
#ifndef CONFIGURATION_FEATURE_H
#define CONFIGURATION_FEATURE_H
#ifndef Configuration_Feature_H
#define Configuration_Feature_H
/*
* This configuration file contains all features that can be enabled.
......@@ -68,8 +68,8 @@
* - Buffer stuff
* - Whatchdog
*
* 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)
* 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)
*
*/
......
......@@ -418,7 +418,7 @@ void Config_ResetDefault() {
float tmp8[] = DEFAULT_Kd;
#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 tmp10[] = HOTEND_OFFSET_Y;
#else
......@@ -569,14 +569,14 @@ void Config_ResetDefault() {
calculate_volumetric_multipliers();
#ifdef IDLE_OOZING_PREVENT
#if ENABLED(IDLE_OOZING_PREVENT)
IDLE_OOZING_enabled = true;
#endif
ECHO_LM(DB, "Hardcoded Default Settings Loaded");
}
#if !defined(DISABLE_M503)
#if DISABLED(DISABLE_M503)
/**
* Print Configuration Settings - M503
......
......@@ -33,7 +33,7 @@
#include "ultralcd.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)
#undef USE_BIG_EDIT_FONT
......@@ -106,7 +106,7 @@
#define LCD_WIDTH_EDIT 22
#endif
#ifndef TALL_FONT_CORRECTION
#if DISABLED(TALL_FONT_CORRECTION)
#define TALL_FONT_CORRECTION 0
#endif
......@@ -137,10 +137,10 @@
U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0
#endif
#ifndef LCD_PIXEL_WIDTH
#if DISABLED(LCD_PIXEL_WIDTH)
#define LCD_PIXEL_WIDTH 128
#endif
#ifndef LCD_PIXEL_HEIGHT
#if DISABLED(LCD_PIXEL_HEIGHT)
#define LCD_PIXEL_HEIGHT 64
#endif
......@@ -238,7 +238,7 @@ static void lcd_implementation_init() {
if (show_bootscreen) {
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
lcd_setFont(FONT_MENU);
#ifndef STRING_SPLASH_LINE2
#if DISABLED(STRING_SPLASH_LINE2)
u8g.drawStr(txt1X, u8g.getHeight() - DOG_CHAR_HEIGHT, STRING_SPLASH_LINE1);
#else
int txt2X = (u8g.getWidth() - (sizeof(STRING_SPLASH_LINE2) - 1)*DOG_CHAR_WIDTH) / 2;
......
......@@ -28,7 +28,7 @@ void FirmwareTest()
ECHO_EM(" ");
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) {
ECHO_M("MIN ENDSTOP X: ");
ECHO_EV(MSG_ENDSTOP_OPEN);
......@@ -70,7 +70,7 @@ void FirmwareTest()
ECHO_EV(MSG_FWTEST_ENDSTOP_ERR);
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) {
ECHO_M("MAX ENDSTOP X: ");
ECHO_EV(MSG_ENDSTOP_OPEN);
......@@ -126,7 +126,7 @@ void FirmwareTest()
ECHO_EM(" ");
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){
ECHO_M("MIN ENDSTOP Y: ");
ECHO_EV(MSG_ENDSTOP_OPEN);
......@@ -168,7 +168,7 @@ void FirmwareTest()
ECHO_EV(MSG_FWTEST_ENDSTOP_ERR);
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){
ECHO_M("MAX ENDSTOP Y: ");
ECHO_EV(MSG_ENDSTOP_OPEN);
......@@ -224,7 +224,7 @@ void FirmwareTest()
ECHO_EM(" ");
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){
ECHO_M("MIN ENDSTOP Z: ");
ECHO_EV(MSG_ENDSTOP_OPEN);
......@@ -266,7 +266,7 @@ void FirmwareTest()
ECHO_EV(MSG_FWTEST_ENDSTOP_ERR);
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){
ECHO_M("MAX ENDSTOP Z: ");
ECHO_EV(MSG_ENDSTOP_OPEN);
......
#ifndef LANGUAGE_H
#define LANGUAGE_H
#include "Configuration.h"
#include "Configuration_Basic.h"
// 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
// See also documentation/LCDLanguageFont.md
......@@ -25,7 +25,7 @@
// 13 Basque-Euskera
// 14 Portuguese (Brazil)
#ifndef LANGUAGE_CHOICE
#if DISABLED(LANGUAGE_CHOICE)
#define LANGUAGE_CHOICE 7 // Pick your language from the list above
#endif
......@@ -49,24 +49,24 @@
#elif MB(SAV_MKI)
#define MACHINE_NAME "SAV MkI"
#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"
#endif
#ifdef CUSTOM_MACHINE_NAME
#if ENABLED(CUSTOM_MACHINE_NAME)
#undef MACHINE_NAME
#define MACHINE_NAME CUSTOM_MACHINE_NAME
#endif
#ifndef SOURCE_CODE_URL
#if DISABLED(SOURCE_CODE_URL)
#define SOURCE_CODE_URL "https://github.com/MagoKimbra/MarlinKimbra"
#endif
#ifndef BUILD_VERSION
#if DISABLED(BUILD_VERSION)
#define BUILD_VERSION "V4; MarlinKimbra for 4 extruder"
#endif
#ifndef MACHINE_UUID
#if DISABLED(MACHINE_UUID)
#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
#endif
......@@ -235,7 +235,7 @@
#define MSG_BED_LEVELLING_Z " Z: "
// 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
#endif
......
......@@ -158,7 +158,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -167,7 +167,7 @@
#endif // DELTA
// Scara
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -189,7 +189,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test
#ifdef FIRMWARE_TEST
#if ENABLED(FIRMWARE_TEST)
#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_YES_NO "Put the Y or N command to go next"
......
......@@ -158,7 +158,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -167,7 +167,7 @@
#endif // DELTA
// Scara
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -189,7 +189,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test
#ifdef FIRMWARE_TEST
#if ENABLED(FIRMWARE_TEST)
#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_YES_NO "Put the Y or N command to go next"
......
......@@ -159,7 +159,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -168,7 +168,7 @@
#endif // DELTA
// Scara
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -190,7 +190,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test
#ifdef FIRMWARE_TEST
#if ENABLED(FIRMWARE_TEST)
#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_YES_NO "Put the Y or N command to go next"
......
......@@ -8,12 +8,12 @@
#ifndef 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
#endif
//#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.
#endif
......@@ -168,7 +168,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -177,7 +177,7 @@
#endif // DELTA
// Scara
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -199,7 +199,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test
#ifdef FIRMWARE_TEST
#if ENABLED(FIRMWARE_TEST)
#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_YES_NO "Put the Y or N command to go next"
......
......@@ -158,7 +158,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG DRYRUN ENABLED"
// Calibrate Delta
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -167,7 +167,7 @@
#endif // DELTA
// Scara
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -189,7 +189,7 @@
#define MSG_INVALID_POS_SLOT "Invalid slot, total slots: "
// Firmware Test
#ifdef FIRMWARE_TEST
#if ENABLED(FIRMWARE_TEST)
#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_YES_NO "Put the Y or N command to go next"
......
......@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_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_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
......@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Kalibrointi"
#define MSG_DELTA_CALIBRATE_X "Kalibroi X"
#define MSG_DELTA_CALIBRATE_Y "Kalibroi Y"
......@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Kalibroi Center"
#endif // DELTA
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_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_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
......@@ -146,7 +146,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -154,7 +154,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -167,7 +167,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_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_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
......@@ -163,7 +163,7 @@
#define MSG_DEBUG_DRYRUN "DEBUG STAMPA A VUOTO"
// Calibrate Delta
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Calibraz. Delta"
#define MSG_DELTA_CALIBRATE_X "Calibra X"
#define MSG_DELTA_CALIBRATE_Y "Calibra Y"
......@@ -172,7 +172,7 @@
#endif // DELTA
// Scara
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -194,7 +194,7 @@
#define MSG_INVALID_POS_SLOT "Slot invalido, slot totali: "
// Firmware Test
#ifdef FIRMWARE_TEST
#if ENABLED(FIRMWARE_TEST)
#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_YES_NO "Dai il comando Y o N per andare avanti"
......
......@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_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_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
......@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_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_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
......@@ -8,12 +8,12 @@
#ifndef 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
#endif
//#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.
#endif
......@@ -152,7 +152,7 @@
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -160,7 +160,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -172,7 +172,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_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_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
......@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_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_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
......@@ -143,7 +143,7 @@
#define MSG_ERR_MINTEMP "Err: MINTEMP"
#define MSG_ERR_MAXTEMP_BED "Err: MAXTEMP BED"
#ifdef DELTA
#if MECH(DELTA)
#define MSG_DELTA_CALIBRATE "Delta Calibration"
#define MSG_DELTA_CALIBRATE_X "Calibrate X"
#define MSG_DELTA_CALIBRATE_Y "Calibrate Y"
......@@ -151,7 +151,7 @@
#define MSG_DELTA_CALIBRATE_CENTER "Calibrate Center"
#endif // DELTA
#ifdef SCARA
#if MECH(SCARA)
#define MSG_XSCALE "X Scale"
#define MSG_YSCALE "Y Scale"
#endif
......@@ -164,7 +164,7 @@
#define MSG_PURGE_XMM "Purge " STRINGIFY(LCD_PURGE_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_NO "Put the N command to go next"
#define MSG_FWTEST_YES_NO "Put the Y or N command to go next"
......
......@@ -188,7 +188,7 @@
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif
#ifndef GEN7_VERSION
#if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 12 // v1.x
#endif
......@@ -263,7 +263,7 @@
#error Oops! Make sure you have 'Gen7' selected from the 'Tools -> Boards' menu.
#endif
#ifndef GEN7_VERSION
#if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 13 // v1.x
#endif
......@@ -504,7 +504,7 @@
#error Oops! Make sure you have 'Sethi 3D' selected from the 'Tools -> Boards' menu.
#endif
#ifndef GEN7_VERSION
#if DISABLED(GEN7_VERSION)
#define GEN7_VERSION 12 // v1.x
#endif
......@@ -640,7 +640,7 @@
// Data from: http://www.doc-diy.net/photo/rc-1_hacked/
#define PHOTOGRAPH_PIN 29
#ifdef RA_CONTROL_PANEL
#if ENABLED(RA_CONTROL_PANEL)
#define SDSS 53
#define SD_DETECT_PIN 28
......@@ -653,7 +653,7 @@
#define BLEN_A 0
#endif //RA_CONTROL_PANEL
#ifdef RA_DISCO
#if ENABLED(RA_DISCO)
//variables for which pins the TLC5947 is using
#define TLC_CLOCK_PIN 25
#define TLC_BLANK_PIN 23
......@@ -805,7 +805,7 @@
#define PS_ON_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_BED_PIN -1 // RAMPS 1.0
#define ORIG_FAN_PIN 11 // RAMPS 1.0
......@@ -823,13 +823,13 @@
#define ORIG_TEMP_BED_PIN 1 // MUST USE ANALOG INPUT NUMBERING NOT DIGITAL OUTPUT NUMBERING!!!!!!!!!
// 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
#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
#endif
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -916,7 +916,7 @@
#define ORIG_HEATER_BED_PIN 8 // BED
#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
#else
#define KILL_PIN -1
......@@ -935,9 +935,9 @@
#endif
#endif
#ifdef ULTRA_LCD
#ifdef NEWPANEL
#ifdef PANEL_ONE
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
......@@ -953,7 +953,7 @@
#define LCD_PINS_D7 29
#endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
......@@ -961,20 +961,20 @@
#define BTN_ENC 35
#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_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#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_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#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_EN2 37
#define BTN_ENC 31
......@@ -990,14 +990,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // 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_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
......@@ -1007,7 +1007,7 @@
#define BTN_ENC 31 //the click
#endif
#ifdef G3D_PANEL
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
......@@ -1036,7 +1036,7 @@
#endif //ULTRA_LCD
// SPI for Max6675 Thermocouple
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -1138,9 +1138,9 @@
#endif
#endif
#ifdef ULTRA_LCD
#ifdef NEWPANEL
#ifdef PANEL_ONE
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
......@@ -1156,7 +1156,7 @@
#define LCD_PINS_D7 29
#endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
......@@ -1164,20 +1164,20 @@
#define BTN_ENC 35
#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_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#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_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#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_EN2 37
#define BTN_ENC 31
......@@ -1193,14 +1193,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // 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_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
......@@ -1210,7 +1210,7 @@
#define BTN_ENC 31 //the click
#endif
#ifdef G3D_PANEL
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
......@@ -1239,7 +1239,7 @@
#endif //ULTRA_LCD
// SPI for Max6675 Thermocouple
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -1341,9 +1341,9 @@
#endif
#endif
#ifdef ULTRA_LCD
#ifdef NEWPANEL
#ifdef PANEL_ONE
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
......@@ -1359,7 +1359,7 @@
#define LCD_PINS_D7 29
#endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
......@@ -1367,20 +1367,20 @@
#define BTN_ENC 35
#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_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#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_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#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_EN2 37
#define BTN_ENC 31
......@@ -1396,14 +1396,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // 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_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
......@@ -1413,7 +1413,7 @@
#define BTN_ENC 31 //the click
#endif
#ifdef G3D_PANEL
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
......@@ -1442,7 +1442,7 @@
#endif //ULTRA_LCD
// SPI for Max6675 Thermocouple
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -1544,9 +1544,9 @@
#endif
#endif
#ifdef ULTRA_LCD
#ifdef NEWPANEL
#ifdef PANEL_ONE
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
......@@ -1562,7 +1562,7 @@
#define LCD_PINS_D7 29
#endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
......@@ -1570,20 +1570,20 @@
#define BTN_ENC 35
#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_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#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_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#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_EN2 37
#define BTN_ENC 31
......@@ -1599,14 +1599,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // 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_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
......@@ -1616,7 +1616,7 @@
#define BTN_ENC 31 //the click
#endif
#ifdef G3D_PANEL
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
......@@ -1645,7 +1645,7 @@
#endif //ULTRA_LCD
// SPI for Max6675 Thermocouple
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -1747,9 +1747,9 @@
#endif
#endif
#ifdef ULTRA_LCD
#ifdef NEWPANEL
#ifdef PANEL_ONE
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
#if ENABLED(PANEL_ONE)
#define LCD_PINS_RS 40
#define LCD_PINS_ENABLE 42
#define LCD_PINS_D4 65
......@@ -1765,7 +1765,7 @@
#define LCD_PINS_D7 29
#endif //PANEL_ONE
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
......@@ -1773,20 +1773,20 @@
#define BTN_ENC 35
#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_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#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_EN2 7
#define BTN_ENC -1
#define LCD_SDSS 53
#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_EN2 37
#define BTN_ENC 31
......@@ -1802,14 +1802,14 @@
#define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
#define SHIFT_OUT 40 // shift register
#define SHIFT_CLK 44 // 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_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
......@@ -1819,7 +1819,7 @@
#define BTN_ENC 31 //the click
#endif
#ifdef G3D_PANEL
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
......@@ -1848,7 +1848,7 @@
#endif //ULTRA_LCD
// SPI for Max6675 Thermocouple
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -1910,7 +1910,7 @@
#define ORIG_HEATER_1_PIN 7
#define ORIG_TEMP_1_PIN 1
#ifdef BARICUDA
#if ENABLED(BARICUDA)
#define ORIG_HEATER_2_PIN 6
#else
#define ORIG_HEATER_2_PIN -1
......@@ -1940,9 +1940,9 @@
#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.
#ifdef ULTRA_LCD
#if ENABLED(ULTRA_LCD)
#define KILL_PIN 80
#ifdef NEWPANEL
#if ENABLED(NEWPANEL)
//arduino pin which triggers an piezzo beeper
#define BEEPER_PIN 79 // Beeper on AUX-4
#define LCD_PINS_RS 70
......@@ -2122,7 +2122,7 @@
#ifdef NUM_SERVOS
#if ENABLED(NUM_SERVOS)
#define SERVO0_PIN 5
#if NUM_SERVOS > 1
......@@ -2139,9 +2139,9 @@
#endif
#ifdef ULTRA_LCD
#if ENABLED(ULTRA_LCD)
// RADDS LCD panel
#ifdef NEWPANEL
#if ENABLED(NEWPANEL)
#define LCD_PINS_RS 42
#define LCD_PINS_ENABLE 43
#define LCD_PINS_D4 44
......@@ -2149,7 +2149,7 @@
#define LCD_PINS_D6 46
#define LCD_PINS_D7 47
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 41
#define BTN_EN1 52
#define BTN_EN2 50
......@@ -2162,7 +2162,7 @@
// 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
// #define MAX_SCK_PIN 52
// #define MAX_MISO_PIN 50
......@@ -2264,7 +2264,7 @@
#ifdef NUM_SERVOS
#if ENABLED(NUM_SERVOS)
#define SERVO0_PIN 11
#if NUM_SERVOS > 1
......@@ -2280,8 +2280,8 @@
#endif
#endif
#ifdef ULTRA_LCD
#ifdef NEWPANEL
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
// ramps-fd lcd adaptor
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
......@@ -2290,7 +2290,7 @@
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 33
......@@ -2304,7 +2304,7 @@
// SPI for Max6675 Thermocouple
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define MAX_SCK_PIN 52
#define MAX_MISO_PIN 50
......@@ -2560,7 +2560,7 @@
/** Display **/
// 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_ENABLE 15
......@@ -2578,7 +2578,7 @@
#endif //REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#ifdef NUM_SERVOS
#if ENABLED(NUM_SERVOS)
#define SERVO0_PIN 36
#if NUM_SERVOS > 1
......@@ -2692,7 +2692,7 @@
#define ORIG_HEATER_1_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_X_ENABLE_PIN 14
......@@ -2700,7 +2700,7 @@
#define ORIG_Z_ENABLE_PIN 26
#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
#endif
......@@ -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. */
//#define SDSS 24
#ifdef ULTRA_LCD
#ifdef NEWPANEL
#if ENABLED(ULTRA_LCD)
#if ENABLED(NEWPANEL)
//we have no buzzer installed
#define BEEPER_PIN -1
//LCD Pins
#ifdef DOGLCD
#ifdef U8GLIB_ST7920 //SPI GLCD 12864 ST7920 ( like [www.digole.com] ) For Melzi V2.0
#if ENABLED(DOGLCD)
#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_ENABLE 29 //SID (MOSI)
#define LCD_PINS_D4 17 //SCK (CLK) clock
......@@ -2757,8 +2757,8 @@
//The encoder and click button
#define BTN_EN1 11
#define BTN_EN2 10
#ifdef LCD_I2C_PANELOLU2
#ifdef MELZI
#if ENABLED(LCD_I2C_PANELOLU2)
#if ENABLED(MELZI)
#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
#else
......@@ -2774,7 +2774,7 @@
#endif //Newpanel
#endif //ULTRA_LCD
#ifdef MAKRPANEL
#if ENABLED(MAKRPANEL)
#define BEEPER_PIN 29
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 30
......@@ -2855,7 +2855,7 @@
#define ORIG_FAN_PIN 9
#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
#else
#define KILL_PIN -1
......@@ -2890,14 +2890,14 @@
#define SERVO3_PIN 4
#endif
#ifdef TEMP_STAT_LEDS
#if ENABLED(TEMP_STAT_LEDS)
#define STAT_LED_RED 6
#define STAT_LED_BLUE 11
#endif
#ifdef ULTRA_LCD
#if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL
#if ENABLED(NEWPANEL)
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
......@@ -2905,7 +2905,7 @@
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
......@@ -2913,14 +2913,14 @@
#define BTN_ENC 35
#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_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#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_EN2 7
#define BTN_ENC -1
......@@ -2931,7 +2931,7 @@
#define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
......@@ -2944,7 +2944,7 @@
#define BTN_ENC 31 //the click
#endif
#ifdef G3D_PANEL
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
......@@ -2975,7 +2975,7 @@
// SPI for Max6675 Thermocouple
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -3057,7 +3057,7 @@
#define CONTROLLERFAN_PIN 4
#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
#else
#define KILL_PIN -1
......@@ -3080,7 +3080,7 @@
#define ORIG_TEMP_BED_PIN 14 // ANALOG NUMBERING
#ifdef NUM_SERVOS
#if ENABLED(NUM_SERVOS)
#define SERVO0_PIN 47
#if NUM_SERVOS > 1
#define SERVO1_PIN -1
......@@ -3093,14 +3093,14 @@
#endif
#endif
#ifdef TEMP_STAT_LEDS
#if ENABLED(TEMP_STAT_LEDS)
#define STAT_LED_RED 32
#define STAT_LED_BLUE 35
#endif
#ifdef ULTRA_LCD
#if ENABLED(ULTRA_LCD)
#ifdef NEWPANEL
#if ENABLED(NEWPANEL)
#define LCD_PINS_RS 16
#define LCD_PINS_ENABLE 17
#define LCD_PINS_D4 23
......@@ -3108,7 +3108,7 @@
#define LCD_PINS_D6 27
#define LCD_PINS_D7 29
#ifdef REPRAP_DISCOUNT_SMART_CONTROLLER
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
......@@ -3116,14 +3116,14 @@
#define BTN_ENC 35
#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_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#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_EN2 7
#define BTN_ENC -1
......@@ -3134,7 +3134,7 @@
#define BEEPER_PIN 33 // Beeper on AUX-4
//buttons are directly attached using AUX-2
#ifdef REPRAPWORLD_KEYPAD
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64 // encoder
#define BTN_EN2 59 // encoder
#define BTN_ENC 63 // enter button
......@@ -3147,7 +3147,7 @@
#define BTN_ENC 31 //the click
#endif
#ifdef G3D_PANEL
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#else
#define SD_DETECT_PIN -1 // Ramps does not use this port
......@@ -3176,7 +3176,7 @@
#endif //ULTRA_LCD
#if defined(VIKI2) || defined(miniVIKI)
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
#define BEEPER_PIN 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
......@@ -3194,7 +3194,7 @@
#define KILL_PIN 31
#endif
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -3271,9 +3271,9 @@
#define KILL_PIN -1
#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
#define BEEPER_PIN 18
......@@ -3385,9 +3385,9 @@
#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
#define LCD_PINS_RS 16
......@@ -3973,7 +3973,7 @@
#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
#else
#define KILL_PIN -1
......@@ -4010,7 +4010,7 @@
#define BEEPER_PIN 33
#if defined(ULTRA_LCD) && defined(NEWPANEL)
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
#define BEEPER_PIN -1
#define LCD_PINS_RS 27
......@@ -4027,7 +4027,7 @@
#endif // ULTRA_LCD && NEWPANEL
// SPI for Max6675 Thermocouple
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -4099,7 +4099,7 @@
#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
#else
#define KILL_PIN -1
......@@ -4136,7 +4136,7 @@
#define BEEPER_PIN 33
#if defined(ULTRA_LCD) && defined(NEWPANEL)
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
#define BEEPER_PIN -1
#define LCD_PINS_RS 27
......@@ -4153,7 +4153,7 @@
#endif // ULTRA_LCD && NEWPANEL
// SPI for Max6675 Thermocouple
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 52
#define MISO_PIN 50
......@@ -4238,7 +4238,7 @@
#define KILL_PIN -1
#define ALARM_PIN -1
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 9
#define MISO_PIN 11
......@@ -4437,7 +4437,7 @@
#define KILL_PIN -1
#define ALARM_PIN -1
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 9
#define MISO_PIN 11
......@@ -4509,7 +4509,7 @@
#define SD_DETECT_PIN -1
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 9
#define MISO_PIN 11
......@@ -4524,7 +4524,7 @@
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
#ifdef SAV_3DLCD
#if ENABLED(SAV_3DLCD)
// For LCD SHIFT register LCD
#define SR_DATA_PIN 1
#define SR_CLK_PIN 0
......@@ -4536,7 +4536,7 @@
#define KILL_PIN 42 // A2 = 42 - teensy = 40
#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)
#endif
......@@ -4649,14 +4649,14 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define KILL_PIN -1
#define ALARM_PIN -1
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 21 // 9
#define MISO_PIN 23 // 11
#define MOSI_PIN 22 // 10
#endif
#ifdef ULTIPANEL
#if ENABLED(ULTIPANEL)
#define LCD_PINS_RS 8
#define LCD_PINS_ENABLE 9
#define LCD_PINS_D4 10
......@@ -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
#define SDSS 20
#ifndef SDSUPPORT
#if DISABLED(SDSUPPORT)
// these pins are defined in the SD library if building with SD support
#define SCK_PIN 9
#define MISO_PIN 11
......@@ -5123,7 +5123,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
********************************* END MOTHERBOARD ***************************************
/****************************************************************************************/
#ifndef KNOWN_BOARD
#if DISABLED(KNOWN_BOARD)
#error Unknown MOTHERBOARD value in configuration.h
#endif
......@@ -5146,7 +5146,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define ORIG_TEMP_3_PIN -1
#endif
#ifdef X_STOP_PIN
#if ENABLED(X_STOP_PIN)
#if X_HOME_DIR < 0
#define X_MIN_PIN X_STOP_PIN
#define X_MAX_PIN -1
......@@ -5156,7 +5156,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#endif
#endif
#ifdef Y_STOP_PIN
#if ENABLED(Y_STOP_PIN)
#if Y_HOME_DIR < 0
#define Y_MIN_PIN Y_STOP_PIN
#define Y_MAX_PIN -1
......@@ -5166,7 +5166,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#endif
#endif
#ifdef Z_STOP_PIN
#if ENABLED(Z_STOP_PIN)
#if Z_HOME_DIR < 0
#define Z_MIN_PIN Z_STOP_PIN
#define Z_MAX_PIN -1
......@@ -5194,35 +5194,35 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define Z_MAX_PIN -1
#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
#endif
#ifdef DISABLE_XMAX_ENDSTOP
#if ENABLED(DISABLE_XMAX_ENDSTOP)
#undef X_MAX_PIN
#define X_MAX_PIN -1
#endif
#ifdef DISABLE_XMIN_ENDSTOP
#if ENABLED(DISABLE_XMIN_ENDSTOP)
#undef X_MIN_PIN
#define X_MIN_PIN -1
#endif
#ifdef DISABLE_YMAX_ENDSTOP
#if ENABLED(DISABLE_YMAX_ENDSTOP)
#define Y_MAX_PIN -1
#endif
#ifdef DISABLE_YMIN_ENDSTOP
#if ENABLED(DISABLE_YMIN_ENDSTOP)
#undef Y_MIN_PIN
#define Y_MIN_PIN -1
#endif
#ifdef DISABLE_ZMAX_ENDSTOP
#if ENABLED(DISABLE_ZMAX_ENDSTOP)
#undef Z_MAX_PIN
#define Z_MAX_PIN -1
#endif
#ifdef DISABLE_ZMIN_ENDSTOP
#if ENABLED(DISABLE_ZMIN_ENDSTOP)
#undef Z_MIN_PIN
#define Z_MIN_PIN -1
#endif
......@@ -5263,7 +5263,7 @@ DaveX plan for Teensylu/printrboard-type pinouts (ref teensylu & sprinter) for a
#define ORIG_TEMP_3_PIN -1
#endif
#ifdef MKR4
#if ENABLED(MKR4)
#if (EXTRUDERS == 2) && (DRIVER_EXTRUDERS == 1) // Use this for one driver and two extruder
#define E0E1_CHOICE_PIN 5
#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
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
#define MAX_FREQ_TIME (1000000.0/XY_FREQUENCY_LIMIT)
// Old direction bits. Used for speed calculations
......@@ -429,7 +429,7 @@ void check_axes_activity() {
}
#if HAS(FAN)
#ifdef FAN_KICKSTART_TIME
#if ENABLED(FAN_KICKSTART_TIME)
static millis_t fan_kick_end;
if (tail_fan_speed) {
millis_t ms = millis();
......@@ -803,7 +803,7 @@ float junction_deviation = 0.1;
if (segment_time < minsegmenttime) {
// 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));
#ifdef XY_FREQUENCY_LIMIT
#if ENABLED(XY_FREQUENCY_LIMIT)
segment_time = lround(1000000.0 / inverse_second);
#endif
}
......@@ -850,7 +850,7 @@ float junction_deviation = 0.1;
}
// Max segement time in us.
#ifdef XY_FREQUENCY_LIMIT
#if ENABLED(XY_FREQUENCY_LIMIT)
#define MAX_FREQ_TIME (1000000.0 / XY_FREQUENCY_LIMIT)
// Check and limit the xy direction change frequency
......
......@@ -95,7 +95,7 @@
#if NUM_SERVOS > 4
#error The maximum number of SERVOS in Marlin is 4.
#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 >= NUM_SERVOS
#error X_ENDSTOP_SERVO_NR must be smaller than NUM_SERVOS.
......@@ -143,23 +143,24 @@
* Require a Z Probe Pin if Z_PROBE_ENDSTOP is enabled.
*/
#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.
#erro sistema pins2tool.h
#endif
#if Z_PROBE_PIN == -1
#error You must set Z_PROBE_PIN to a valid pin if you enable Z_PROBE_ENDSTOP.
#endif
// 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.
// #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.
// #endif
// #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.
// #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.
// #endif
#endif
......@@ -208,7 +209,7 @@
/**
* 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.
#endif
......@@ -216,7 +217,7 @@
* Delta & 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
#endif
#if Z_PROBE_PIN == -1
......@@ -230,7 +231,7 @@
#if ENABLED(DUAL_X_CARRIAGE)
#if EXTRUDERS == 1 || MECH(COREXY) \
|| 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)
#error Missing or invalid definitions for DUAL_X_CARRIAGE mode.
#endif
......@@ -269,7 +270,7 @@
#if HASNT(HEATER_2)
#error HEATER_2_PIN not defined for this board
#endif
#elif HOTENDS > 1 || defined(HEATERS_PARALLEL)
#elif HOTENDS > 1 || ENABLED(HEATERS_PARALLEL)
#if HASNT(HEATER_1)
#error HEATER_1_PIN not defined for this board
#endif
......@@ -286,7 +287,7 @@
/**
* 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.
#endif
......@@ -294,11 +295,11 @@
#error WATCH_TEMP_PERIOD now uses seconds instead of milliseconds.
#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.
#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.
#endif
......@@ -310,11 +311,11 @@
#error "Z_LATE_ENABLE can't be used with COREXZ."
#endif
#ifdef BEEPER
#if ENABLED(BEEPER)
#error BEEPER has been replaced with BEEPER_PIN. Please update your pins definitions.
#endif
#ifdef SDCARDDETECT
#if ENABLED(SDCARDDETECT)
#error SDCARDDETECT is now SD_DETECT_PIN. Please update your pins definitions.
#endif
......
......@@ -43,7 +43,7 @@
detach() - Stops an attached servos from pulsing its i/o pin.
*/
#include "Configuration.h"
#include "Configuration_Basic.h"
#if HAS(SERVOS)
......@@ -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
// Interrupt handlers for Arduino
#if ENABLED(_useTimer1)
#ifdef _useTimer1
SIGNAL (TIMER1_COMPA_vect) { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
#endif
#if ENABLED(_useTimer3)
#ifdef _useTimer3
SIGNAL (TIMER3_COMPA_vect) { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
#endif
#if ENABLED(_useTimer4)
#ifdef _useTimer4
SIGNAL (TIMER4_COMPA_vect) { handle_interrupts(_timer4, &TCNT4, &OCR4A); }
#endif
......@@ -122,10 +122,10 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
#else //!WIRING
// Interrupt handlers for Wiring
#if ENABLED(_useTimer1)
#ifdef _useTimer1
void Timer1Service() { handle_interrupts(_timer1, &TCNT1, &OCR1A); }
#endif
#if ENABLED(_useTimer3)
#ifdef _useTimer3
void Timer3Service() { handle_interrupts(_timer3, &TCNT3, &OCR3A); }
#endif
......@@ -133,7 +133,7 @@ static inline void handle_interrupts(timer16_Sequence_t timer, volatile uint16_t
static void initISR(timer16_Sequence_t timer) {
#if ENABLED(_useTimer1)
#ifdef _useTimer1
if (timer == _timer1) {
TCCR1A = 0; // normal counting mode
TCCR1B = _BV(CS11); // set prescaler of 8
......@@ -152,7 +152,7 @@ static void initISR(timer16_Sequence_t timer) {
}
#endif
#if ENABLED(_useTimer3)
#ifdef _useTimer3
if (timer == _timer3) {
TCCR3A = 0; // normal counting mode
TCCR3B = _BV(CS31); // set prescaler of 8
......@@ -170,7 +170,7 @@ static void initISR(timer16_Sequence_t timer) {
}
#endif
#if ENABLED(_useTimer4)
#ifdef _useTimer4
if (timer == _timer4) {
TCCR4A = 0; // normal counting mode
TCCR4B = _BV(CS41); // set prescaler of 8
......@@ -180,7 +180,7 @@ static void initISR(timer16_Sequence_t timer) {
}
#endif
#if ENABLED(_useTimer5)
#ifdef _useTimer5
if (timer == _timer5) {
TCCR5A = 0; // normal counting mode
TCCR5B = _BV(CS51); // set prescaler of 8
......@@ -307,7 +307,7 @@ bool Servo::attached() { return servo_info[this->servoIndex].Pin.isActive; }
void Servo::move(int value) {
if (this->attach(0) >= 0) {
this->write(value);
#ifdef DEACTIVATE_SERVOS_AFTER_MOVE
#if ENABLED(DEACTIVATE_SERVOS_AFTER_MOVE)
delay(SERVO_DEACTIVATION_DELAY);
this->detach();
#endif
......
......@@ -262,7 +262,7 @@ void checkHitEndstops() {
ECHO_MV(MSG_ENDSTOP_Z, (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT MSG_ENDSTOP_ZS);
}
#ifdef Z_PROBE_ENDSTOP
#if ENABLED(Z_PROBE_ENDSTOP)
if (endstop_hit_bits & BIT(Z_PROBE)) {
ECHO_MV(MSG_ENDSTOP_ZPS, (float)endstops_trigsteps[Z_AXIS] / axis_steps_per_unit[Z_AXIS]);
LCD_MESSAGEPGM(MSG_ENDSTOPS_HIT MSG_ENDSTOP_ZPS);
......@@ -603,7 +603,7 @@ ISR(TIMER1_COMPA_vect) {
if (cleaning_buffer_counter) {
current_block = NULL;
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));
#endif
cleaning_buffer_counter--;
......@@ -669,7 +669,7 @@ ISR(TIMER1_COMPA_vect) {
STEP_START(x,X);
STEP_START(y,Y);
STEP_START(z,Z);
#ifndef ADVANCE
#if DISABLED(ADVANCE)
STEP_START(e,E);
#endif
......@@ -1251,7 +1251,7 @@ void digipot_init() {
digipot_current(i,digipot_motor_current[i]);
}
#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_Z_PIN, OUTPUT);
pinMode(MOTOR_CURRENT_PWM_E_PIN, OUTPUT);
......@@ -1277,7 +1277,7 @@ void digipot_current(uint8_t driver, int current) {
const uint8_t digipot_ch[] = DIGIPOT_CHANNELS;
digitalPotWrite(digipot_ch[driver], current);
#endif
#ifdef MOTOR_CURRENT_PWM_XY_PIN
#if ENABLED(MOTOR_CURRENT_PWM_XY_PIN)
switch(driver) {
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;
......
......@@ -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 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
#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 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); }}
......
......@@ -30,7 +30,7 @@
//================================== 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)
#endif
......@@ -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 minttemp[HOTENDS] = { 0 };
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;
#endif
#ifdef BED_MAXTEMP
#if ENABLED(BED_MAXTEMP)
static int bed_maxttemp_raw = HEATER_BED_RAW_HI_TEMP;
#endif
......@@ -173,12 +173,12 @@ static float analog2temp(int raw, uint8_t e);
static float analog2tempBed(int raw);
static void updateTemperaturesFromRawValues();
#ifdef THERMAL_PROTECTION_HOTENDS
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
int watch_target_temp[HOTENDS] = { 0 };
millis_t watch_heater_next_ms[HOTENDS] = { 0 };
#endif
#ifndef SOFT_PWM_SCALE
#if DISABLED(SOFT_PWM_SCALE)
#define SOFT_PWM_SCALE 0
#endif
......@@ -471,7 +471,7 @@ inline void _temp_error(int e, const char *serial_msg, const char *lcd_msg) {
PS_PGM(serial_msg);
ECHO_M(MSG_STOPPED_HEATER);
if (e >= 0) ECHO_EV((int)e); else ECHO_EM(MSG_HEATER_BED);
#ifdef ULTRA_LCD
#if ENABLED(ULTRA_LCD)
lcd_setalertstatuspgm(lcd_msg);
#endif
}
......@@ -775,7 +775,7 @@ static float analog2tempBed(int raw) {
if (i == BEDTEMPTABLE_LEN) celsius = PGM_RD_W(BEDTEMPTABLE[i-1][1]);
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;
#else
return 0;
......@@ -1049,38 +1049,38 @@ void tp_init() {
maxttemp_raw[NR] += OVERSAMPLENR; \
}
#ifdef HEATER_0_MINTEMP
#if ENABLED(HEATER_0_MINTEMP)
TEMP_MIN_ROUTINE(0);
#endif
#ifdef HEATER_0_MAXTEMP
#if ENABLED(HEATER_0_MAXTEMP)
TEMP_MAX_ROUTINE(0);
#endif
#if HOTENDS > 1
#ifdef HEATER_1_MINTEMP
#if ENABLED(HEATER_1_MINTEMP)
TEMP_MIN_ROUTINE(1);
#endif
#ifdef HEATER_1_MAXTEMP
#if ENABLED(HEATER_1_MAXTEMP)
TEMP_MAX_ROUTINE(1);
#endif
#if HOTENDS > 2
#ifdef HEATER_2_MINTEMP
#if ENABLED(HEATER_2_MINTEMP)
TEMP_MIN_ROUTINE(2);
#endif
#ifdef HEATER_2_MAXTEMP
#if ENABLED(HEATER_2_MAXTEMP)
TEMP_MAX_ROUTINE(2);
#endif
#if HOTENDS > 3
#ifdef HEATER_3_MINTEMP
#if ENABLED(HEATER_3_MINTEMP)
TEMP_MIN_ROUTINE(3);
#endif
#ifdef HEATER_3_MAXTEMP
#if ENABLED(HEATER_3_MAXTEMP)
TEMP_MAX_ROUTINE(3);
#endif
#endif // HOTENDS > 3
#endif // HOTENDS > 2
#endif // HOTENDS > 1
#ifdef BED_MINTEMP
#if ENABLED(BED_MINTEMP)
while(analog2tempBed(bed_minttemp_raw) < BED_MINTEMP) {
#if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
bed_minttemp_raw += OVERSAMPLENR;
......@@ -1089,7 +1089,7 @@ void tp_init() {
#endif
}
#endif //BED_MINTEMP
#ifdef BED_MAXTEMP
#if ENABLED(BED_MAXTEMP)
while(analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) {
#if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
bed_maxttemp_raw -= OVERSAMPLENR;
......@@ -1471,7 +1471,7 @@ ISR(TIMER0_COMPB_vect) {
*
* 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
#endif
......
......@@ -97,7 +97,7 @@ extern float current_temperature_bed;
FORCE_INLINE float degHotend(uint8_t hotend) { return current_temperature[HOTEND_ARG]; }
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 rawBedTemp() { return current_temperature_bed_raw; }
#endif
......@@ -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 degTargetBed() { return target_temperature_bed; }
#ifdef THERMAL_PROTECTION_HOTENDS
#if ENABLED(THERMAL_PROTECTION_HOTENDS)
void start_watching_heater(int e=0);
#endif
......
......@@ -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.
This does not match the normal thermistor behaviour so we need to set the following defines */
#if (THERMISTORHEATER_0 == 20)
# define HEATER_0_RAW_HI_TEMP 16383
# define HEATER_0_RAW_LO_TEMP 0
#define HEATER_0_RAW_HI_TEMP 16383
#define HEATER_0_RAW_LO_TEMP 0
#endif
#if (THERMISTORHEATER_1 == 20)
# define HEATER_1_RAW_HI_TEMP 16383
# define HEATER_1_RAW_LO_TEMP 0
#define HEATER_1_RAW_HI_TEMP 16383
#define HEATER_1_RAW_LO_TEMP 0
#endif
#if (THERMISTORHEATER_2 == 20)
# define HEATER_2_RAW_HI_TEMP 16383
# define HEATER_2_RAW_LO_TEMP 0
#define HEATER_2_RAW_HI_TEMP 16383
#define HEATER_2_RAW_LO_TEMP 0
#endif
#if (THERMISTORHEATER_3 == 20)
# define HEATER_3_RAW_HI_TEMP 16383
# define HEATER_3_RAW_LO_TEMP 0
#define HEATER_3_RAW_HI_TEMP 16383
#define HEATER_3_RAW_LO_TEMP 0
#endif
#if (THERMISTORBED == 20)
# define HEATER_BED_RAW_HI_TEMP 16383
# define HEATER_BED_RAW_LO_TEMP 0
#define HEATER_BED_RAW_HI_TEMP 16383
#define HEATER_BED_RAW_LO_TEMP 0
#endif
const short temptable_20[][2] PROGMEM = {
{0 * OVERSAMPLENR, 0},
......@@ -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
// 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
#endif
const short temptable_999[][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
// 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
#endif
const short temptable_998[][2] PROGMEM = {
......@@ -1080,119 +1080,119 @@ const short temptable_1047[][2] PROGMEM = {
#endif
#define _TT_NAME(_N) temptable_ ## _N
#define _TT_NAME(_N) temptable_ # #_N
#define TT_NAME(_N) _TT_NAME(_N)
#ifdef THERMISTORHEATER_0
# define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0)
# define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE)
#if ENABLED(THERMISTORHEATER_0)
#define HEATER_0_TEMPTABLE TT_NAME(THERMISTORHEATER_0)
#define HEATER_0_TEMPTABLE_LEN COUNT(HEATER_0_TEMPTABLE)
#else
# ifdef HEATER_0_USES_THERMISTOR
# error No heater 0 thermistor table specified
# else // HEATER_0_USES_THERMISTOR
# define HEATER_0_TEMPTABLE NULL
# define HEATER_0_TEMPTABLE_LEN 0
# endif // HEATER_0_USES_THERMISTOR
#if ENABLED(HEATER_0_USES_THERMISTOR)
#error No heater 0 thermistor table specified
#else // HEATER_0_USES_THERMISTOR
#define HEATER_0_TEMPTABLE NULL
#define HEATER_0_TEMPTABLE_LEN 0
#endif // HEATER_0_USES_THERMISTOR
#endif
//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
# ifdef 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_LO_TEMP 16383
# 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_LO_TEMP 0
# endif
#if DISABLED(HEATER_0_RAW_HI_TEMP)
#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_LO_TEMP 16383
#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_LO_TEMP 0
#endif
#endif
#ifdef THERMISTORHEATER_1
# define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1)
# define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE)
#if ENABLED(THERMISTORHEATER_1)
#define HEATER_1_TEMPTABLE TT_NAME(THERMISTORHEATER_1)
#define HEATER_1_TEMPTABLE_LEN COUNT(HEATER_1_TEMPTABLE)
#else
# ifdef HEATER_1_USES_THERMISTOR
# error No heater 1 thermistor table specified
# else // HEATER_1_USES_THERMISTOR
# define HEATER_1_TEMPTABLE NULL
# define HEATER_1_TEMPTABLE_LEN 0
# endif // HEATER_1_USES_THERMISTOR
#if ENABLED(HEATER_1_USES_THERMISTOR)
#error No heater 1 thermistor table specified
#else // HEATER_1_USES_THERMISTOR
#define HEATER_1_TEMPTABLE NULL
#define HEATER_1_TEMPTABLE_LEN 0
#endif // HEATER_1_USES_THERMISTOR
#endif
//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
# ifdef 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_LO_TEMP 16383
# 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_LO_TEMP 0
# endif
#if DISABLED(HEATER_1_RAW_HI_TEMP)
#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_LO_TEMP 16383
#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_LO_TEMP 0
#endif
#endif
#ifdef THERMISTORHEATER_2
# define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2)
# define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE)
#if ENABLED(THERMISTORHEATER_2)
#define HEATER_2_TEMPTABLE TT_NAME(THERMISTORHEATER_2)
#define HEATER_2_TEMPTABLE_LEN COUNT(HEATER_2_TEMPTABLE)
#else
# ifdef HEATER_2_USES_THERMISTOR
# error No heater 2 thermistor table specified
# else // HEATER_2_USES_THERMISTOR
# define HEATER_2_TEMPTABLE NULL
# define HEATER_2_TEMPTABLE_LEN 0
# endif // HEATER_2_USES_THERMISTOR
#if ENABLED(HEATER_2_USES_THERMISTOR)
#error No heater 2 thermistor table specified
#else // HEATER_2_USES_THERMISTOR
#define HEATER_2_TEMPTABLE NULL
#define HEATER_2_TEMPTABLE_LEN 0
#endif // HEATER_2_USES_THERMISTOR
#endif
//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
# ifdef 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_LO_TEMP 16383
# 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_LO_TEMP 0
# endif
#if DISABLED(HEATER_2_RAW_HI_TEMP)
#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_LO_TEMP 16383
#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_LO_TEMP 0
#endif
#endif
#ifdef THERMISTORHEATER_3
# define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3)
# define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE)
#if ENABLED(THERMISTORHEATER_3)
#define HEATER_3_TEMPTABLE TT_NAME(THERMISTORHEATER_3)
#define HEATER_3_TEMPTABLE_LEN COUNT(HEATER_3_TEMPTABLE)
#else
# ifdef HEATER_3_USES_THERMISTOR
# error No heater 3 thermistor table specified
# else // HEATER_3_USES_THERMISTOR
# define HEATER_3_TEMPTABLE NULL
# define HEATER_3_TEMPTABLE_LEN 0
# endif // HEATER_3_USES_THERMISTOR
#if ENABLED(HEATER_3_USES_THERMISTOR)
#error No heater 3 thermistor table specified
#else // HEATER_3_USES_THERMISTOR
#define HEATER_3_TEMPTABLE NULL
#define HEATER_3_TEMPTABLE_LEN 0
#endif // HEATER_3_USES_THERMISTOR
#endif
//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
# ifdef 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_LO_TEMP 16383
# 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_LO_TEMP 0
# endif
#if DISABLED(HEATER_3_RAW_HI_TEMP)
#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_LO_TEMP 16383
#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_LO_TEMP 0
#endif
#endif
#ifdef THERMISTORBED
# define BEDTEMPTABLE TT_NAME(THERMISTORBED)
# define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE)
#if ENABLED(THERMISTORBED)
#define BEDTEMPTABLE TT_NAME(THERMISTORBED)
#define BEDTEMPTABLE_LEN COUNT(BEDTEMPTABLE)
#else
# ifdef BED_USES_THERMISTOR
# error No bed thermistor table specified
# endif // BED_USES_THERMISTOR
#if ENABLED(BED_USES_THERMISTOR)
#error No bed thermistor table specified
#endif // BED_USES_THERMISTOR
#endif
//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
# ifdef 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_LO_TEMP 16383
# 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_LO_TEMP 0
# endif
#if DISABLED(HEATER_BED_RAW_HI_TEMP)
#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_LO_TEMP 16383
#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_LO_TEMP 0
#endif
#endif
#endif //THERMISTORTABLES_H_
......@@ -118,17 +118,17 @@ static void lcd_status_screen();
#define ENCODER_FEEDRATE_DEADZONE 10
#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
#endif
#ifndef ENCODER_PULSES_PER_STEP
#if DISABLED(ENCODER_PULSES_PER_STEP)
#define ENCODER_PULSES_PER_STEP 1
#endif
#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
#endif
#ifndef ENCODER_PULSES_PER_STEP
#if DISABLED(ENCODER_PULSES_PER_STEP)
#define ENCODER_PULSES_PER_STEP 1
#endif
#endif
......@@ -139,7 +139,7 @@ static void lcd_status_screen();
/**
* 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 { \
encoderRateMultiplierEnabled = false; \
if (encoderPosition > 0x8000) encoderPosition = 0; \
......@@ -308,7 +308,7 @@ static void lcd_status_screen() {
#if ENABLED(LCD_PROGRESS_BAR)
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) {
progress_bar_ms = ms;
}
......@@ -1560,23 +1560,23 @@ void lcd_quick_feedback() {
next_button_update_ms = millis() + 500;
#if ENABLED(LCD_USE_I2C_BUZZER)
#ifndef LCD_FEEDBACK_FREQUENCY_HZ
#if DISABLED(LCD_FEEDBACK_FREQUENCY_HZ)
#define LCD_FEEDBACK_FREQUENCY_HZ 100
#endif
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
#if DISABLED(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS (1000/6)
#endif
lcd.buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#elif PIN_EXISTS(BEEPER)
#ifndef LCD_FEEDBACK_FREQUENCY_HZ
#if DISABLED(LCD_FEEDBACK_FREQUENCY_HZ)
#define LCD_FEEDBACK_FREQUENCY_HZ 5000
#endif
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
#if DISABLED(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
#endif
buzz(LCD_FEEDBACK_FREQUENCY_DURATION_MS, LCD_FEEDBACK_FREQUENCY_HZ);
#else
#ifndef LCD_FEEDBACK_FREQUENCY_DURATION_MS
#if DISABLED(LCD_FEEDBACK_FREQUENCY_DURATION_MS)
#define LCD_FEEDBACK_FREQUENCY_DURATION_MS 2
#endif
delay(LCD_FEEDBACK_FREQUENCY_DURATION_MS);
......@@ -1638,7 +1638,7 @@ void lcd_init() {
#if ENABLED(SR_LCD_2W_NL) // Non latching 2 wire shift register
pinMode (SR_DATA_PIN, OUTPUT);
pinMode (SR_CLK_PIN, OUTPUT);
#elif defined(SHIFT_CLK)
#elif ENABLED(SHIFT_CLK)
pinMode(SHIFT_CLK,OUTPUT);
pinMode(SHIFT_LD,OUTPUT);
pinMode(SHIFT_EN,OUTPUT);
......@@ -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
* 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 encrot1 2
#define encrot2 3
......@@ -1952,7 +1952,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#if BTN_ENC > 0
millis_t ms = millis();
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;
#endif
#endif
......@@ -2620,7 +2620,7 @@ static void coordtoLCD() {
memset(buffer, 0, sizeof(buffer));
strcat(buffer, "X");
if (axis_known_position[X_AXIS]) {
#ifdef DELTA
#if MECH(DELTA)
valuetemp = ftostr30(current_position[X_AXIS]);
#else
valuetemp = ftostr3(current_position[X_AXIS]);
......@@ -2632,7 +2632,7 @@ static void coordtoLCD() {
strcat(buffer, " Y");
if (axis_known_position[Y_AXIS]) {
#ifdef DELTA
#if MECH(DELTA)
valuetemp = ftostr30(current_position[Y_AXIS]);
#else
valuetemp = ftostr3(current_position[Y_AXIS]);
......
......@@ -80,7 +80,7 @@
#define EN_A BIT(BLEN_A)
#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 LCD_BACK_CLICKED (buttons&EN_D)
#endif
......
......@@ -6,7 +6,7 @@
* 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.
//#else
extern volatile uint8_t buttons; //an extended version of the last checked buttons in a bit array.
......@@ -27,7 +27,7 @@
#define EN_B BIT(BLEN_B) // The two encoder pins are connected through BTN_EN1 and BTN_EN2
#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
#define BLEN_C 2
#define EN_C BIT(BLEN_C)
......@@ -51,7 +51,7 @@
#define B_DW (BUTTON_DOWN<<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
#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.
......@@ -380,7 +380,7 @@ static void lcd_implementation_init(
#if ENABLED(LCD_I2C_TYPE_PCF8575)
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.setBacklight(HIGH);
#endif
......@@ -554,7 +554,7 @@ static void lcd_implementation_status_screen() {
lcd.print('X');
if (axis_known_position[X_AXIS])
#ifdef DELTA
#if MECH(DELTA)
lcd.print(ftostr30(current_position[X_AXIS]));
#else
lcd.print(ftostr3(current_position[X_AXIS]));
......@@ -562,7 +562,7 @@ static void lcd_implementation_status_screen() {
else
lcd_printPGM(PSTR("---"));
#ifdef DELTA
#if MECH(DELTA)
lcd_printPGM(PSTR(" Y"));
if (axis_known_position[Y_AXIS])
lcd.print(ftostr30(current_position[Y_AXIS]));
......
......@@ -141,7 +141,7 @@
}
else if (seen_c2){
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 ) );
#else
HARDWARE_CHAR_OUT( (char) (0x80 + ( utf_hi_char << 6 ) + d) ) ;
......@@ -200,7 +200,7 @@
return 0;
} else if (seen_d5) {
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 ) );
#else
HARDWARE_CHAR_OUT( (char) (0xa0u + ( utf_hi_char << 6 ) + d ) ) ;
......@@ -230,7 +230,7 @@
return 0;
} else if ((seen_e3 == true) && (seen_82_83 == true)){
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 ) );
#else
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