Skip to content

Commit

Permalink
Bug fix for filaments
Browse files Browse the repository at this point in the history
Bug fix: The move sequence number was not updated on filament load preventing the loaded filament from being displayed under certain conditions
  • Loading branch information
chrishamm committed May 8, 2024
1 parent c5f8a86 commit 78deb28
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Tools/Filament.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ void Filament::LoadAssignment() noexcept
return;
}

bool filamentLoaded = false;
char buffer[FilamentNameLength + 64];
if (file->ReadLine(buffer, sizeof(buffer)) > 0 && StringStartsWith(buffer, FilamentAssignmentFileComment))
{
Expand All @@ -68,13 +69,20 @@ void Filament::LoadAssignment() noexcept
}

name.copy(filament);
filamentLoaded = true;
break;
}
}
}
}

file->Close();

if (filamentLoaded)
{
// Filaments are mapped per extruder, so make sure the move key is updated
reprap.MoveUpdated();
}
#endif
}

Expand Down

0 comments on commit 78deb28

Please sign in to comment.