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

Improved Threshold Scan, Touch and other small fixes #63

Merged
merged 12 commits into from
Nov 19, 2024

Conversation

krautech
Copy link
Collaborator

@krautech krautech commented Nov 17, 2024

Description

Brings CARTOGRAPHER_THRESHOLD_SCAN into line with CARTOGRAPHER_TOUCH

Based on KrauTech-Nightly with improvements.
Maintains same command params from previous iteration for backwards compatibility.

Checklist

The following relevant macros have been tested:

  • CARTOGRAPHER_CALIBRATE
  • PROBE
  • PROBE_ACCURACY
  • CARTOGRAPHER_THRESHOLD_SCAN
  • CARTOGRAPHER_TOUCH CALIBRATE=1
  • CARTOGRAPHER_TOUCH
  • CARTOGRAPHER_TOUCH METHOD=manual
  • BED_MESH_CALIBRATE

@krautech krautech self-assigned this Nov 17, 2024
@github-actions github-actions bot added the feature New feature or request label Nov 17, 2024
@krautech krautech modified the milestones: Improved Threshold Scan, v1.1.0 Nov 17, 2024
scanner.py Outdated Show resolved Hide resolved
scanner.py Outdated Show resolved Hide resolved
scanner.py Outdated Show resolved Hide resolved
scanner.py Show resolved Hide resolved
@Jomik
Copy link
Collaborator

Jomik commented Nov 17, 2024

Tested _THRESHOLD_SCAN and _TOUCH on my printer, worked fine.
Found threshold of 1750 and touched with one retry.

@krautech krautech requested a review from Jomik November 17, 2024 19:07
@krautech
Copy link
Collaborator Author

krautech commented Nov 17, 2024

I'm not happy enough with this yet. It clearly has issues.

image

Either 1. Its not outputting text about the other Qualify attempts or 2. Its moving onto the next threshold instead of doing all 5 qualify attempts and checking the results.

consistent_results = True
for attempt in range(repeat_attempts):
repeat_result = self.start_threshold_scan(
gcmd, touch_settings, verbose
)
if not repeat_result["success"] or (
repeat_result["standard_deviation"]
> max_acceptable_std_dev
):
gcmd.respond_info(
f"Qualify attempt {attempt + 1} failed for threshold {current_threshold}"
)
consistent_results = False
break
gcmd.respond_info(
f"Qualify attempt {attempt + 1} successful with std dev: {repeat_result['standard_deviation']:.5f}"
)

Potentially in here.

scanner.py Show resolved Hide resolved
Copy link
Collaborator

@Jomik Jomik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me. Just had that one comment I would think about :)

@Jomik Jomik marked this pull request as ready for review November 18, 2024 17:11
@krautech
Copy link
Collaborator Author

Looks good to me

@krautech krautech changed the base branch from master to milestone/v1.1.0 November 19, 2024 03:26
@krautech krautech changed the title Feature/improved threshold scan Improved Threshold Scan, Touch and other small fixes Nov 19, 2024
@krautech krautech changed the base branch from milestone/v1.1.0 to master November 19, 2024 03:56
@krautech krautech changed the base branch from master to milestone/v1.1.0 November 19, 2024 03:59
@krautech krautech merged commit 14e367d into milestone/v1.1.0 Nov 19, 2024
1 check passed
@krautech krautech deleted the feature/improved-threshold-scan branch November 19, 2024 04:26
krautech added a commit that referenced this pull request Nov 19, 2024
* feature: initial commit improved threshold scan and touch

* fix: line indent

* fix: removed upper limit on MAX

* fix: changed text output

* fix: removed double completion text

* fix: changed mean to median

* chore: removed more output text

* fix: dont increase max if MAX is set by user

* fix: change magic constants to constant variables

* fix: max was still adjusting

* feat: scale acceptable retries off qualification samples

* fix: RETRIES is an int

---------

Co-authored-by: Jonas Damtoft <[email protected]>
@krautech krautech linked an issue Nov 19, 2024 that may be closed by this pull request
krautech added a commit that referenced this pull request Nov 19, 2024
* feature: initial commit improved threshold scan and touch

* fix: line indent

* fix: removed upper limit on MAX

* fix: changed text output

* fix: removed double completion text

* fix: changed mean to median

* chore: removed more output text

* fix: dont increase max if MAX is set by user

* fix: change magic constants to constant variables

* fix: max was still adjusting

* feat: scale acceptable retries off qualification samples

* fix: RETRIES is an int

---------

Co-authored-by: Jonas Damtoft <[email protected]>
krautech added a commit that referenced this pull request Nov 19, 2024
* feature: initial commit improved threshold scan and touch

* fix: line indent

* fix: removed upper limit on MAX

* fix: changed text output

* fix: removed double completion text

* fix: changed mean to median

* chore: removed more output text

* fix: dont increase max if MAX is set by user

* fix: change magic constants to constant variables

* fix: max was still adjusting

* feat: scale acceptable retries off qualification samples

* fix: RETRIES is an int

---------

Co-authored-by: Jonas Damtoft <[email protected]>
@krautech krautech linked an issue Nov 20, 2024 that may be closed by this pull request
krautech added a commit that referenced this pull request Nov 20, 2024
* feature: initial commit improved threshold scan and touch

* fix: line indent

* fix: removed upper limit on MAX

* fix: changed text output

* fix: removed double completion text

* fix: changed mean to median

* chore: removed more output text

* fix: dont increase max if MAX is set by user

* fix: change magic constants to constant variables

* fix: max was still adjusting

* feat: scale acceptable retries off qualification samples

* fix: RETRIES is an int

---------

Co-authored-by: Jonas Damtoft <[email protected]>
krautech added a commit that referenced this pull request Nov 20, 2024
* feature: initial commit improved threshold scan and touch

* fix: line indent

* fix: removed upper limit on MAX

* fix: changed text output

* fix: removed double completion text

* fix: changed mean to median

* chore: removed more output text

* fix: dont increase max if MAX is set by user

* fix: change magic constants to constant variables

* fix: max was still adjusting

* feat: scale acceptable retries off qualification samples

* fix: RETRIES is an int

---------

Co-authored-by: Jonas Damtoft <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: 5.0.2 touch not working as described [Feature] Improved Threshold Scan
2 participants