Skip to content

Fix drift compensation reset state#50

Merged
tadelv merged 1 commit into
decentespresso:developfrom
skialpine:codex/drift-comp-reset-state
May 11, 2026
Merged

Fix drift compensation reset state#50
tadelv merged 1 commit into
decentespresso:developfrom
skialpine:codex/drift-comp-reset-state

Conversation

@skialpine
Copy link
Copy Markdown
Contributor

Summary

Fixes the drift compensation state reset in pureScale().

The invalid-diff branch previously declared a second block-local static int f_similar_diff_count, so it reset a different counter than the one used by the compensation path. This moves the counter and last-diff state to the pureScale() scope and resets the active state when the diff is outside the drift-compensation window.

Validation

  • platformio run
  • Flashed/tested the same source change locally before opening this standalone PR

Notes

This PR is intentionally scoped to the drift compensation reset bug and is based directly on develop.

@tadelv tadelv merged commit ed9ad8c into decentespresso:develop May 11, 2026
@tadelv
Copy link
Copy Markdown
Collaborator

tadelv commented May 11, 2026

Thanks @skialpine !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants