Browse Source

🎨 Check flags without ENABLED

vanilla_fb_2.0.x
Scott Lahteine 3 years ago
parent
commit
78c2eb6876
  1. 4
      Marlin/src/MarlinCore.cpp
  2. 2
      Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp
  3. 2
      Marlin/src/feature/dac/dac_mcp4728.cpp
  4. 2
      Marlin/src/feature/dac/stepper_dac.cpp
  5. 6
      Marlin/src/feature/joystick.h
  6. 12
      Marlin/src/feature/powerloss.h
  7. 2
      Marlin/src/feature/tmc_util.h
  8. 2
      Marlin/src/gcode/calibrate/G33.cpp
  9. 8
      Marlin/src/gcode/calibrate/G34.cpp
  10. 6
      Marlin/src/gcode/feature/digipot/M907-M910.cpp
  11. 2
      Marlin/src/gcode/gcode.cpp
  12. 42
      Marlin/src/gcode/gcode.h
  13. 2
      Marlin/src/gcode/queue.h
  14. 2
      Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
  15. 4
      Marlin/src/lcd/dwin/e3v2/dwin.cpp
  16. 12
      Marlin/src/lcd/dwin/e3v2/dwin.h
  17. 2
      Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp
  18. 2
      Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp
  19. 4
      Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp
  20. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp
  21. 2
      Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp
  22. 2
      Marlin/src/lcd/extui/mks_ui/draw_printing.cpp
  23. 16
      Marlin/src/lcd/extui/ui_api.cpp
  24. 10
      Marlin/src/lcd/marlinui.h
  25. 4
      Marlin/src/lcd/menu/menu_advanced.cpp
  26. 4
      Marlin/src/module/settings.cpp
  27. 14
      Marlin/src/module/temperature.h
  28. 2
      Marlin/src/pins/ramps/pins_DAGOMA_F5.h
  29. 2
      Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h
  30. 2
      Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h
  31. 2
      Marlin/src/sd/cardreader.cpp

4
Marlin/src/MarlinCore.cpp

@ -135,7 +135,7 @@
#include "module/servo.h" #include "module/servo.h"
#endif #endif
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
#include "feature/dac/stepper_dac.h" #include "feature/dac/stepper_dac.h"
#endif #endif
@ -1355,7 +1355,7 @@ void setup() {
SETUP_RUN(digipot_i2c.init()); SETUP_RUN(digipot_i2c.init());
#endif #endif
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
SETUP_RUN(stepper_dac.init()); SETUP_RUN(stepper_dac.init());
#endif #endif

2
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp

@ -307,7 +307,7 @@ void unified_bed_leveling::G29() {
const uint8_t p_val = parser.byteval('P'); const uint8_t p_val = parser.byteval('P');
const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J'); const bool may_move = p_val == 1 || p_val == 2 || p_val == 4 || parser.seen_test('J');
#if ENABLED(HAS_MULTI_HOTEND) #if HAS_MULTI_HOTEND
const uint8_t old_tool_index = active_extruder; const uint8_t old_tool_index = active_extruder;
#endif #endif

2
Marlin/src/feature/dac/dac_mcp4728.cpp

@ -32,7 +32,7 @@
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
#include "dac_mcp4728.h" #include "dac_mcp4728.h"

2
Marlin/src/feature/dac/stepper_dac.cpp

@ -26,7 +26,7 @@
#include "../../inc/MarlinConfig.h" #include "../../inc/MarlinConfig.h"
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
#include "stepper_dac.h" #include "stepper_dac.h"
#include "../../MarlinCore.h" // for SP_X_LBL... #include "../../MarlinCore.h" // for SP_X_LBL...

6
Marlin/src/feature/joystick.h

@ -32,13 +32,13 @@
class Joystick { class Joystick {
friend class Temperature; friend class Temperature;
private: private:
#if ENABLED(HAS_JOY_ADC_X) #if HAS_JOY_ADC_X
static temp_info_t x; static temp_info_t x;
#endif #endif
#if ENABLED(HAS_JOY_ADC_Y) #if HAS_JOY_ADC_Y
static temp_info_t y; static temp_info_t y;
#endif #endif
#if ENABLED(HAS_JOY_ADC_Z) #if HAS_JOY_ADC_Z
static temp_info_t z; static temp_info_t z;
#endif #endif
public: public:

12
Marlin/src/feature/powerloss.h

@ -64,13 +64,13 @@ typedef struct {
Repeat stored_repeat; Repeat stored_repeat;
#endif #endif
#if ENABLED(HAS_HOME_OFFSET) #if HAS_HOME_OFFSET
xyz_pos_t home_offset; xyz_pos_t home_offset;
#endif #endif
#if ENABLED(HAS_POSITION_SHIFT) #if HAS_POSITION_SHIFT
xyz_pos_t position_shift; xyz_pos_t position_shift;
#endif #endif
#if ENABLED(HAS_MULTI_EXTRUDER) #if HAS_MULTI_EXTRUDER
uint8_t active_extruder; uint8_t active_extruder;
#endif #endif
@ -78,13 +78,13 @@ typedef struct {
float filament_size[EXTRUDERS]; float filament_size[EXTRUDERS];
#endif #endif
#if ENABLED(HAS_HOTEND) #if HAS_HOTEND
celsius_t target_temperature[HOTENDS]; celsius_t target_temperature[HOTENDS];
#endif #endif
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
celsius_t target_temperature_bed; celsius_t target_temperature_bed;
#endif #endif
#if ENABLED(HAS_FAN) #if HAS_FAN
uint8_t fan_speed[FAN_COUNT]; uint8_t fan_speed[FAN_COUNT];
#endif #endif

2
Marlin/src/feature/tmc_util.h

@ -363,7 +363,7 @@ void test_tmc_connection(LOGICAL_AXIS_DECL(const bool, true));
struct motion_state_t { struct motion_state_t {
xy_ulong_t acceleration; xy_ulong_t acceleration;
#if ENABLED(HAS_CLASSIC_JERK) #if HAS_CLASSIC_JERK
xy_float_t jerk_state; xy_float_t jerk_state;
#endif #endif
}; };

2
Marlin/src/gcode/calibrate/G33.cpp

@ -63,7 +63,7 @@ enum CalEnum : char { // the 7 main calibration points -
#define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP) #define LOOP_CAL_RAD(VAR) LOOP_CAL_PT(VAR, __A, _7P_STEP)
#define LOOP_CAL_ACT(VAR, _4P, _OP) LOOP_CAL_PT(VAR, _OP ? _AB : __A, _4P ? _4P_STEP : _7P_STEP) #define LOOP_CAL_ACT(VAR, _4P, _OP) LOOP_CAL_PT(VAR, _OP ? _AB : __A, _4P ? _4P_STEP : _7P_STEP)
#if ENABLED(HAS_MULTI_HOTEND) #if HAS_MULTI_HOTEND
const uint8_t old_tool_index = active_extruder; const uint8_t old_tool_index = active_extruder;
#endif #endif

8
Marlin/src/gcode/calibrate/G34.cpp

@ -81,11 +81,11 @@ void GcodeSuite::G34() {
const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT); const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT);
const uint32_t previous_current = stepper.motor_current_setting[Z_AXIS]; const uint32_t previous_current = stepper.motor_current_setting[Z_AXIS];
stepper.set_digipot_current(1, target_current); stepper.set_digipot_current(1, target_current);
#elif ENABLED(HAS_MOTOR_CURRENT_DAC) #elif HAS_MOTOR_CURRENT_DAC
const float target_current = parser.floatval('S', GANTRY_CALIBRATION_CURRENT); const float target_current = parser.floatval('S', GANTRY_CALIBRATION_CURRENT);
const float previous_current = dac_amps(Z_AXIS, target_current); const float previous_current = dac_amps(Z_AXIS, target_current);
stepper_dac.set_current_value(Z_AXIS, target_current); stepper_dac.set_current_value(Z_AXIS, target_current);
#elif ENABLED(HAS_MOTOR_CURRENT_I2C) #elif HAS_MOTOR_CURRENT_I2C
const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT); const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT);
previous_current = dac_amps(Z_AXIS); previous_current = dac_amps(Z_AXIS);
digipot_i2c.set_current(Z_AXIS, target_current) digipot_i2c.set_current(Z_AXIS, target_current)
@ -127,9 +127,9 @@ void GcodeSuite::G34() {
stepper.set_digipot_current(Z_AXIS, previous_current); stepper.set_digipot_current(Z_AXIS, previous_current);
#elif HAS_MOTOR_CURRENT_PWM #elif HAS_MOTOR_CURRENT_PWM
stepper.set_digipot_current(1, previous_current); stepper.set_digipot_current(1, previous_current);
#elif ENABLED(HAS_MOTOR_CURRENT_DAC) #elif HAS_MOTOR_CURRENT_DAC
stepper_dac.set_current_value(Z_AXIS, previous_current); stepper_dac.set_current_value(Z_AXIS, previous_current);
#elif ENABLED(HAS_MOTOR_CURRENT_I2C) #elif HAS_MOTOR_CURRENT_I2C
digipot_i2c.set_current(Z_AXIS, previous_current) digipot_i2c.set_current(Z_AXIS, previous_current)
#elif HAS_TRINAMIC_CONFIG #elif HAS_TRINAMIC_CONFIG
#if AXIS_IS_TMC(Z) #if AXIS_IS_TMC(Z)

6
Marlin/src/gcode/feature/digipot/M907-M910.cpp

@ -34,7 +34,7 @@
#include "../../../feature/digipot/digipot.h" #include "../../../feature/digipot/digipot.h"
#endif #endif
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
#include "../../../feature/dac/stepper_dac.h" #include "../../../feature/dac/stepper_dac.h"
#endif #endif
@ -73,7 +73,7 @@ void GcodeSuite::M907() {
#endif #endif
#endif #endif
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
if (parser.seenval('S')) { if (parser.seenval('S')) {
const float dac_percent = parser.value_float(); const float dac_percent = parser.value_float();
LOOP_LE_N(i, 4) stepper_dac.set_current_percent(i, dac_percent); LOOP_LE_N(i, 4) stepper_dac.set_current_percent(i, dac_percent);
@ -92,7 +92,7 @@ void GcodeSuite::M907() {
TERN_(HAS_MOTOR_CURRENT_DAC, stepper_dac.set_current_value(parser.byteval('P', -1), parser.ushortval('S', 0))); TERN_(HAS_MOTOR_CURRENT_DAC, stepper_dac.set_current_value(parser.byteval('P', -1), parser.ushortval('S', 0)));
} }
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
void GcodeSuite::M909() { stepper_dac.print_values(); } void GcodeSuite::M909() { stepper_dac.print_values(); }
void GcodeSuite::M910() { stepper_dac.commit_eeprom(); } void GcodeSuite::M910() { stepper_dac.commit_eeprom(); }

2
Marlin/src/gcode/gcode.cpp

@ -908,7 +908,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes. case 907: M907(); break; // M907: Set digital trimpot motor current using axis codes.
#if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC)
case 908: M908(); break; // M908: Control digital trimpot directly. case 908: M908(); break; // M908: Control digital trimpot directly.
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
case 909: M909(); break; // M909: Print digipot/DAC current value case 909: M909(); break; // M909: Print digipot/DAC current value
case 910: M910(); break; // M910: Commit digipot/DAC value to external EEPROM case 910: M910(); break; // M910: Commit digipot/DAC value to external EEPROM
#endif #endif

42
Marlin/src/gcode/gcode.h

@ -524,7 +524,7 @@ private:
static void G38(const int8_t subcode); static void G38(const int8_t subcode);
#endif #endif
#if ENABLED(HAS_MESH) #if HAS_MESH
static void G42(); static void G42();
#endif #endif
@ -557,7 +557,7 @@ private:
static void G425(); static void G425();
#endif #endif
#if ENABLED(HAS_RESUME_CONTINUE) #if HAS_RESUME_CONTINUE
static void M0_M1(); static void M0_M1();
#endif #endif
@ -612,7 +612,7 @@ private:
static void M31(); static void M31();
#if ENABLED(SDSUPPORT) #if ENABLED(SDSUPPORT)
#if ENABLED(HAS_MEDIA_SUBCALLS) #if HAS_MEDIA_SUBCALLS
static void M32(); static void M32();
#endif #endif
#if ENABLED(LONG_FILENAME_HOST_SUPPORT) #if ENABLED(LONG_FILENAME_HOST_SUPPORT)
@ -743,7 +743,7 @@ private:
static void M149(); static void M149();
#endif #endif
#if ENABLED(HAS_COLOR_LEDS) #if HAS_COLOR_LEDS
static void M150(); static void M150();
#endif #endif
@ -777,7 +777,7 @@ private:
static void M204(); static void M204();
static void M205(); static void M205();
#if ENABLED(HAS_M206_COMMAND) #if HAS_M206_COMMAND
static void M206(); static void M206();
#endif #endif
@ -791,11 +791,11 @@ private:
static void M211(); static void M211();
#if ENABLED(HAS_MULTI_EXTRUDER) #if HAS_MULTI_EXTRUDER
static void M217(); static void M217();
#endif #endif
#if ENABLED(HAS_HOTEND_OFFSET) #if HAS_HOTEND_OFFSET
static void M218(); static void M218();
#endif #endif
@ -813,7 +813,7 @@ private:
static void M240(); static void M240();
#endif #endif
#if ENABLED(HAS_LCD_CONTRAST) #if HAS_LCD_CONTRAST
static void M250(); static void M250();
#endif #endif
@ -833,7 +833,7 @@ private:
static void M290(); static void M290();
#endif #endif
#if ENABLED(HAS_BUZZER) #if HAS_BUZZER
static void M300(); static void M300();
#endif #endif
@ -845,7 +845,7 @@ private:
static void M302(); static void M302();
#endif #endif
#if ENABLED(HAS_PID_HEATING) #if HAS_PID_HEATING
static void M303(); static void M303();
#endif #endif
@ -853,7 +853,7 @@ private:
static void M304(); static void M304();
#endif #endif
#if ENABLED(HAS_USER_THERMISTORS) #if HAS_USER_THERMISTORS
static void M305(); static void M305();
#endif #endif
@ -894,7 +894,7 @@ private:
static void M402(); static void M402();
#endif #endif
#if ENABLED(HAS_PRUSA_MMU2) #if HAS_PRUSA_MMU2
static void M403(); static void M403();
#endif #endif
@ -905,11 +905,11 @@ private:
static void M407(); static void M407();
#endif #endif
#if ENABLED(HAS_FILAMENT_SENSOR) #if HAS_FILAMENT_SENSOR
static void M412(); static void M412();
#endif #endif
#if ENABLED(HAS_MULTI_LANGUAGE) #if HAS_MULTI_LANGUAGE
static void M414(); static void M414();
#endif #endif
@ -922,11 +922,11 @@ private:
static void M425(); static void M425();
#endif #endif
#if ENABLED(HAS_M206_COMMAND) #if HAS_M206_COMMAND
static void M428(); static void M428();
#endif #endif
#if ENABLED(HAS_POWER_MONITOR) #if HAS_POWER_MONITOR
static void M430(); static void M430();
#endif #endif
@ -977,11 +977,11 @@ private:
static void M603(); static void M603();
#endif #endif
#if ENABLED(HAS_DUPLICATION_MODE) #if HAS_DUPLICATION_MODE
static void M605(); static void M605();
#endif #endif
#if ENABLED(IS_KINEMATIC) #if IS_KINEMATIC
static void M665(); static void M665();
#endif #endif
@ -1006,7 +1006,7 @@ private:
static void M810_819(); static void M810_819();
#endif #endif
#if ENABLED(HAS_BED_PROBE) #if HAS_BED_PROBE
static void M851(); static void M851();
#endif #endif
@ -1039,7 +1039,7 @@ private:
#if HAS_TRINAMIC_CONFIG #if HAS_TRINAMIC_CONFIG
static void M122(); static void M122();
static void M906(); static void M906();
#if ENABLED(HAS_STEALTHCHOP) #if HAS_STEALTHCHOP
static void M569(); static void M569();
#endif #endif
#if ENABLED(MONITOR_DRIVER_STATUS) #if ENABLED(MONITOR_DRIVER_STATUS)
@ -1066,7 +1066,7 @@ private:
static void M907(); static void M907();
#if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC) #if EITHER(HAS_MOTOR_CURRENT_SPI, HAS_MOTOR_CURRENT_DAC)
static void M908(); static void M908();
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
static void M909(); static void M909();
static void M910(); static void M910();
#endif #endif

2
Marlin/src/gcode/queue.h

@ -59,7 +59,7 @@ public:
struct CommandLine { struct CommandLine {
char buffer[MAX_CMD_SIZE]; //!< The command buffer char buffer[MAX_CMD_SIZE]; //!< The command buffer
bool skip_ok; //!< Skip sending ok when command is processed? bool skip_ok; //!< Skip sending ok when command is processed?
#if ENABLED(HAS_MULTI_SERIAL) #if HAS_MULTI_SERIAL
serial_index_t port; //!< Serial port the command was received on serial_index_t port; //!< Serial port the command was received on
#endif #endif
}; };

2
Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp

@ -536,7 +536,7 @@ void ST7920_Lite_Status_Screen::draw_heat_icon(const bool whichIcon, const bool
static struct { static struct {
bool E1_show_target : 1; bool E1_show_target : 1;
bool E2_show_target : 1; bool E2_show_target : 1;
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
bool bed_show_target : 1; bool bed_show_target : 1;
#endif #endif
} display_state = { } display_state = {

4
Marlin/src/lcd/dwin/e3v2/dwin.cpp

@ -182,10 +182,10 @@ static uint8_t _card_percent = 0;
static uint16_t _remain_time = 0; static uint16_t _remain_time = 0;
#if ENABLED(PAUSE_HEAT) #if ENABLED(PAUSE_HEAT)
#if ENABLED(HAS_HOTEND) #if HAS_HOTEND
uint16_t resume_hotend_temp = 0; uint16_t resume_hotend_temp = 0;
#endif #endif
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
uint16_t resume_bed_temp = 0; uint16_t resume_bed_temp = 0;
#endif #endif
#endif #endif

12
Marlin/src/lcd/dwin/e3v2/dwin.h

@ -255,13 +255,13 @@ extern char print_filename[16];
extern millis_t dwin_heat_time; extern millis_t dwin_heat_time;
typedef struct { typedef struct {
#if ENABLED(HAS_HOTEND) #if HAS_HOTEND
celsius_t E_Temp = 0; celsius_t E_Temp = 0;
#endif #endif
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
celsius_t Bed_Temp = 0; celsius_t Bed_Temp = 0;
#endif #endif
#if ENABLED(HAS_FAN) #if HAS_FAN
int16_t Fan_speed = 0; int16_t Fan_speed = 0;
#endif #endif
int16_t print_speed = 100; int16_t print_speed = 100;
@ -344,13 +344,13 @@ void HMI_Move_E();
void HMI_Zoffset(); void HMI_Zoffset();
#if ENABLED(HAS_HOTEND) #if HAS_HOTEND
void HMI_ETemp(); void HMI_ETemp();
#endif #endif
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
void HMI_BedTemp(); void HMI_BedTemp();
#endif #endif
#if ENABLED(HAS_FAN) #if HAS_FAN
void HMI_FanSpeed(); void HMI_FanSpeed();
#endif #endif

2
Marlin/src/lcd/extui/dgus/DGUSScreenHandler.cpp

@ -622,7 +622,7 @@ void DGUSScreenHandler::HandleHeaterControl(DGUS_VP_Variable &var, void *val_ptr
DEBUG_ECHOLNPGM("HandlePreheat"); DEBUG_ECHOLNPGM("HandlePreheat");
uint8_t e_temp = 0; uint8_t e_temp = 0;
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
uint8_t bed_temp = 0; uint8_t bed_temp = 0;
#endif #endif
const uint16_t preheat_option = swap16(*(uint16_t*)val_ptr); const uint16_t preheat_option = swap16(*(uint16_t*)val_ptr);

2
Marlin/src/lcd/extui/dgus/mks/DGUSDisplayDef.cpp

@ -35,7 +35,7 @@
#include "../../ui_api.h" #include "../../ui_api.h"
#include "../../../marlinui.h" #include "../../../marlinui.h"
#if ENABLED(HAS_STEALTHCHOP) #if HAS_STEALTHCHOP
#include "../../../../module/stepper/trinamic.h" #include "../../../../module/stepper/trinamic.h"
#endif #endif

4
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp

@ -37,7 +37,7 @@
#include "../../../../gcode/gcode.h" #include "../../../../gcode/gcode.h"
#if ENABLED(HAS_STEALTHCHOP) #if HAS_STEALTHCHOP
#include "../../../../module/stepper/trinamic.h" #include "../../../../module/stepper/trinamic.h"
#include "../../../../module/stepper/indirection.h" #include "../../../../module/stepper/indirection.h"
#endif #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) { 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); int32_t value = swap32(*(int32_t *)val_ptr);
float Offset = value / 100.0f; float Offset = value / 100.0f;
DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6); DEBUG_ECHOLNPAIR_F("\nget int6 offset >> ", value, 6);

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/advanced_settings_menu.cpp

@ -122,7 +122,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
case 2: GOTO_SCREEN(ZOffsetScreen); break; case 2: GOTO_SCREEN(ZOffsetScreen); break;
#endif #endif
case 3: GOTO_SCREEN(StepsScreen); break; case 3: GOTO_SCREEN(StepsScreen); break;
#if ENABLED(HAS_MULTI_HOTEND) #if HAS_MULTI_HOTEND
case 4: GOTO_SCREEN(NozzleOffsetScreen); break; case 4: GOTO_SCREEN(NozzleOffsetScreen); break;
#endif #endif
case 5: GOTO_SCREEN(MaxVelocityScreen); break; case 5: GOTO_SCREEN(MaxVelocityScreen); break;

2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp

@ -106,7 +106,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) {
#if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION) #if EITHER(Z_STEPPER_AUTO_ALIGN,MECHANICAL_GANTRY_CALIBRATION)
case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break; case 2: SpinnerDialogBox::enqueueAndWait_P(F("G34")); break;
#endif #endif
#if ENABLED(HAS_BED_PROBE) #if HAS_BED_PROBE
case 3: case 3:
#ifndef BED_LEVELING_COMMANDS #ifndef BED_LEVELING_COMMANDS
#define BED_LEVELING_COMMANDS "G29" #define BED_LEVELING_COMMANDS "G29"

2
Marlin/src/lcd/extui/mks_ui/draw_printing.cpp

@ -49,7 +49,7 @@ static lv_obj_t *labelPause, *labelStop, *labelOperat;
static lv_obj_t *bar1, *bar1ValueText; static lv_obj_t *bar1, *bar1ValueText;
static lv_obj_t *buttonPause, *buttonOperat, *buttonStop, *buttonExt1, *buttonExt2, *buttonBedstate, *buttonFanstate, *buttonZpos; 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; static lv_obj_t *labelExt2;
#endif #endif

16
Marlin/src/lcd/extui/ui_api.cpp

@ -178,10 +178,10 @@ namespace ExtUI {
#if HAS_HEATED_BED #if HAS_HEATED_BED
case BED: thermalManager.reset_bed_idle_timer(); return; case BED: thermalManager.reset_bed_idle_timer(); return;
#endif #endif
#if ENABLED(HAS_HEATED_CHAMBER) #if HAS_HEATED_CHAMBER
case CHAMBER: return; // Chamber has no idle timer case CHAMBER: return; // Chamber has no idle timer
#endif #endif
#if ENABLED(HAS_COOLER) #if HAS_COOLER
case COOLER: return; // Cooler has no idle timer case COOLER: return; // Cooler has no idle timer
#endif #endif
default: default:
@ -241,10 +241,10 @@ namespace ExtUI {
bool isHeaterIdle(const heater_t heater) { bool isHeaterIdle(const heater_t heater) {
#if HEATER_IDLE_HANDLER #if HEATER_IDLE_HANDLER
switch (heater) { switch (heater) {
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
case BED: return thermalManager.heater_idle[thermalManager.IDLE_INDEX_BED].timed_out; case BED: return thermalManager.heater_idle[thermalManager.IDLE_INDEX_BED].timed_out;
#endif #endif
#if ENABLED(HAS_HEATED_CHAMBER) #if HAS_HEATED_CHAMBER
case CHAMBER: return false; // Chamber has no idle timer case CHAMBER: return false; // Chamber has no idle timer
#endif #endif
default: default:
@ -264,10 +264,10 @@ namespace ExtUI {
celsius_float_t getActualTemp_celsius(const heater_t heater) { celsius_float_t getActualTemp_celsius(const heater_t heater) {
switch (heater) { switch (heater) {
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degBed()); case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degBed());
#endif #endif
#if ENABLED(HAS_HEATED_CHAMBER) #if HAS_HEATED_CHAMBER
case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degChamber()); case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degChamber());
#endif #endif
default: return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(heater - H0)); default: return GET_TEMP_ADJUSTMENT(thermalManager.degHotend(heater - H0));
@ -280,10 +280,10 @@ namespace ExtUI {
celsius_float_t getTargetTemp_celsius(const heater_t heater) { celsius_float_t getTargetTemp_celsius(const heater_t heater) {
switch (heater) { switch (heater) {
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed()); case BED: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetBed());
#endif #endif
#if ENABLED(HAS_HEATED_CHAMBER) #if HAS_HEATED_CHAMBER
case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetChamber()); case CHAMBER: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetChamber());
#endif #endif
default: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(heater - H0)); default: return GET_TEMP_ADJUSTMENT(thermalManager.degTargetHotend(heater - H0));

10
Marlin/src/lcd/marlinui.h

@ -111,13 +111,13 @@
#if PREHEAT_COUNT #if PREHEAT_COUNT
typedef struct { typedef struct {
#if ENABLED(HAS_HOTEND) #if HAS_HOTEND
celsius_t hotend_temp; celsius_t hotend_temp;
#endif #endif
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
celsius_t bed_temp; celsius_t bed_temp;
#endif #endif
#if ENABLED(HAS_FAN) #if HAS_FAN
uint16_t fan_speed; uint16_t fan_speed;
#endif #endif
} preheat_t; } preheat_t;
@ -135,12 +135,12 @@
static int8_t constexpr e_index = 0; static int8_t constexpr e_index = 0;
#endif #endif
static millis_t start_time; static millis_t start_time;
#if ENABLED(IS_KINEMATIC) #if IS_KINEMATIC
static xyze_pos_t all_axes_destination; static xyze_pos_t all_axes_destination;
#endif #endif
public: public:
static float menu_scale; static float menu_scale;
#if ENABLED(IS_KINEMATIC) #if IS_KINEMATIC
static float offset; static float offset;
#endif #endif
template <typename T> template <typename T>

4
Marlin/src/lcd/menu/menu_advanced.cpp

@ -58,7 +58,7 @@
void menu_tmc(); void menu_tmc();
void menu_backlash(); void menu_backlash();
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
#include "../../feature/dac/stepper_dac.h" #include "../../feature/dac/stepper_dac.h"
@ -590,7 +590,7 @@ void menu_advanced_settings() {
SUBMENU(MSG_BACKLASH, menu_backlash); SUBMENU(MSG_BACKLASH, menu_backlash);
#endif #endif
#if ENABLED(HAS_MOTOR_CURRENT_DAC) #if HAS_MOTOR_CURRENT_DAC
SUBMENU(MSG_DRIVE_STRENGTH, menu_dac); SUBMENU(MSG_DRIVE_STRENGTH, menu_dac);
#endif #endif
#if HAS_MOTOR_CURRENT_PWM #if HAS_MOTOR_CURRENT_PWM

4
Marlin/src/module/settings.cpp

@ -3818,10 +3818,10 @@ void MarlinSettings::reset() {
SERIAL_CHAR(' ', 'B'); // B (maps to E1 by default) SERIAL_CHAR(' ', 'B'); // B (maps to E1 by default)
SERIAL_ECHOLN(stepper.motor_current_setting[4]); SERIAL_ECHOLN(stepper.motor_current_setting[4]);
#endif #endif
#elif ENABLED(HAS_MOTOR_CURRENT_I2C) // i2c-based has any number of values #elif HAS_MOTOR_CURRENT_I2C // i2c-based has any number of values
// Values sent over i2c are not stored. // Values sent over i2c are not stored.
// Indexes map directly to drivers, not axes. // Indexes map directly to drivers, not axes.
#elif ENABLED(HAS_MOTOR_CURRENT_DAC) // DAC-based has 4 values, for X Y Z (I J K) E #elif HAS_MOTOR_CURRENT_DAC // DAC-based has 4 values, for X Y Z (I J K) E
// Values sent over i2c are not stored. Uses indirect mapping. // Values sent over i2c are not stored. Uses indirect mapping.
#endif #endif

14
Marlin/src/module/temperature.h

@ -340,16 +340,16 @@ class Temperature {
static const celsius_t hotend_maxtemp[HOTENDS]; static const celsius_t hotend_maxtemp[HOTENDS];
static inline celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); } static inline celsius_t hotend_max_target(const uint8_t e) { return hotend_maxtemp[e] - (HOTEND_OVERSHOOT); }
#endif #endif
#if ENABLED(HAS_HEATED_BED) #if HAS_HEATED_BED
static bed_info_t temp_bed; static bed_info_t temp_bed;
#endif #endif
#if ENABLED(HAS_TEMP_PROBE) #if HAS_TEMP_PROBE
static probe_info_t temp_probe; static probe_info_t temp_probe;
#endif #endif
#if ENABLED(HAS_TEMP_CHAMBER) #if HAS_TEMP_CHAMBER
static chamber_info_t temp_chamber; static chamber_info_t temp_chamber;
#endif #endif
#if ENABLED(HAS_TEMP_COOLER) #if HAS_TEMP_COOLER
static cooler_info_t temp_cooler; static cooler_info_t temp_cooler;
#endif #endif
#if HAS_TEMP_REDUNDANT #if HAS_TEMP_REDUNDANT
@ -441,7 +441,7 @@ class Temperature {
static lpq_ptr_t lpq_ptr; static lpq_ptr_t lpq_ptr;
#endif #endif
#if ENABLED(HAS_HOTEND) #if HAS_HOTEND
static temp_range_t temp_range[HOTENDS]; static temp_range_t temp_range[HOTENDS];
#endif #endif
@ -477,7 +477,7 @@ class Temperature {
static millis_t preheat_end_time[HOTENDS]; static millis_t preheat_end_time[HOTENDS];
#endif #endif
#if ENABLED(HAS_AUTO_FAN) #if HAS_AUTO_FAN
static millis_t next_auto_fan_check_ms; static millis_t next_auto_fan_check_ms;
#endif #endif
@ -920,7 +920,7 @@ class Temperature {
static void checkExtruderAutoFans(); static void checkExtruderAutoFans();
#if ENABLED(HAS_HOTEND) #if HAS_HOTEND
static float get_pid_output_hotend(const uint8_t e); static float get_pid_output_hotend(const uint8_t e);
#endif #endif
#if ENABLED(PIDTEMPBED) #if ENABLED(PIDTEMPBED)

2
Marlin/src/pins/ramps/pins_DAGOMA_F5.h

@ -51,7 +51,7 @@
// //
// DAC steppers // DAC steppers
// //
#define HAS_MOTOR_CURRENT_DAC #define HAS_MOTOR_CURRENT_DAC 1
#define DAC_STEPPER_ORDER { 0, 1, 2, 3 } #define DAC_STEPPER_ORDER { 0, 1, 2, 3 }

2
Marlin/src/pins/ramps/pins_RIGIDBOARD_V2.h

@ -34,7 +34,7 @@
// //
// I2C based DAC like on the Printrboard REVF // I2C based DAC like on the Printrboard REVF
#define HAS_MOTOR_CURRENT_DAC #define HAS_MOTOR_CURRENT_DAC 1
// Channels available for DAC, For Rigidboard there are 4 // Channels available for DAC, For Rigidboard there are 4
#define DAC_STEPPER_ORDER { 0, 1, 2, 3 } #define DAC_STEPPER_ORDER { 0, 1, 2, 3 }

2
Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h

@ -141,7 +141,7 @@
#endif // NO_EXTRUDRBOARD #endif // NO_EXTRUDRBOARD
// Enable control of stepper motor currents with the I2C based MCP4728 DAC used on Printrboard REVF // Enable control of stepper motor currents with the I2C based MCP4728 DAC used on Printrboard REVF
#define HAS_MOTOR_CURRENT_DAC #define HAS_MOTOR_CURRENT_DAC 1
// Set default drive strength percents if not already defined - X, Y, Z, E axis // Set default drive strength percents if not already defined - X, Y, Z, E axis
#ifndef DAC_MOTOR_CURRENT_DEFAULT #ifndef DAC_MOTOR_CURRENT_DEFAULT

2
Marlin/src/sd/cardreader.cpp

@ -1123,7 +1123,7 @@ void CardReader::cdroot() {
#if DISABLED(SDSORT_USES_RAM) #if DISABLED(SDSORT_USES_RAM)
selectFileByIndex(o1); // Pre-fetch the first entry and save it selectFileByIndex(o1); // Pre-fetch the first entry and save it
strcpy(name1, longest_filename()); // so the loop only needs one fetch strcpy(name1, longest_filename()); // so the loop only needs one fetch
#if ENABLED(HAS_FOLDER_SORTING) #if HAS_FOLDER_SORTING
bool dir1 = flag.filenameIsDir; bool dir1 = flag.filenameIsDir;
#endif #endif
#endif #endif

Loading…
Cancel
Save