Skip to content

Conversation

@jimmyjon711
Copy link
Collaborator

@jimmyjon711 jimmyjon711 commented Dec 7, 2025

Major Changes in this PR

  • Updates are from @dragoonmc that makes the print assist scale more linearly with spool weight allowing it to be on all the time instead of only on light spools

Breaking changes if user have the following variables defined then they will need to remove them:

  • cycles_per_rotation, pwm_value, mm_movement

Graph of cruise time compared to spool weight
image

Notes to Code Reviewers

How the changes in this PR are tested

  • Tested changes with spools weighing between 100-200 grams

PR Checklist: (Checked-off items are either done or do not apply to this PR)

  • I have performed a self-review of my code
  • CHANGELOG.md is updated (if end-user facing)
  • Documentation updated in AT-Documentation repository
  • Sent notification to software-design/software-discussions channel (as appropriate) requesting review
  • If this PR address a GitHub issue, the issue number is referenced in the PR description

NOTE: GitHub Copilot may be used for automated code reviews, however as it is an automated system, it's suggestions
may not be correct. Please do not rely on it to catch all issues. Please review any suggestions it makes and use your
own judgement to determine if they are correct.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances the print assist feature to scale more linearly with spool weight, enabling it to remain active throughout printing rather than only on light spools. The changes replace the previous time-based cruise calculation with a new weight-based algorithm that accounts for motor RPM, gear ratios, and spool dimensions.

Key Changes

  • Replaced deprecated parameters (cycles_per_rotation, pwm_value, mm_movement) with new physical parameters (spool_ratio, full_weight, espool_rot_dist, max_motor_rpm, spool_inner_diameter)
  • Refactored calculate_cruise_time() to compute assist timing based on current spool weight rather than fixed movement amounts
  • Updated default values for spool_inner_diameter (100mm → 75mm) and assist_max_motor_rpm (500 → 465)

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
extras/AFC_unit.py Adds new physical parameters for gear ratio, spool weight, and rotation distance; removes deprecated timing parameters
extras/AFC_spool.py Integrates full_weight parameter from spool metadata to support weight-based calculations
extras/AFC_lane.py Updates default values for inner diameter and max motor RPM to reflect new calculation requirements
extras/AFC_assist.py Core refactoring of cruise time calculation logic, property additions for new parameters, and command documentation updates
extras/AFC.py Adds global configuration for spool_ratio and full_weight; includes string formatting fix
CHANGELOG.md Documents the enhancement with appropriate changelog entry

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jimmyjon711 jimmyjon711 force-pushed the mc_red_assist branch 2 times, most recently from 2d217d3 to 0c40b39 Compare December 12, 2025 18:28
@jimmyjon711 jimmyjon711 merged commit 8a3ad58 into ArmoredTurtle:DEV Dec 22, 2025
1 check passed
@jimmyjon711 jimmyjon711 deleted the mc_red_assist branch December 22, 2025 22:10
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.

1 participant