Apply shorthand option macros

2.0.x
Scott Lahteine 5 years ago
parent a2e412c0ce
commit 4078f2672e

@ -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)
@ -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;

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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"

@ -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)

@ -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)
@ -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);

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

@ -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"

@ -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"

@ -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)
@ -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)
@ -141,11 +141,9 @@ bool TuneMenu::onTouchEnd(uint8_t tag) {
case 4:
#if ENABLED(BABYSTEPPING)
GOTO_SCREEN(NudgeNozzleScreen);
#else
#if HAS_BED_PROBE
#elif HAS_BED_PROBE
GOTO_SCREEN(ZOffsetScreen);
#endif
#endif
break;
case 5: GOTO_SCREEN(FeedratePercentScreen); break;
case 6: sound.play(twinkle, PLAY_ASYNCHRONOUS); ExtUI::pausePrint(); GOTO_SCREEN(StatusScreen); break;
@ -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:

@ -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"

@ -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

@ -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
/**
@ -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
@ -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

Loading…
Cancel
Save