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

Fixed logic error in PLA jamming gcode for P1S #3948

Merged

Conversation

afriede
Copy link
Contributor

@afriede afriede commented Apr 24, 2024

Changed the P1S gcode for preventing PLA jamming from:
(swapped the inner if and elsif around)

;=============turn on fans to prevent PLA jamming=================\n
{if filament_type[initial_extruder]==\"PLA\"}\n
    {if (bed_temperature[initial_extruder] >45)||(bed_temperature_initial_layer[initial_extruder] >45)}\n
    M106 P3 S180\n
    {elsif (bed_temperature[initial_extruder] >50)||(bed_temperature_initial_layer[initial_extruder] >50)}\n
    M106 P3 S255\n
    {endif};Prevent PLA from jamming\n
{endif}\n

to:

;=============turn on fans to prevent PLA jamming=================\n
{if filament_type[initial_extruder]==\"PLA\"}\n
    {if (bed_temperature[initial_extruder] >50)||(bed_temperature_initial_layer[initial_extruder] >50)}\n
    M106 P3 S255\n
    {elsif (bed_temperature[initial_extruder] >45)||(bed_temperature_initial_layer[initial_extruder] >45)}\n
    M106 P3 S180\n
    {endif};Prevent PLA from jamming\n
{endif}\n

Before this change even if the bed temperature is greater than 50 the fans would not turn up as fast as they are supposed to, because the first if condition would also trigger and set the fan speed to 180 and not to 255!

The changes are difficult to visualize, because the gcode is all in one line, but by using this command locally the changes can easily be verified.

git diff --word-diff=color

@afriede afriede changed the title fixed logic error in PLA jamming gcode for P1S Fixed logic error in PLA jamming gcode for P1S Apr 24, 2024
@lanewei120 lanewei120 merged commit 437e445 into bambulab:master May 6, 2024
@lanewei120
Copy link
Collaborator

thanks for doing this

@afriede
Copy link
Contributor Author

afriede commented May 6, 2024

You're welcome. I'm glad I could help!

lanewei120 pushed a commit that referenced this pull request May 13, 2024
github PR: #3948

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I28e4a673e590e83d151e92cc82caab45012aeabe
lanewei120 pushed a commit that referenced this pull request May 13, 2024
github PR: #3948

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I28e4a673e590e83d151e92cc82caab45012aeabe
hadess pushed a commit to hadess/BambuStudio that referenced this pull request Jun 22, 2024
github PR: bambulab#3948

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I28e4a673e590e83d151e92cc82caab45012aeabe
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