Patch #else / #endif comments

This commit is contained in:
Scott Lahteine 2017-05-09 12:35:43 -05:00
parent 9a364990d9
commit 081bf1f879
30 changed files with 68 additions and 68 deletions

View file

@ -205,7 +205,7 @@
#ifndef LCD_HEIGHT
#define LCD_HEIGHT 4
#endif
#else //no panel but just LCD
#else // no panel but just LCD
#if ENABLED(ULTRA_LCD)
#ifndef LCD_WIDTH
#define LCD_WIDTH 16
@ -392,4 +392,4 @@
#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
#define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED))
#endif //CONDITIONALS_LCD_H
#endif // CONDITIONALS_LCD_H

View file

@ -429,4 +429,4 @@ void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s
bool axis_unhomed_error(const bool x, const bool y, const bool z);
#endif
#endif //MARLIN_H
#endif // MARLIN_H

View file

@ -788,7 +788,7 @@ extern "C" {
return free_memory;
}
}
#endif //!SDSUPPORT
#endif // !SDSUPPORT
#if ENABLED(DIGIPOT_I2C)
extern void digipot_i2c_set_current(int channel, float current);
@ -1841,7 +1841,7 @@ static void clean_up_after_endstop_or_probe_move() {
do_blocking_move_to_z(z_dest);
}
#endif //HAS_BED_PROBE
#endif // HAS_BED_PROBE
#if HAS_PROBING_PROCEDURE || HOTENDS > 1 || ENABLED(Z_PROBE_ALLEN_KEY) || ENABLED(Z_PROBE_SLED) || ENABLED(NOZZLE_CLEAN_FEATURE) || ENABLED(NOZZLE_PARK_FEATURE) || ENABLED(DELTA_AUTO_CALIBRATION)
@ -3208,7 +3208,7 @@ void unknown_command_error() {
next_busy_signal_ms = ms + host_keepalive_interval * 1000UL;
}
#endif //HOST_KEEPALIVE_FEATURE
#endif // HOST_KEEPALIVE_FEATURE
bool position_is_reachable(const float target[XYZ]
#if HAS_BED_PROBE
@ -3421,7 +3421,7 @@ inline void gcode_G4() {
);
}
#endif //FWRETRACT
#endif // FWRETRACT
#if ENABLED(NOZZLE_CLEAN_FEATURE)
/**
@ -7032,7 +7032,7 @@ inline void gcode_M111() {
inline void gcode_M129() { baricuda_e_to_p_pressure = 0; }
#endif
#endif //BARICUDA
#endif // BARICUDA
/**
* M140: Set bed temperature
@ -9385,7 +9385,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
for (uint8_t j = 0; j < MIXING_STEPPERS; j++)
mixing_factor[j] = mixing_virtual_tool_mix[tmp_extruder][j];
#else //!MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1
#else // !MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1
#if HOTENDS > 1
@ -9677,7 +9677,7 @@ void tool_change(const uint8_t tmp_extruder, const float fr_mm_s/*=0.0*/, bool n
SERIAL_ECHO_START;
SERIAL_ECHOLNPAIR(MSG_ACTIVE_EXTRUDER, (int)active_extruder);
#endif //!MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1
#endif // !MIXING_EXTRUDER || MIXING_VIRTUAL_TOOLS <= 1
}
/**
@ -9968,7 +9968,7 @@ void process_next_command() {
case 928: // M928: Start SD write
gcode_M928(); break;
#endif //SDSUPPORT
#endif // SDSUPPORT
case 31: // M31: Report time since the start of SD print or last M109
gcode_M31(); break;

View file

@ -42,5 +42,5 @@ void SendColors(byte red, byte grn, byte blu) {
Wire.endTransmission();
}
#endif //BLINKM
#endif // BLINKM

View file

@ -98,4 +98,4 @@
#define MB(board) (MOTHERBOARD==BOARD_##board)
#endif //__BOARDS_H
#endif // __BOARDS_H

View file

@ -54,7 +54,7 @@ CardReader::CardReader() {
//power to SD reader
#if SDPOWER > -1
OUT_WRITE(SDPOWER, HIGH);
#endif //SDPOWER
#endif // SDPOWER
next_autostart_ms = millis() + 5000;
}
@ -882,4 +882,4 @@ void CardReader::printingHasFinished() {
}
}
#endif //SDSUPPORT
#endif // SDSUPPORT

View file

@ -183,6 +183,6 @@ extern CardReader card;
#define IS_SD_PRINTING (false)
#endif //SDSUPPORT
#endif // SDSUPPORT
#endif //__CARDREADER_H
#endif // __CARDREADER_H

View file

@ -418,7 +418,7 @@ void MarlinSettings::postprocess() {
EEPROM_WRITE(ubl_active);
EEPROM_WRITE(dummy);
EEPROM_WRITE(eeprom_slot);
#endif //AUTO_BED_LEVELING_UBL
#endif // AUTO_BED_LEVELING_UBL
// 9 floats for DELTA / Z_DUAL_ENDSTOPS
#if ENABLED(DELTA)
@ -795,7 +795,7 @@ void MarlinSettings::postprocess() {
EEPROM_READ(dummyb);
EEPROM_READ(dummy);
EEPROM_READ(dummyui8);
#endif //AUTO_BED_LEVELING_UBL
#endif // AUTO_BED_LEVELING_UBL
#if ENABLED(DELTA)
EEPROM_READ(endstop_adj); // 3 floats

View file

@ -76,4 +76,4 @@ void digipot_i2c_init() {
digipot_i2c_set_current(i, digipot_motor_current[i]);
}
#endif //DIGIPOT_I2C
#endif // DIGIPOT_I2C

View file

@ -203,4 +203,4 @@ void setup_endstop_interrupts( void ) {
// If we arrive here without raising an assertion, each pin has either an EXT-interrupt or a PCI.
}
#endif //_ENDSTOP_INTERRUPTS_H_
#endif // _ENDSTOP_INTERRUPTS_H_

View file

@ -305,4 +305,4 @@
#include "language_en.h"
#endif //__LANGUAGE_H
#endif // __LANGUAGE_H

View file

@ -183,4 +183,4 @@
#define RECIPROCAL(x) (NEAR_ZERO(x) ? 0.0 : 1.0 / (x))
#define FIXFLOAT(f) (f + 0.00001)
#endif //__MACROS_H
#endif // __MACROS_H

View file

@ -47,4 +47,4 @@
ZERO(z_values);
}
#endif // MESH_BED_LEVELING
#endif // MESH_BED_LEVELING

View file

@ -119,4 +119,4 @@
extern mesh_bed_leveling mbl;
#endif // MESH_BED_LEVELING
#endif // MESH_BED_LEVELING

View file

@ -32,7 +32,7 @@
nozzle_clean_length = fabs(nozzle_clean_start_point[X_AXIS] - nozzle_clean_end_point[X_AXIS]), //abs x size of wipe pad
nozzle_clean_height = fabs(nozzle_clean_start_point[Y_AXIS] - nozzle_clean_end_point[Y_AXIS]); //abs y size of wipe pad
constexpr bool nozzle_clean_horizontal = nozzle_clean_length >= nozzle_clean_height; //whether to zig-zag horizontally or vertically
#endif //NOZZLE_CLEAN_FEATURE
#endif // NOZZLE_CLEAN_FEATURE
/**
* @brief Nozzle class

View file

@ -568,4 +568,4 @@
#define SS_PIN AVR_SS_PIN
#endif
#endif //__PINS_H
#endif // __PINS_H

View file

@ -131,7 +131,7 @@
// For LCD SHIFT register LCD
#define SR_DATA_PIN EXT_AUX_SDA_D1
#define SR_CLK_PIN EXT_AUX_SCL_D0
#endif // SAV_3DLCD
#endif // SAV_3DLCD
#if ENABLED(SAV_3DLCD) || ENABLED(SAV_3DGLCD)
#define BTN_EN1 EXT_AUX_A1_IO

View file

@ -392,7 +392,7 @@ void Planner::recalculate() {
thermalManager.setTargetHotend(t, 0);
}
#endif //AUTOTEMP
#endif // AUTOTEMP
/**
* Maintain fans, paste extruder pressure,
@ -487,7 +487,7 @@ void Planner::check_axes_activity() {
KICKSTART_FAN(2);
#endif
#endif //FAN_KICKSTART_TIME
#endif // FAN_KICKSTART_TIME
#if ENABLED(FAN_SOFT_PWM)
#if HAS_FAN0

View file

@ -221,7 +221,7 @@ static void finISR(timer16_Sequence_t timer) {
, OCIE3A); // disable the timer3 output compare A interrupt
timerDetach(TIMER3OUTCOMPAREA_INT);
}
#else //!WIRING
#else // !WIRING
// For arduino - in future: call here to a currently undefined function to reset the timer
UNUSED(timer);
#endif

View file

@ -1398,7 +1398,7 @@ void Stepper::report_positions() {
//delay(10);
}
#endif //HAS_DIGIPOTSS
#endif // HAS_DIGIPOTSS
#if HAS_DIGIPOTSS || HAS_MOTOR_CURRENT_PWM

View file

@ -114,4 +114,4 @@ class Stopwatch {
#endif
};
#endif //STOPWATCH_H
#endif // STOPWATCH_H

View file

@ -601,7 +601,7 @@ float Temperature::get_pid_output(int e) {
}
#else
pid_output = constrain(target_temperature[HOTEND_INDEX], 0, PID_MAX);
#endif //PID_OPENLOOP
#endif // PID_OPENLOOP
#if ENABLED(PID_DEBUG)
SERIAL_ECHO_START;
@ -615,7 +615,7 @@ float Temperature::get_pid_output(int e) {
SERIAL_ECHOPAIR(MSG_PID_DEBUG_CTERM, cTerm[HOTEND_INDEX]);
#endif
SERIAL_EOL;
#endif //PID_DEBUG
#endif // PID_DEBUG
#else /* PID off */
pid_output = (current_temperature[HOTEND_INDEX] < target_temperature[HOTEND_INDEX]) ? PID_MAX : 0;
@ -662,11 +662,11 @@ float Temperature::get_pid_output(int e) {
SERIAL_ECHO(iTerm_bed);
SERIAL_ECHOPGM(" dTerm ");
SERIAL_ECHOLN(dTerm_bed);
#endif //PID_BED_DEBUG
#endif // PID_BED_DEBUG
return pid_output;
}
#endif //PIDTEMPBED
#endif // PIDTEMPBED
/**
* Manage heating activities for extruder hot-ends and a heated bed
@ -818,7 +818,7 @@ void Temperature::manage_heater() {
WRITE_HEATER_BED(LOW);
}
#endif
#endif //TEMP_SENSOR_BED != 0
#endif // TEMP_SENSOR_BED != 0
}
#define PGM_RD_W(x) (short)pgm_read_word(&x)
@ -1188,7 +1188,7 @@ void Temperature::init() {
bed_minttemp_raw -= OVERSAMPLENR;
#endif
}
#endif //BED_MINTEMP
#endif // BED_MINTEMP
#ifdef BED_MAXTEMP
while (analog2tempBed(bed_maxttemp_raw) > BED_MAXTEMP) {
#if HEATER_BED_RAW_LO_TEMP < HEATER_BED_RAW_HI_TEMP
@ -1197,7 +1197,7 @@ void Temperature::init() {
bed_maxttemp_raw += OVERSAMPLENR;
#endif
}
#endif //BED_MAXTEMP
#endif // BED_MAXTEMP
#if ENABLED(PROBING_HEATERS_OFF)
paused = false;
@ -1454,7 +1454,7 @@ void Temperature::disable_all_heaters() {
return (int)max6675_temp;
}
#endif //HEATER_0_USES_MAX6675
#endif // HEATER_0_USES_MAX6675
/**
* Get raw temperatures
@ -2056,7 +2056,7 @@ void Temperature::isr() {
babystepsTodo[axis]++; //fewer to do next time
}
}
#endif //BABYSTEPPING
#endif // BABYSTEPPING
#if ENABLED(PINS_DEBUGGING)
extern bool endstop_monitor_flag;

View file

@ -201,4 +201,4 @@ void TWIBus::flush() {
#endif
#endif //EXPERIMENTAL_I2CBUS
#endif // EXPERIMENTAL_I2CBUS

View file

@ -239,4 +239,4 @@ class TWIBus {
#endif
};
#endif //TWIBUS_H
#endif // TWIBUS_H

View file

@ -291,7 +291,7 @@ uint16_t max_display_update_time = 0;
_MENU_ITEM_PART_2(type, ## __VA_ARGS__); \
} while(0)
#else // !ENCODER_RATE_MULTIPLIER
#else // !ENCODER_RATE_MULTIPLIER
#define ENCODER_RATE_MULTIPLY(F) NOOP
#endif // !ENCODER_RATE_MULTIPLIER
@ -301,10 +301,10 @@ uint16_t max_display_update_time = 0;
#if ENABLED(ENCODER_RATE_MULTIPLIER)
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, ...) MENU_MULTIPLIER_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, ...) MENU_MULTIPLIER_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
#else //!ENCODER_RATE_MULTIPLIER
#else // !ENCODER_RATE_MULTIPLIER
#define MENU_MULTIPLIER_ITEM_EDIT(type, label, ...) MENU_ITEM(setting_edit_ ## type, label, PSTR(label), ## __VA_ARGS__)
#define MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(type, label, ...) MENU_ITEM(setting_edit_callback_ ## type, label, PSTR(label), ## __VA_ARGS__)
#endif //!ENCODER_RATE_MULTIPLIER
#endif // !ENCODER_RATE_MULTIPLIER
/**
* START_SCREEN_OR_MENU generates init code for a screen or menu
@ -568,10 +568,10 @@ void lcd_status_screen() {
}
#else
expire_status_ms = 0;
#endif //SDSUPPORT
#endif // SDSUPPORT
}
#endif
#endif //LCD_PROGRESS_BAR
#endif // LCD_PROGRESS_BAR
lcd_implementation_status_screen();
@ -614,7 +614,7 @@ void lcd_status_screen() {
feedrate_percentage = constrain(feedrate_percentage, 10, 999);
#endif //ULTIPANEL
#endif // ULTIPANEL
}
/**
@ -848,7 +848,7 @@ void kill_screen(const char* lcd_msg) {
MENU_ITEM(gcode, MSG_INIT_SDCARD, PSTR("M21")); // Manually initialize the SD-card via user interface
#endif
}
#endif //SDSUPPORT
#endif // SDSUPPORT
#if ENABLED(LCD_INFO_MENU)
MENU_ITEM(submenu, MSG_INFO_MENU, lcd_info_menu);
@ -1061,7 +1061,7 @@ void kill_screen(const char* lcd_msg) {
//
#if HOTENDS == 1
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
#else //HOTENDS > 1
#else // HOTENDS > 1
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N1, &thermalManager.target_temperature[0], 0, HEATER_0_MAXTEMP - 15, watch_temp_callback_E0);
MENU_MULTIPLIER_ITEM_EDIT_CALLBACK(int3, MSG_NOZZLE MSG_N2, &thermalManager.target_temperature[1], 0, HEATER_1_MAXTEMP - 15, watch_temp_callback_E1);
#if HOTENDS > 2
@ -2191,7 +2191,7 @@ void kill_screen(const char* lcd_msg) {
enqueue_and_echo_command(cmd);
}
#endif //PID_AUTOTUNE_MENU
#endif // PID_AUTOTUNE_MENU
#if ENABLED(PIDTEMP)
@ -2360,7 +2360,7 @@ void kill_screen(const char* lcd_msg) {
PID_MENU_ITEMS("", 0);
#endif // !PID_PARAMS_PER_HOTEND || HOTENDS == 1
#endif //PIDTEMP
#endif // PIDTEMP
//
// Preheat Material 1 conf
@ -2724,7 +2724,7 @@ void kill_screen(const char* lcd_msg) {
END_MENU();
}
#endif //SDSUPPORT
#endif // SDSUPPORT
#if ENABLED(LCD_INFO_MENU)
@ -3285,7 +3285,7 @@ void kill_screen(const char* lcd_msg) {
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
}
#endif //SDSUPPORT
#endif // SDSUPPORT
void menu_action_setting_edit_bool(const char* pstr, bool* ptr) {UNUSED(pstr); *ptr ^= true; lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; }
void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, screenFunc_t callback) {
@ -3483,7 +3483,7 @@ void lcd_update() {
);
}
#endif //SDSUPPORT && SD_DETECT_PIN
#endif // SDSUPPORT && SD_DETECT_PIN
const millis_t ms = millis();
if (ELAPSED(ms, next_lcd_update_ms)
@ -3533,12 +3533,12 @@ void lcd_update() {
SERIAL_ECHOPAIR(" ENCODER_10X_STEPS_PER_SEC: ", ENCODER_10X_STEPS_PER_SEC);
SERIAL_ECHOPAIR(" ENCODER_100X_STEPS_PER_SEC: ", ENCODER_100X_STEPS_PER_SEC);
SERIAL_EOL;
#endif //ENCODER_RATE_MULTIPLIER_DEBUG
#endif // ENCODER_RATE_MULTIPLIER_DEBUG
}
lastEncoderMovementMillis = ms;
} // encoderRateMultiplierEnabled
#endif //ENCODER_RATE_MULTIPLIER
#endif // ENCODER_RATE_MULTIPLIER
encoderPosition += (encoderDiff * encoderMultiplier) / ENCODER_PULSES_PER_STEP;
encoderDiff = 0;
@ -3829,7 +3829,7 @@ void lcd_reset_alert_level() { lcd_status_message_level = 0; }
#endif
#else
GET_BUTTON_STATES(buttons);
#endif //!NEWPANEL
#endif // !NEWPANEL
} // next_button_update_ms

View file

@ -148,7 +148,7 @@
#define LCD_CLICKED false
#endif
#else //no LCD
#else // no LCD
inline void lcd_update() {}
inline void lcd_init() {}
inline bool lcd_hasstatus() { return false; }

View file

@ -874,4 +874,4 @@ static void lcd_implementation_status_screen() {
#endif // ULTIPANEL
#endif //__ULTRALCD_IMPL_DOGM_H
#endif // __ULTRALCD_IMPL_DOGM_H

View file

@ -101,7 +101,7 @@ extern volatile uint8_t buttons; //an extended version of the last checked butt
#define LCD_CLICKED ((buttons & B_MI) || (buttons & B_ST))
#endif
#endif //ULTIPANEL
#endif // ULTIPANEL
////////////////////////////////////
// Create LCD class instance and chipset-specific information
@ -675,7 +675,7 @@ static void lcd_implementation_status_screen() {
LCD_TEMP(thermalManager.degBed(), thermalManager.degTargetBed(), LCD_STR_BEDTEMP[0]);
#endif
#endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
#endif // HOTENDS > 1 || TEMP_SENSOR_BED != 0
#endif // LCD_WIDTH >= 20

View file

@ -186,5 +186,5 @@ class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
#pragma GCC reset_options
#endif //U8GLIB_ST7920
#endif //ULCDST7920_H
#endif // U8GLIB_ST7920
#endif // ULCDST7920_H

View file

@ -51,6 +51,6 @@ void watchdog_init() {
kill(PSTR("ERR:Please Reset")); //kill blocks //16 characters so it fits on a 16x2 display
while (1); //wait for user or serial reset
}
#endif //WATCHDOG_RESET_MANUAL
#endif // WATCHDOG_RESET_MANUAL
#endif //USE_WATCHDOG
#endif // USE_WATCHDOG