Disable 100x multiplier for dwin marlinui
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user