🎨 Check flags without ENABLED
This commit is contained in:
@ -536,7 +536,7 @@ void ST7920_Lite_Status_Screen::draw_heat_icon(const bool whichIcon, const bool
|
||||
static struct {
|
||||
bool E1_show_target : 1;
|
||||
bool E2_show_target : 1;
|
||||
#if ENABLED(HAS_HEATED_BED)
|
||||
#if HAS_HEATED_BED
|
||||
bool bed_show_target : 1;
|
||||
#endif
|
||||
} display_state = {
|
||||
|
@ -182,10 +182,10 @@ static uint8_t _card_percent = 0;
|
||||
static uint16_t _remain_time = 0;
|
||||
|
||||
#if ENABLED(PAUSE_HEAT)
|
||||
#if ENABLED(HAS_HOTEND)
|
||||
#if HAS_HOTEND
|
||||
uint16_t resume_hotend_temp = 0;
|
||||
#endif
|
||||
#if ENABLED(HAS_HEATED_BED)
|
||||
#if HAS_HEATED_BED
|
||||
uint16_t resume_bed_temp = 0;
|
||||
#endif
|
||||
#endif
|
||||
|
@ -255,13 +255,13 @@ extern char print_filename[16];
|
||||
extern millis_t dwin_heat_time;
|
||||
|
||||
typedef struct {
|
||||
#if ENABLED(HAS_HOTEND)
|
||||
#if HAS_HOTEND
|
||||
celsius_t E_Temp = 0;
|
||||
#endif
|
||||
#if ENABLED(HAS_HEATED_BED)
|
||||
#if HAS_HEATED_BED
|
||||
celsius_t Bed_Temp = 0;
|
||||
#endif
|
||||
#if ENABLED(HAS_FAN)
|
||||
#if HAS_FAN
|
||||
int16_t Fan_speed = 0;
|
||||
#endif
|
||||
int16_t print_speed = 100;
|
||||
@ -344,13 +344,13 @@ void HMI_Move_E();
|
||||
|
||||
void HMI_Zoffset();
|
||||
|
||||
#if ENABLED(HAS_HOTEND)
|
||||
#if HAS_HOTEND
|
||||
void HMI_ETemp();
|
||||
#endif
|
||||
#if ENABLED(HAS_HEATED_BED)
|
||||
#if HAS_HEATED_BED
|
||||
void HMI_BedTemp();
|
||||
#endif
|
||||
#if ENABLED(HAS_FAN)
|
||||
#if HAS_FAN
|
||||
void HMI_FanSpeed();
|
||||
#endif
|
||||
|
||||
|
@ -622,7 +622,7 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
|
||||
DEBUG_ECHOLNPGM("HandlePreheat");
|
||||
|
||||
uint8_t e_temp = 0;
|
||||
#if ENABLED(HAS_HEATED_BED)
|
||||
#if HAS_HEATED_BED
|
||||
uint8_t bed_temp = 0;
|
||||
#endif
|
||||
const uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "../../ui_api.h"
|
||||
#include "../../../marlinui.h"
|
||||
|
||||
#if ENABLED(HAS_STEALTHCHOP)
|
||||
#if HAS_STEALTHCHOP
|
||||
#include "../../../../module/stepper/trinamic.h"
|
||||
#endif
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
#include "../../../../gcode/gcode.h"
|
||||
|
||||
#if ENABLED(HAS_STEALTHCHOP)
|
||||
#if HAS_STEALTHCHOP
|
||||
#include "../../../../module/stepper/trinamic.h"
|
||||
#include "../../../../module/stepper/indirection.h"
|
||||
#endif
|
||||
@ -396,7 +396,7 @@ void DGUSScreenHandler::Z_offset_select(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
void DGUSScreenHandler::GetOffsetValue(DGUS_VP_Variable &var, void *val_ptr) {
|
||||
|
||||
#if ENABLED(HAS_BED_PROBE)
|
||||
#if HAS_BED_PROBE
|
||||
int32_t value = swap32(*(int32_t *)val_ptr);
|
||||
float Offset = value / 100.0f;
|
||||
DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6);
|
||||
|
@ -122,7 +122,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
|
||||
case 2: GOTO_SCREEN(ZOffsetScreen); break;
|
||||
#endif
|
||||
case 3: GOTO_SCREEN(StepsScreen); break;
|
||||
#if ENABLED(HAS_MULTI_HOTEND)
|
||||
#if HAS_MULTI_HOTEND
|
||||
case 4: GOTO_SCREEN(NozzleOffsetScreen); break;
|
||||
#endif
|
||||
case 5: GOTO_SCREEN(MaxVelocityScreen); break;
|
||||
|
@ -106,7 +106,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) {
|
||||
#if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)
|
||||
case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break;
|
||||
#endif
|
||||
#if ENABLED(HAS_BED_PROBE)
|
||||
#if HAS_BED_PROBE
|
||||
case 3:
|
||||
#ifndef BED_LEVELING_COMMANDS
|
||||
#define BED_LEVELING_COMMANDS "G29"
|
||||
|
@ -49,7 +49,7 @@ static lv_obj_t *labelPause, *labelStop, *labelOperat;
|
||||
static lv_obj_t *bar1, *bar1ValueText;
|
||||
static lv_obj_t *buttonPause, *buttonOperat, *buttonStop, *buttonExt1, *buttonExt2, *buttonBedstate, *buttonFanstate, *buttonZpos;
|
||||
|
||||
#if ENABLED(HAS_MULTI_EXTRUDER)
|
||||
#if HAS_MULTI_EXTRUDER
|
||||
static lv_obj_t *labelExt2;
|
||||
#endif
|
||||
|
||||
|
@ -178,10 +178,10 @@ namespace ExtUI {
|
||||
#if HAS_HEATED_BED
|
||||
case BED: thermalManager.reset_bed_idle_timer(); return;
|
||||
#endif
|
||||
#if ENABLED(HAS_HEATED_CHAMBER)
|
||||
#if HAS_HEATED_CHAMBER
|
||||
case CHAMBER: return; // Chamber has no idle timer
|
||||
#endif
|
||||
#if ENABLED(HAS_COOLER)
|
||||
#if HAS_COOLER
|
||||
case COOLER: return; // Cooler has no idle timer
|
||||
#endif
|
||||
default:
|
||||
@ -241,10 +241,10 @@ namespace ExtUI {
|
||||
bool isHeaterIdle(const heater_t heater) {
|
||||
#if HEATER_IDLE_HANDLER
|
||||
switch (heater) {
|
||||
#if ENABLED(HAS_HEATED_BED)
|
||||
#if HAS_HEATED_BED
|
||||
case BED: return thermalManager.heater_idle[thermalManager.IDLE_INDEX_BED].timed_out;
|
||||
#endif
|
||||
#if ENABLED(HAS_HEATED_CHAMBER)
|
||||
#if HAS_HEATED_CHAMBER
|
||||
case CHAMBER: return false; // Chamber has no idle timer
|
||||
#endif
|
||||
default:
|
||||
@ -264,10 +264,10 @@ namespace ExtUI {
|
||||
|
||||
celsius_float_t getActualTemp_celsius(const heater_t heater) {
|
||||
switch (heater) {
|
||||
#if ENABLED(HAS_HEATED_BED)
|
||||
#if HAS_HEATED_BED
|
||||
case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degBed());
|
||||
#endif
|
||||
#if ENABLED(HAS_HEATED_CHAMBER)
|
||||
#if HAS_HEATED_CHAMBER
|
||||
case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degChamber());
|
||||
#endif
|
||||
default: return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(heater - H0));
|
||||
@ -280,10 +280,10 @@ namespace ExtUI {
|
||||
|
||||
celsius_float_t getTargetTemp_celsius(const heater_t heater) {
|
||||
switch (heater) {
|
||||
#if ENABLED(HAS_HEATED_BED)
|
||||
#if HAS_HEATED_BED
|
||||
case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed());
|
||||
#endif
|
||||
#if ENABLED(HAS_HEATED_CHAMBER)
|
||||
#if HAS_HEATED_CHAMBER
|
||||
case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetChamber());
|
||||
#endif
|
||||
default: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(heater - H0));
|
||||
|
@ -111,13 +111,13 @@
|
||||
|
||||
#if PREHEAT_COUNT
|
||||
typedef struct {
|
||||
#if ENABLED(HAS_HOTEND)
|
||||
#if HAS_HOTEND
|
||||
celsius_t hotend_temp;
|
||||
#endif
|
||||
#if ENABLED(HAS_HEATED_BED)
|
||||
#if HAS_HEATED_BED
|
||||
celsius_t bed_temp;
|
||||
#endif
|
||||
#if ENABLED(HAS_FAN)
|
||||
#if HAS_FAN
|
||||
uint16_t fan_speed;
|
||||
#endif
|
||||
} preheat_t;
|
||||
@ -135,12 +135,12 @@
|
||||
static int8_t constexpr e_index = 0;
|
||||
#endif
|
||||
static millis_t start_time;
|
||||
#if ENABLED(IS_KINEMATIC)
|
||||
#if IS_KINEMATIC
|
||||
static xyze_pos_t all_axes_destination;
|
||||
#endif
|
||||
public:
|
||||
static float menu_scale;
|
||||
#if ENABLED(IS_KINEMATIC)
|
||||
#if IS_KINEMATIC
|
||||
static float offset;
|
||||
#endif
|
||||
template <typename T>
|
||||
|
@ -58,7 +58,7 @@
|
||||
void menu_tmc();
|
||||
void menu_backlash();
|
||||
|
||||
#if ENABLED(HAS_MOTOR_CURRENT_DAC)
|
||||
#if HAS_MOTOR_CURRENT_DAC
|
||||
|
||||
#include "../../feature/dac/stepper_dac.h"
|
||||
|
||||
@ -590,7 +590,7 @@ void menu_advanced_settings() {
|
||||
SUBMENU(MSG_BACKLASH, menu_backlash);
|
||||
#endif
|
||||
|
||||
#if ENABLED(HAS_MOTOR_CURRENT_DAC)
|
||||
#if HAS_MOTOR_CURRENT_DAC
|
||||
SUBMENU(MSG_DRIVE_STRENGTH, menu_dac);
|
||||
#endif
|
||||
#if HAS_MOTOR_CURRENT_PWM
|
||||
|
Reference in New Issue
Block a user