Skip to content

Print finishing before commands are sent to printer #8

@JoonasMelin

Description

@JoonasMelin

There seems to be an issue with the printcore as at least on my machines, it is getting disconnected before any commands get sent to the printers.

The "cause" of this issue are lines 71-74 in printcoredriver.py

            self.p.startprint(self.gcoder)
            self.printThread = Thread(target=self.printThreadEntry).start()
        finally:
            self.disconnect()

I would imagine that either the Thread or the startprint functions should be blocking until the job is completed but this is not currently happening and the self.disconnect gets called right away, causing the actual port to get disconnected and the actual print commands are not getting sent.

Removing the disconnect statement works as a temporary fix but this is not the right way to do this.

Any ideas how to change the behaviour of this code to disconnect only when the job is completed? maybe polling the printcore?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions