Disable 100x multiplier for dwin marlinui

This commit is contained in:
InsanityAutomation
2022-04-15 13:13:46 -04:00
parent 2b46761060
commit db74ac3ce1
3 changed files with 11 additions and 5 deletions
+3 -1
View File
@@ -1346,7 +1346,9 @@
#if ENABLED(ENCODER_RATE_MULTIPLIER)
#define ENCODER_5X_STEPS_PER_SEC 30
#define ENCODER_10X_STEPS_PER_SEC 80 // (steps/s) Encoder rate for 10x speed
#define ENCODER_100X_STEPS_PER_SEC 130 // (steps/s) Encoder rate for 100x speed
#if DISABLED(DWIN_MARLINUI_PORTRAIT)
#define ENCODER_100X_STEPS_PER_SEC 130 // (steps/s) Encoder rate for 100x speed
#endif
#endif
// Play a beep when the feedrate is changed from the Status Screen
+4 -2
View File
@@ -139,8 +139,10 @@ EncoderState Encoder_ReceiveAnalyze() {
// Note that the rate is always calculated between two passes through the
// loop and that the abs of the temp_diff value is tracked.
const float encoderStepRate = encoderMovementSteps / float(ms - EncoderRate.lastEncoderTime) * 1000;
if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
#if defined(ENCODER_100X_STEPS_PER_SEC)
if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
#endif
if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
#if ENCODER_5X_STEPS_PER_SEC
else if (encoderStepRate >= ENCODER_5X_STEPS_PER_SEC) encoderMultiplier = 5;
#endif
+4 -2
View File
@@ -1026,8 +1026,10 @@ void MarlinUI::init() {
// loop and that the abs of the encoderDiff value is tracked.
const float encoderStepRate = encoderMovementSteps / float(ms - lastEncoderMovementMillis) * 1000;
if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
else if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
#if defined(ENCODER_100X_STEPS_PER_SEC)
if (encoderStepRate >= ENCODER_100X_STEPS_PER_SEC) encoderMultiplier = 100;
#endif
if (encoderStepRate >= ENCODER_10X_STEPS_PER_SEC) encoderMultiplier = 10;
// Enable to output the encoder steps per second value
//#define ENCODER_RATE_MULTIPLIER_DEBUG