Gurmeet Athwal
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
18 additions and
2 deletions
-
Marlin/src/lcd/marlinui.cpp
-
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
-
Marlin/src/pins/pinsDebug_list.h
|
|
@ -337,6 +337,10 @@ void MarlinUI::init() { |
|
|
|
SET_INPUT_PULLUP(BTN_ENC); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if BUTTON_EXISTS(ENC_EN) |
|
|
|
SET_INPUT_PULLUP(BTN_ENC_EN); |
|
|
|
#endif |
|
|
|
|
|
|
|
#if BUTTON_EXISTS(BACK) |
|
|
|
SET_INPUT_PULLUP(BTN_BACK); |
|
|
|
#endif |
|
|
@ -957,7 +961,10 @@ void MarlinUI::update() { |
|
|
|
|
|
|
|
#endif // ENCODER_RATE_MULTIPLIER
|
|
|
|
|
|
|
|
// Update position only when ENC_EN is HIGH
|
|
|
|
if (TERN1(BTN_ENC_EN, !BUTTON_PRESSED(ENC_EN))) |
|
|
|
encoderPosition += (encoderDiff * encoderMultiplier) / epps; |
|
|
|
|
|
|
|
encoderDiff = 0; |
|
|
|
} |
|
|
|
|
|
|
@ -1175,7 +1182,8 @@ void MarlinUI::update() { |
|
|
|
if (BUTTON_PRESSED(EN2)) newbutton |= EN_B; |
|
|
|
#endif |
|
|
|
#if BUTTON_EXISTS(ENC) |
|
|
|
if (BUTTON_PRESSED(ENC)) newbutton |= EN_C; |
|
|
|
// Update button only when ENC_EN is HIGH
|
|
|
|
if (TERN1(BTN_ENC_EN, !BUTTON_PRESSED(ENC_EN)) && BUTTON_PRESSED(ENC)) newbutton |= EN_C; |
|
|
|
#endif |
|
|
|
#if BUTTON_EXISTS(BACK) |
|
|
|
if (BUTTON_PRESSED(BACK)) newbutton |= EN_D; |
|
|
|
|
|
@ -399,6 +399,11 @@ |
|
|
|
#define LCD_PINS_D5 P1_21 |
|
|
|
#define LCD_PINS_D6 P1_22 |
|
|
|
#define LCD_PINS_D7 P1_23 |
|
|
|
|
|
|
|
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) |
|
|
|
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
|
|
|
#endif |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#endif // !FYSETC_MINI_12864
|
|
|
|
|
|
@ -147,6 +147,9 @@ |
|
|
|
#if defined(BTN_EN2) && BTN_EN2 >= 0 |
|
|
|
REPORT_NAME_DIGITAL(__LINE__, BTN_EN2) |
|
|
|
#endif |
|
|
|
#if defined(BTN_ENC_EN) && BTN_ENC_EN >= 0 |
|
|
|
REPORT_NAME_DIGITAL(__LINE__, BTN_ENC_EN) |
|
|
|
#endif |
|
|
|
#if defined(BTN_ENC) && BTN_ENC >= 0 |
|
|
|
REPORT_NAME_DIGITAL(__LINE__, BTN_ENC) |
|
|
|
#endif |
|
|
|