diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp index 7f90d2a3dc..be9fb7b947 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_motion.cpp @@ -172,7 +172,7 @@ * it might be fine to remove this check and let planner.buffer_segment() filter it out. */ if (dest.y != start.y) { - if (!inf_normalized_flag) { // Fallthrough faster than branch + if (!inf_normalized_flag) { // fall-through faster than branch on_axis_distance = use_x_dist ? dest.x - start.x : dest.y - start.y; TERN_(HAS_EXTRUDERS, dest.e = start.e + on_axis_distance * e_normalized_dist); dest.z = start.z + on_axis_distance * z_normalized_dist; diff --git a/Marlin/src/feature/mmu3/mmu3_protocol_logic.cpp b/Marlin/src/feature/mmu3/mmu3_protocol_logic.cpp index ba1edb112d..4323925b6b 100644 --- a/Marlin/src/feature/mmu3/mmu3_protocol_logic.cpp +++ b/Marlin/src/feature/mmu3/mmu3_protocol_logic.cpp @@ -208,7 +208,7 @@ namespace MMU3 { break; } // [[fallthrough]]; // otherwise - // fallthrough + // fall through default: RecordUARTActivity(); // something has happened on the UART, update the timeout record return ProtocolError; @@ -517,7 +517,7 @@ namespace MMU3 { return Interrupted; } // [[fallthrough]]; - // fallthrough + // fall through case ResponseMsgParamCodes::Processing: // @@TODO we may actually use this branch to report progress of manual operation on the MMU // The MMU sends e.g. X0 P27 after its restart when the user presses an MMU button to move the Selector diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp index 8769de36fe..45f1ea900c 100644 --- a/Marlin/src/lcd/e3v2/creality/dwin.cpp +++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp @@ -1187,7 +1187,7 @@ void drawPrintingScreen() { #ifdef USE_STRING_HEADINGS drawTitle(GET_TEXT_F(MSG_PRINTING)); #else - dwinFrameTitleCopy(42, 0, 47, 14); // "Printing" + dwinFrameTitleCopy(42, 0, 47, 14); // "Printing" #endif #ifdef USE_STRING_TITLES dwinDrawString(false, font8x16, COLOR_WHITE, COLOR_BG_BLACK, 43, y, GET_TEXT_F(MSG_INFO_PRINT_TIME)); @@ -4129,7 +4129,7 @@ void eachMomentUpdate() { if (!PENDING(ms, next_rts_update_ms)) { next_rts_update_ms = ms + DWIN_SCROLL_UPDATE_INTERVAL; if (checkkey == ID_PrintProcess) { - // If print done + // if print done if (hmiFlag.print_finish && !hmiFlag.done_confirm_flag) { hmiFlag.print_finish = false; hmiFlag.done_confirm_flag = true; @@ -4138,18 +4138,18 @@ void eachMomentUpdate() { // show percent bar and value _card_percent = 0; drawPrintProgressBar(); - // Show print done confirm + // show print done confirm dwinDrawRectangle(1, COLOR_BG_BLACK, 0, 250, DWIN_WIDTH - 1, STATUS_Y); dwinIconShow(ICON, hmiIsChinese() ? ICON_Confirm_C : ICON_Confirm_E, 86, 283); } else if (hmiFlag.pause_flag != printingIsPaused()) { - // Print status update + // print status update hmiFlag.pause_flag = printingIsPaused(); iconResumeOrPause(); } } - // Pause after homing + // pause after homing if (hmiFlag.pause_action && printingIsPaused() && !planner.has_blocks_queued()) { hmiFlag.pause_action = false; #if ENABLED(PAUSE_HEAT) @@ -4292,7 +4292,7 @@ void dwinHandleScreen() { #if HAS_HEATED_BED case ID_BedTemp: hmiBedTemp(); break; #endif - #if ALL(HAS_PREHEAT, HAS_FAN) + #if HAS_PREHEAT && HAS_FAN case ID_FanSpeed: hmiFanSpeed(); break; #endif case ID_PrintSpeed: hmiPrintSpeed(); break; diff --git a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp index d4e517693f..d8ccebd221 100644 --- a/Marlin/src/lcd/e3v2/jyersui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/jyersui/dwin.cpp @@ -3981,7 +3981,7 @@ void JyersDWIN::menuItemHandler(const uint8_t menu, const uint8_t item, bool dra } break; - #if ALL(HAS_PREHEAT, HAS_HOTEND) + #if HAS_PREHEAT && HAS_HOTEND case ID_PreheatHotend: @@ -4292,7 +4292,7 @@ uint8_t JyersDWIN::getMenuSize(const uint8_t menu) { #endif case ID_Tune: return TUNE_TOTAL; - #if ALL(HAS_PREHEAT, HAS_HOTEND) + #if HAS_PREHEAT && HAS_HOTEND case ID_PreheatHotend: return PREHEATHOTEND_TOTAL; #endif diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp index f702e622d5..d6718305c2 100644 --- a/Marlin/src/lcd/e3v2/proui/dwin.cpp +++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp @@ -72,7 +72,7 @@ #define HAS_ONESTEP_LEVELING 1 #endif -#if HAS_MESH || ALL(HAS_LEVELING, HAS_ZOFFSET_ITEM) +#if HAS_MESH || (HAS_LEVELING && HAS_ZOFFSET_ITEM) #include "../../../feature/bedlevel/bedlevel.h" #include "bedlevel_tools.h" #endif @@ -3205,7 +3205,7 @@ void drawPrepareMenu() { checkkey = ID_Menu; if (SET_MENU(trammingMenu, MSG_BED_TRAMMING, items)) { BACK_ITEM(drawPrepareMenu); - #if ALL(HAS_BED_PROBE, HAS_MESH) + #if HAS_BED_PROBE && HAS_MESH MENU_ITEM(ICON_Tram, MSG_TRAMMING_WIZARD, onDrawMenuItem, trammingwizard); EDIT_ITEM(ICON_Version, MSG_BED_TRAMMING_MANUAL, onDrawChkbMenu, setManualTramming, &hmiData.fullManualTramming); #elif !HAS_BED_PROBE && HAS_ZOFFSET_ITEM diff --git a/Marlin/src/lcd/tft/ui_color_ui.cpp b/Marlin/src/lcd/tft/ui_color_ui.cpp index 49a33ca5a7..6c90cb6c36 100644 --- a/Marlin/src/lcd/tft/ui_color_ui.cpp +++ b/Marlin/src/lcd/tft/ui_color_ui.cpp @@ -81,8 +81,7 @@ void MarlinUI::tft_idle() { if ((BOOTSCREEN_TIMEOUT) > sofar) safe_delay((BOOTSCREEN_TIMEOUT) - sofar); clear_for_drawing(); } - -#endif // SHOW_BOOTSCREEN +#endif void MarlinUI::draw_kill_screen() { tft.queue.reset(); diff --git a/Marlin/src/module/motion.cpp b/Marlin/src/module/motion.cpp index e206bdf8dd..1282e605eb 100644 --- a/Marlin/src/module/motion.cpp +++ b/Marlin/src/module/motion.cpp @@ -1718,7 +1718,7 @@ float get_move_distance(const xyze_pos_t &diff OPTARG(HAS_ROTATIONAL_AXES, bool #else /** * For MBL and ABL-BILINEAR only segment moves when X or Y are involved. - * Otherwise fallthrough to do a direct single move. + * Otherwise fall through to do a direct single move. */ if (xy_pos_t(current_position) != xy_pos_t(destination)) { #if ENABLED(MESH_BED_LEVELING) diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index db040dc399..91a3268739 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -806,7 +806,7 @@ float Probe::run_z_probe(const bool sanity_check/*=true*/, const float z_min_poi // Stop the probe before it goes too low to prevent damage. // For known Z probe below the expected trigger point, otherwise -10mm lower. - const float z_probe_low_point = zoffs + z_min_point - float((!axis_is_trusted(Z_AXIS)) * 10); + const float z_probe_low_point = zoffs + z_min_point -float((!axis_is_trusted(Z_AXIS)) * 10); if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPGM("Probe Low Point: ", z_probe_low_point); // Double-probing does a fast probe followed by a slow probe diff --git a/Marlin/src/module/stepper.cpp b/Marlin/src/module/stepper.cpp index 211dbddced..3025cb83bd 100644 --- a/Marlin/src/module/stepper.cpp +++ b/Marlin/src/module/stepper.cpp @@ -1863,7 +1863,7 @@ void Stepper::pulse_phase_isr() { case DirectStepping::Config::SEGMENT_STEPS: page_step_state.segment_idx += 2; page_step_state.segment_steps = 0; - // fallthrough + // fallthru case 0: { const uint8_t low = page_step_state.page[page_step_state.segment_idx], high = page_step_state.page[page_step_state.segment_idx + 1]; @@ -1903,7 +1903,7 @@ void Stepper::pulse_phase_isr() { case DirectStepping::Config::SEGMENT_STEPS: page_step_state.segment_idx++; page_step_state.segment_steps = 0; - // fallthrough + // fallthru case 0: { const uint8_t b = page_step_state.page[page_step_state.segment_idx]; PAGE_SEGMENT_UPDATE(X, (b >> 6) & 0x3); diff --git a/Marlin/src/module/temperature.cpp b/Marlin/src/module/temperature.cpp index 44e58a9962..74a1d13dbc 100644 --- a/Marlin/src/module/temperature.cpp +++ b/Marlin/src/module/temperature.cpp @@ -2366,7 +2366,7 @@ void Temperature::task() { } #if HAS_MEDIA - if (emergency_parser.sd_abort_by_M524) { // Abort SD print immediately + if (emergency_parser.sd_abort_by_M524) { // abort SD print immediately emergency_parser.sd_abort_by_M524 = false; card.flag.abort_sd_printing = true; gcode.process_subcommands_now(F("M524")); @@ -3526,7 +3526,7 @@ void Temperature::init() { else if (PENDING(now, timer)) break; state = TRRunaway; - } // Fallthrough + } // fall through case TRRunaway: TERN_(SOVOL_SV06_RTS, rts.gotoPageBeep(ID_KillRunaway_L, ID_KillRunaway_D)); @@ -3613,9 +3613,9 @@ void Temperature::disable_all_heaters() { void Temperature::pause_heaters(const bool p) { if (p != paused_for_probing) { paused_for_probing = p; - if (p) { // Timeout immediately - HOTEND_LOOP() heater_idle[e].expire(); - TERN_(HAS_HEATED_BED, heater_idle[IDLE_INDEX_BED].expire()); + if (p) { + HOTEND_LOOP() heater_idle[e].expire(); // Timeout immediately + TERN_(HAS_HEATED_BED, heater_idle[IDLE_INDEX_BED].expire()); // Timeout immediately } else { HOTEND_LOOP() reset_hotend_idle_timer(e); @@ -4428,7 +4428,7 @@ void Temperature::isr() { break; } else { - adc_sensor_state = StartSampling; // Fallthrough to start sampling + adc_sensor_state = StartSampling; // Fall-through to start sampling next_sensor_state = (ADCSensorState)(int(StartSampling) + 1); } } @@ -4581,14 +4581,14 @@ void Temperature::isr() { case Prepare_ADC_KEY: hal.adc_start(ADC_KEYPAD_PIN); break; case Measure_ADC_KEY: if (!hal.adc_ready()) - next_sensor_state = adc_sensor_state; // Redo this state + next_sensor_state = adc_sensor_state; // redo this state else if (ADCKey_count < ADC_BUTTON_DEBOUNCE_DELAY) { raw_ADCKey_value = hal.adc_value(); if (raw_ADCKey_value <= 900UL * HAL_ADC_RANGE / 1024UL) { NOMORE(current_ADCKey_raw, raw_ADCKey_value); ADCKey_count++; } - else { // ADC Key release + else { //ADC Key release if (ADCKey_count > 0) ADCKey_count++; else ADCKey_pressed = false; if (ADCKey_pressed) { ADCKey_count = 0; @@ -4602,14 +4602,14 @@ void Temperature::isr() { case StartupDelay: break; - } // switch (adc_sensor_state) + } // switch(adc_sensor_state) // Go to the next state adc_sensor_state = next_sensor_state; - /** - * Additional ~1kHz Tasks - */ + // + // Additional ~1kHz Tasks + // // Check fan tachometers TERN_(HAS_FANCHECK, fan_check.update_tachometers()); @@ -4743,7 +4743,7 @@ void Temperature::isr() { } #endif - #if ALL(HAS_HOTEND, HAS_STATUS_MESSAGE) + #if HAS_HOTEND && HAS_STATUS_MESSAGE void Temperature::set_heating_message(const uint8_t e, const bool isM104/*=false*/) { const bool heating = isHeatingHotend(e); ui.status_printf(0, diff --git a/Marlin/src/module/temperature.h b/Marlin/src/module/temperature.h index 444bd98a4b..92fae44deb 100644 --- a/Marlin/src/module/temperature.h +++ b/Marlin/src/module/temperature.h @@ -791,7 +791,7 @@ class Temperature { static millis_t fan_update_ms; static void manage_extruder_fans(millis_t ms) { - if (ELAPSED(ms, fan_update_ms)) { // Only need to check fan state very infrequently + if (ELAPSED(ms, fan_update_ms)) { // only need to check fan state very infrequently const millis_t next_ms = ms + fan_update_interval_ms; #if HAS_PWMFANCHECK #define FAN_CHECK_DURATION 100 @@ -977,11 +977,9 @@ class Temperature { #endif #endif - /** - * High level conversion routines, for use outside of temperature.cpp - * inline so that there is no performance decrease. - * deg=degreeCelsius - */ + //high level conversion routines, for use outside of temperature.cpp + //inline so that there is no performance decrease. + //deg=degreeCelsius static celsius_float_t degHotend(const uint8_t E_NAME) { return TERN0(HAS_HOTEND, temp_hotend[HOTEND_INDEX].celsius); @@ -1332,7 +1330,7 @@ class Temperature { #endif #endif - #if ALL(HAS_HOTEND, HAS_STATUS_MESSAGE) + #if HAS_HOTEND && HAS_STATUS_MESSAGE static void set_heating_message(const uint8_t e, const bool isM104=false); #else static void set_heating_message(const uint8_t, const bool=false) {} diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index 334ce80aeb..d93b41e82b 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -124,7 +124,7 @@ int16_t CardReader::nrItems = -1; #if ENABLED(SDSORT_DYNAMIC_RAM) uint8_t *CardReader::isDir; #elif ENABLED(SDSORT_CACHE_NAMES) || DISABLED(SDSORT_USES_STACK) - uint8_t CardReader::isDir[(SDSORT_LIMIT + 7) >> 3]; + uint8_t CardReader::isDir[(SDSORT_LIMIT+7)>>3]; #endif #define IS_DIR(n) TEST(isDir[(n) >> 3], (n) & 0x07) #endif diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp index 19f5464423..6c45b7eee7 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp @@ -475,7 +475,7 @@ void USB::Task() { // USB state machine case USB_ATTACHED_SUBSTATE_SETTLE: // Settle time for just attached device if ((int32_t)((uint32_t)millis() - delay) >= 0L) usb_task_state = USB_ATTACHED_SUBSTATE_RESET_DEVICE; - else break; // Don't fallthrough + else break; // Don't fall through case USB_ATTACHED_SUBSTATE_RESET_DEVICE: regWr(rHCTL, bmBUSRST); // Issue bus reset usb_task_state = USB_ATTACHED_SUBSTATE_WAIT_RESET_COMPLETE; @@ -501,7 +501,7 @@ void USB::Task() { // USB state machine break; case USB_ATTACHED_SUBSTATE_WAIT_RESET: if ((int32_t)((uint32_t)millis() - delay) >= 0L) usb_task_state = USB_STATE_CONFIGURING; - else break; // Don't fallthrough + else break; // Don't fall through case USB_STATE_CONFIGURING: //Serial.print("\r\nConf.LS: "); diff --git a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h index 3ae7f0fcf6..1dde32f949 100644 --- a/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h +++ b/Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h @@ -175,11 +175,11 @@ void UHS_NI MAX3421E_HOST::VBUS_changed() { switch (vbusState) { case LSHOST: // Low speed speed = 0; - // Intentional fallthrough + // Intentional fall-through case FSHOST: // Full speed // Start device initialization if we are not initializing // Resets to the device cause an IRQ - //usb_task_state == UHS_USB_HOST_STATE_RESET_NOT_COMPLETE; + // usb_task_state == UHS_USB_HOST_STATE_RESET_NOT_COMPLETE; //if ((usb_task_state & UHS_USB_HOST_STATE_MASK) != UHS_USB_HOST_STATE_DETACHED) { ReleaseChildren(); if (!doingreset) { @@ -806,7 +806,7 @@ void UHS_NI MAX3421E_HOST::ISRbottom() { case UHS_USB_HOST_STATE_WAIT_BUS_READY: MAX_HOST_DEBUG(PSTR("UHS_USB_HOST_STATE_WAIT_BUS_READY\r\n")); usb_task_state = UHS_USB_HOST_STATE_CONFIGURING; - break; // don't fallthrough + break; // don't fall through case UHS_USB_HOST_STATE_CONFIGURING: usb_task_state = UHS_USB_HOST_STATE_CHECK; diff --git a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h index 1b95f75f69..2167e2ad9c 100644 --- a/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h +++ b/buildroot/share/PlatformIO/variants/MARLIN_F103Rx/variant.h @@ -31,7 +31,7 @@ extern "C" { #define PA0 PIN_A0 // | 0 | A0 | | | | | #define PA1 PIN_A1 // | 1 | A1 | | | | | #define PA2 PIN_A2 // | 2 | A2 | USART2_TX | | | | -#define PA3 PIN_A3 // | 3 | A3, DAC_OUT1** | USART2_RX | | | | +#define PA3 PIN_A3 // | 2 | A3, DAC_OUT1** | USART2_RX | | | | #define PA4 PIN_A4 // | 4 | A4, DAC_OUT2** | | | SPI1_SS | | #define PA5 PIN_A5 // | 5 | A5 | | | SPI1_SCK | | #define PA6 PIN_A6 // | 6 | A6 | | | SPI1_MISO | | diff --git a/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/boards.cpp b/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/boards.cpp index 099788d3eb..657b92e224 100644 --- a/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/boards.cpp +++ b/buildroot/share/PlatformIO/variants/marlin_maple_CHITU_F103/wirish/boards.cpp @@ -201,7 +201,7 @@ static void timer_default_config(timer_dev *dev) { switch (dev->type) { case TIMER_ADVANCED: regs->BDTR = TIMER_BDTR_MOE | TIMER_BDTR_LOCK_OFF; - // Fallthrough + // fall-through case TIMER_GENERAL: timer_set_reload(dev, full_overflow); for (uint8 channel = 1; channel <= 4; channel++) { @@ -211,7 +211,7 @@ static void timer_default_config(timer_dev *dev) { TIMER_OC_PE); } } - // Fallthrough + // fall-through case TIMER_BASIC: break; } diff --git a/buildroot/share/PlatformIO/variants/marlin_maple_MEEB_3DP/wirish/boards.cpp b/buildroot/share/PlatformIO/variants/marlin_maple_MEEB_3DP/wirish/boards.cpp index 6624b8d514..1494cec563 100644 --- a/buildroot/share/PlatformIO/variants/marlin_maple_MEEB_3DP/wirish/boards.cpp +++ b/buildroot/share/PlatformIO/variants/marlin_maple_MEEB_3DP/wirish/boards.cpp @@ -201,7 +201,7 @@ static void timer_default_config(timer_dev *dev) { switch (dev->type) { case TIMER_ADVANCED: regs->BDTR = TIMER_BDTR_MOE | TIMER_BDTR_LOCK_OFF; - // Fallthrough + // fall-through case TIMER_GENERAL: timer_set_reload(dev, full_overflow); for (uint8 channel = 1; channel <= 4; channel++) { @@ -211,7 +211,7 @@ static void timer_default_config(timer_dev *dev) { TIMER_OC_PE); } } - // Fallthrough + // fall-through case TIMER_BASIC: break; }