Apply shorthand option macros

This commit is contained in:
Scott Lahteine 2019-09-01 23:43:38 -05:00
parent a2e412c0ce
commit 4078f2672e
18 changed files with 37 additions and 39 deletions

View File

@ -70,7 +70,7 @@ void AdvancedSettingsMenu::onRedraw(draw_mode_t what) {
.enabled(0) .enabled(0)
#endif #endif
.tag(4) .button( BTN_POS(1,2), BTN_SIZE(1,1), F("Nozzle Offset")) .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) .enabled(1)
#else #else
.enabled(0) .enabled(0)
@ -174,7 +174,7 @@ bool AdvancedSettingsMenu::onTouchEnd(uint8_t tag) {
#endif #endif
case 9: GOTO_SCREEN(InterfaceSettingsScreen); LockScreen::check_passcode(); break; case 9: GOTO_SCREEN(InterfaceSettingsScreen); LockScreen::check_passcode(); break;
case 10: GOTO_SCREEN(RestoreFailsafeDialogBox); 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; case 11: GOTO_SCREEN(FilamentMenu); break;
#endif #endif
case 12: GOTO_SCREEN(EndstopStatesScreen); break; case 12: GOTO_SCREEN(EndstopStatesScreen); break;

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BACKLASH_GCODE) #if BOTH(LULZBOT_TOUCH_UI, BACKLASH_GCODE)
#include "screens.h" #include "screens.h"

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(CALIBRATION_GCODE) #if BOTH(LULZBOT_TOUCH_UI, CALIBRATION_GCODE)
#include "screens.h" #include "screens.h"

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) #if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
#include "screens.h" #include "screens.h"

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) #if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
#include "screens.h" #include "screens.h"

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(FILAMENT_RUNOUT_SENSOR) #if BOTH(LULZBOT_TOUCH_UI, FILAMENT_RUNOUT_SENSOR)
#include "screens.h" #include "screens.h"

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(JUNCTION_DEVIATION) #if BOTH(LULZBOT_TOUCH_UI, JUNCTION_DEVIATION)
#include "screens.h" #include "screens.h"

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(LIN_ADVANCE) #if BOTH(LULZBOT_TOUCH_UI, LIN_ADVANCE)
#include "screens.h" #include "screens.h"

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(BABYSTEPPING) #if BOTH(LULZBOT_TOUCH_UI, BABYSTEPPING)
#include "screens.h" #include "screens.h"
#include "screen_data.h" #include "screen_data.h"

View File

@ -76,7 +76,7 @@ SCREEN_TABLE {
#else #else
DECL_SCREEN(JerkScreen), DECL_SCREEN(JerkScreen),
#endif #endif
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
DECL_SCREEN(FilamentMenu), DECL_SCREEN(FilamentMenu),
#endif #endif
#if ENABLED(FILAMENT_RUNOUT_SENSOR) #if ENABLED(FILAMENT_RUNOUT_SENSOR)

View File

@ -60,7 +60,7 @@ enum {
#else #else
JERK_SCREEN_CACHE, JERK_SCREEN_CACHE,
#endif #endif
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
FILAMENT_MENU_CACHE, FILAMENT_MENU_CACHE,
#endif #endif
#if ENABLED(LIN_ADVANCE) #if ENABLED(LIN_ADVANCE)
@ -490,7 +490,7 @@ class DefaultAccelerationScreen : public BaseNumericAdjustmentScreen, public Cac
}; };
#endif #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> { class FilamentMenu : public BaseNumericAdjustmentScreen, public CachedScreen<FILAMENT_MENU_CACHE> {
public: public:
static void onRedraw(draw_mode_t); static void onRedraw(draw_mode_t);

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(PRINTCOUNTER) #if BOTH(LULZBOT_TOUCH_UI, PRINTCOUNTER)
#include "screens.h" #include "screens.h"

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) #if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
#include "screens.h" #include "screens.h"
#include "screen_data.h" #include "screen_data.h"

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) #if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
#include "screens.h" #include "screens.h"

View File

@ -54,7 +54,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
#ifdef TOUCH_UI_PORTRAIT #ifdef TOUCH_UI_PORTRAIT
.tag(2).enabled(1) .button( BTN_POS(1,1), BTN_SIZE(2,1), F("Temperature")) .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")) .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) .enabled(1)
#else #else
.enabled(0) .enabled(0)
@ -118,7 +118,7 @@ void TuneMenu::onRedraw(draw_mode_t what) {
.enabled(0) .enabled(0)
#endif #endif
.tag(8). button( BTN_POS(2,3), BTN_SIZE(1,1), F("Cancel Print")) .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) .enabled(1)
#else #else
.enabled(0) .enabled(0)
@ -141,10 +141,8 @@ bool TuneMenu::onTouchEnd(uint8_t tag) {
case 4: case 4:
#if ENABLED(BABYSTEPPING) #if ENABLED(BABYSTEPPING)
GOTO_SCREEN(NudgeNozzleScreen); GOTO_SCREEN(NudgeNozzleScreen);
#else #elif HAS_BED_PROBE
#if HAS_BED_PROBE GOTO_SCREEN(ZOffsetScreen);
GOTO_SCREEN(ZOffsetScreen);
#endif
#endif #endif
break; break;
case 5: GOTO_SCREEN(FeedratePercentScreen); break; case 5: GOTO_SCREEN(FeedratePercentScreen); break;
@ -155,7 +153,7 @@ bool TuneMenu::onTouchEnd(uint8_t tag) {
current_screen.forget(); current_screen.forget();
PUSH_SCREEN(StatusScreen); PUSH_SCREEN(StatusScreen);
break; break;
#if ENABLED(LIN_ADVANCE) || ENABLED(FILAMENT_RUNOUT_SENSOR) #if EITHER(LIN_ADVANCE, FILAMENT_RUNOUT_SENSOR)
case 9: GOTO_SCREEN(FilamentMenu); break; case 9: GOTO_SCREEN(FilamentMenu); break;
#endif #endif
default: default:

View File

@ -22,7 +22,7 @@
#include "../config.h" #include "../config.h"
#if ENABLED(LULZBOT_TOUCH_UI) && ENABLED(DEVELOPER_SCREENS) #if BOTH(LULZBOT_TOUCH_UI, DEVELOPER_SCREENS)
#include "screens.h" #include "screens.h"

View File

@ -118,7 +118,7 @@
//#define LCD_SCREEN_ROT_180 //#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270 //#define LCD_SCREEN_ROT_270
#if ENABLED(FYSETC_MINI_12864) || ENABLED(U8GLIB_ST7920) #if EITHER(FYSETC_MINI_12864, U8GLIB_ST7920)
#define FORCE_SOFT_SPI #define FORCE_SOFT_SPI
#endif #endif
#endif #endif

View File

@ -82,11 +82,11 @@
* If a UART connection is used to configure the driver, please select that as well in Configuration_adv.h. * If a UART connection is used to configure the driver, please select that as well in Configuration_adv.h.
*/ */
//#define X_2208 //#define X_2208
//#define X_SpreadCycle //#define X_SPREADCYCLE
//#define Y_2208 //#define Y_2208
//#define Y_SpreadCycle //#define Y_SPREADCYCLE
//#define E_2208 //#define E_2208
//#define E_SpreadCycle //#define E_SPREADCYCLE
/** /**
@ -788,25 +788,25 @@
* X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]] * X, Y, Z, E0 [, E1[, E2[, E3[, E4[, E5]]]]]
*/ */
#if ENABLED(X_2208) #if ENABLED(X_2208)
#if ENABLED(X_SpreadCycle) #if ENABLED(X_SPREADCYCLE)
#define x_accel 1750 #define X_ACCEL 1750
#else #else
#define x_accel 1000 #define X_ACCEL 1000
#endif #endif
#else #else
#define x_accel 1500 #define X_ACCEL 1500
#endif #endif
#if ENABLED(Y_2208) #if ENABLED(Y_2208)
#if ENABLED(Y_SpreadCycle) #if ENABLED(Y_SPREADCYCLE)
#define y_accel 500 #define Y_ACCEL 500
#else #else
#define y_accel 300 #define Y_ACCEL 300
#endif #endif
#else #else
#define y_accel 500 #define Y_ACCEL 500
#endif #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 * Default Acceleration (change/s) change = mm/s
@ -843,12 +843,12 @@
* value set here, it may happen instantaneously. * value set here, it may happen instantaneously.
*/ */
#if DISABLED(JUNCTION_DEVIATION) #if DISABLED(JUNCTION_DEVIATION)
#if ENABLED(X_SpreadCycle) || DISABLED(X_2208) #if ENABLED(X_SPREADCYCLE) || DISABLED(X_2208)
#define DEFAULT_XJERK 20.0 #define DEFAULT_XJERK 20.0
#else #else
#define DEFAULT_XJERK 10.0 #define DEFAULT_XJERK 10.0
#endif #endif
#if ENABLED(Y_SpreadCycle) || DISABLED(Y_2208) #if ENABLED(Y_SPREADCYCLE) || DISABLED(Y_2208)
#define DEFAULT_YJERK 10.0 #define DEFAULT_YJERK 10.0
#else #else
#define DEFAULT_YJERK 5.0 #define DEFAULT_YJERK 5.0