Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve filament sensor PCB upgrade logic #3155

Open
wants to merge 6 commits into
base: MK3
Choose a base branch
from

Conversation

wavexx
Copy link
Collaborator

@wavexx wavexx commented May 21, 2021

The current code surrounding the IR filament sensor board upgrade is problematic in a few ways. It still checks for a PCB upgrade even though the FW already knows the PCB is at the newest version, wasting cycles. It allows downgrading the version after a previous successful detection, which doesn't make much sense.

In this PR:

  • Ensure the upgrade logic only runs if the previous PCB version is unknown or if an upgrade is actually possible.
  • Ensure the check only runs until a reliable detection can be made, then stop checking.
  • Ensure the version detection doesn't run forever: limit the number of total autodetection attempts in a single session.
  • Simplify and clarify the code surrounding the check.

wavexx added 6 commits May 21, 2021 00:57
- Ensure the upgrade logic only runs if the previous PCB version is
  unknown or if an upgrade is actually possible.
- Ensure the check only runs until a reliable detection can be made,
  then stop checking.
- Ensure the detection doesn't run forever: limit the number of total
  autodetection attempts until the next FW reset.
.. into temperature.* where the ADC conversion is currently performed.

Fixes build on the MK3 variant.
@3d-gussner 3d-gussner added this to the FW 3.14.0 milestone Aug 18, 2023
@3d-gussner 3d-gussner self-assigned this Sep 22, 2023
@3d-gussner 3d-gussner modified the milestones: FW 3.14.0, FW 3.14.1 Nov 24, 2023
@3d-gussner 3d-gussner removed this from the FW 3.14.1 milestone Apr 30, 2024
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