Skip to content

Commit

Permalink
Apply shorthand option macros
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Sep 2, 2019
1 parent a2e412c commit 4078f26
Show file tree
Hide file tree
Showing 18 changed files with 37 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.enabled(0)
#endif
.tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Nozzle Offset"))
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
.enabled(1)
#else
.enabled(0)
Expand Down Expand Up @@ -174,7 +174,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
#endif
case 9: GOTO_SCREEN(InterfaceSettingsScreen); LockScreen::check_passcode(); break;
case 10: GOTO_SCREEN(RestoreFailsafeDialogBox); LockScreen::check_passcode(); break;
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
case 11: GOTO_SCREEN(FilamentMenu); break;
#endif
case 12: GOTO_SCREEN(EndstopStatesScreen); break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BACKLASH_GCODE)
#if BOTH(LULZBOT_TOUCH_UI, BACKLASH_GCODE)

#include "screens.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(CALIBRATION_GCODE)
#if BOTH(LULZBOT_TOUCH_UI, CALIBRATION_GCODE)

#include "screens.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)

#include "screens.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)

#include "screens.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(FILAMENT_RUNOUT_SENSOR)
#if BOTH(LULZBOT_TOUCH_UI, FILAMENT_RUNOUT_SENSOR)

#include "screens.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(JUNCTION_DEVIATION)
#if BOTH(LULZBOT_TOUCH_UI, JUNCTION_DEVIATION)

#include "screens.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(LIN_ADVANCE)
#if BOTH(LULZBOT_TOUCH_UI, LIN_ADVANCE)

#include "screens.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BABYSTEPPING)
#if BOTH(LULZBOT_TOUCH_UI, BABYSTEPPING)

#include "screens.h"
#include "screen_data.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ SCREEN_TABLE {
#else
DECL_SCREEN(JerkScreen),
#endif
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
DECL_SCREEN(FilamentMenu),
#endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR)
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/screens.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ enum {
#else
JERK_SCREEN_CACHE,
#endif
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
FILAMENT_MENU_CACHE,
#endif
#if ENABLED(LIN_ADVANCE)
Expand Down Expand Up @@ -490,7 +490,7 @@ class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public Cac
};
#endif

#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen<FILAMENT_MENU_CACHE> {
public:
static void onRedraw(draw_mode_t);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(PRINTCOUNTER)
#if BOTH(LULZBOT_TOUCH_UI, PRINTCOUNTER)

#include "screens.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)

#include "screens.h"
#include "screen_data.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)

#include "screens.h"

Expand Down
12 changes: 5 additions & 7 deletions Marlin/src/lcd/extensible_ui/lib/lulzbot/screens/tune_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
#ifdef TOUCH_UI_PORTRAIT
.tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(2,1), F("Temperature"))
.tag(3).enabled(!isPrinting()).button( BTN_POS(1,2), BTN_SIZE(2,1), F("Change Filament"))
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
.enabled(1)
#else
.enabled(0)
Expand Down Expand Up @@ -118,7 +118,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
.enabled(0)
#endif
.tag(8). button( BTN_POS(2,3), BTN_SIZE(1,1), F("Cancel Print"))
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
.enabled(1)
#else
.enabled(0)
Expand All @@ -141,10 +141,8 @@ bool TuneMenu::onTouchEnd(uint8_t tag) {
case 4:
#if ENABLED(BABYSTEPPING)
GOTO_SCREEN(NudgeNozzleScreen);
#else
#if HAS_BED_PROBE
GOTO_SCREEN(ZOffsetScreen);
#endif
#elif HAS_BED_PROBE
GOTO_SCREEN(ZOffsetScreen);
#endif
break;
case 5: GOTO_SCREEN(FeedratePercentScreen); break;
Expand All @@ -155,7 +153,7 @@ bool TuneMenu::onTouchEnd(uint8_t tag) {
current_screen.forget();
PUSH_SCREEN(StatusScreen);
break;
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR)
#if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
case 9: GOTO_SCREEN(FilamentMenu); break;
#endif
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#include "../config.h"

#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS)
#if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)

#include "screens.h"

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32/pins_FYSETC_CHEETAH.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270

#if ENABLED(FYSETC_MINI_12864) || ENABLED(U8GLIB_ST7920)
#if EITHER(FYSETC_MINI_12864, U8GLIB_ST7920)
#define FORCE_SOFT_SPI
#endif
#endif
Expand Down
28 changes: 14 additions & 14 deletions config/examples/Formbot/Raptor/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@
* If a UART connection is used to configure the driver, please select that as well in Configuration_adv.h.
*/
//#define X_2208
//#define X_SpreadCycle
//#define X_SPREADCYCLE
//#define Y_2208
//#define Y_SpreadCycle
//#define Y_SPREADCYCLE
//#define E_2208
//#define E_SpreadCycle
//#define E_SPREADCYCLE


/**
Expand Down Expand Up @@ -788,25 +788,25 @@
* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
*/
#if ENABLED(X_2208)
#if ENABLED(X_SpreadCycle)
#define x_accel 1750
#if ENABLED(X_SPREADCYCLE)
#define X_ACCEL 1750
#else
#define x_accel 1000
#define X_ACCEL 1000
#endif
#else
#define x_accel 1500
#define X_ACCEL 1500
#endif

#if ENABLED(Y_2208)
#if ENABLED(Y_SpreadCycle)
#define y_accel 500
#if ENABLED(Y_SPREADCYCLE)
#define Y_ACCEL 500
#else
#define y_accel 300
#define Y_ACCEL 300
#endif
#else
#define y_accel 500
#define Y_ACCEL 500
#endif
#define DEFAULT_MAX_ACCELERATION { x_accel, y_accel, 400, 4000 }
#define DEFAULT_MAX_ACCELERATION { X_ACCEL, Y_ACCEL, 400, 4000 }

/**
* Default Acceleration (change/s) change = mm/s
Expand Down Expand Up @@ -843,12 +843,12 @@
* value set here, it may happen instantaneously.
*/
#if DISABLED(JUNCTION_DEVIATION)
#if ENABLED(X_SpreadCycle) || DISABLED(X_2208)
#if ENABLED(X_SPREADCYCLE) || DISABLED(X_2208)
#define DEFAULT_XJERK 20.0
#else
#define DEFAULT_XJERK 10.0
#endif
#if ENABLED(Y_SpreadCycle) || DISABLED(Y_2208)
#if ENABLED(Y_SPREADCYCLE) || DISABLED(Y_2208)
#define DEFAULT_YJERK 10.0
#else
#define DEFAULT_YJERK 5.0
Expand Down

0 comments on commit 4078f26

Please sign in to comment.