Doodle3D / Doodle3D-cura-plugin

Cura plugin to Export to Doodle3D WiFi-Box
https://www.doodle3d.com
4 stars 1 forks source link

Optimistic state logic issue #14

Open peteruithoven opened 8 years ago

peteruithoven commented 8 years ago

There is logic added to override the state, to optimistically assume the printer will start printing for example. But the following line prevents the api from correcting the state when this optimistic assumption was wrong. https://github.com/Doodle3D/Doodle3D-cura-plugin/blob/master/PrinterConnection.py#L377

I would try to release the state before doing the http request https://github.com/Doodle3D/Doodle3D-cura-plugin/blob/master/PrinterConnection.py#L351 This would allow the api to correct the state, after an override, when it starts a new request.

Mzt-t commented 8 years ago

There's another place where the statelock gets released: https://github.com/Doodle3D/Doodle3D-cura-plugin/blob/master/PrinterConnection.py#L224

I've been thinking about putting the releasestatelock in a more logical place but haven't come up with the best place yet.

peteruithoven commented 8 years ago

I would place it above: https://github.com/Doodle3D/Doodle3D-cura-plugin/blob/master/PrinterConnection.py#L351