|
@@ -337,6 +337,10 @@ void MarlinUI::init() {
|
337
|
337
|
SET_INPUT_PULLUP(BTN_ENC);
|
338
|
338
|
#endif
|
339
|
339
|
|
|
340
|
+ #if BUTTON_EXISTS(ENC_EN)
|
|
341
|
+ SET_INPUT_PULLUP(BTN_ENC_EN);
|
|
342
|
+ #endif
|
|
343
|
+
|
340
|
344
|
#if BUTTON_EXISTS(BACK)
|
341
|
345
|
SET_INPUT_PULLUP(BTN_BACK);
|
342
|
346
|
#endif
|
|
@@ -957,7 +961,10 @@ void MarlinUI::update() {
|
957
|
961
|
|
958
|
962
|
#endif // ENCODER_RATE_MULTIPLIER
|
959
|
963
|
|
960
|
|
- encoderPosition += (encoderDiff * encoderMultiplier) / epps;
|
|
964
|
+ // Update position only when ENC_EN is HIGH
|
|
965
|
+ if (TERN1(BTN_ENC_EN, !BUTTON_PRESSED(ENC_EN)))
|
|
966
|
+ encoderPosition += (encoderDiff * encoderMultiplier) / epps;
|
|
967
|
+
|
961
|
968
|
encoderDiff = 0;
|
962
|
969
|
}
|
963
|
970
|
|
|
@@ -1175,7 +1182,8 @@ void MarlinUI::update() {
|
1175
|
1182
|
if (BUTTON_PRESSED(EN2)) newbutton |= EN_B;
|
1176
|
1183
|
#endif
|
1177
|
1184
|
#if BUTTON_EXISTS(ENC)
|
1178
|
|
- if (BUTTON_PRESSED(ENC)) newbutton |= EN_C;
|
|
1185
|
+ // Update button only when ENC_EN is HIGH
|
|
1186
|
+ if (TERN1(BTN_ENC_EN, !BUTTON_PRESSED(ENC_EN)) && BUTTON_PRESSED(ENC)) newbutton |= EN_C;
|
1179
|
1187
|
#endif
|
1180
|
1188
|
#if BUTTON_EXISTS(BACK)
|
1181
|
1189
|
if (BUTTON_PRESSED(BACK)) newbutton |= EN_D;
|