Skip to content

Commit

Permalink
virtual_sdcard: fix virtual SD file position count (#6472)
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang Qiwei <[email protected]>
  • Loading branch information
zxy16305 authored Jan 27, 2024
1 parent 5e3daa6 commit 600e89a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion klippy/extras/virtual_sdcard.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def work_handler(self, eventtime):
# Dispatch command
self.cmd_from_sd = True
line = lines.pop()
next_file_position = self.file_position + len(line) + 1
next_file_position = self.file_position + len(line.encode()) + 1
self.next_file_position = next_file_position
try:
self.gcode.run_script(line)
Expand Down

2 comments on commit 600e89a

@forrest96er
Copy link

Choose a reason for hiding this comment

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

On Creality Ender 3 S1 Pro with STM32F401 klipper firmware is not flashable after this fix.

Does STM32F401 support line.encode() ?

@pOmelchenko
Copy link

Choose a reason for hiding this comment

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

this is klippy server not firmware

Please sign in to comment.