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

Handle all states #10

Open
7 of 8 tasks
peteruithoven opened this issue Dec 18, 2015 · 5 comments
Open
7 of 8 tasks

Handle all states #10

peteruithoven opened this issue Dec 18, 2015 · 5 comments

Comments

@peteruithoven
Copy link
Member

Make a lost of all possible states and make sure we give feedback when appropriate.

  • idle
  • slicing (for the different flavor)
  • buffering
  • heating
  • printing
  • stopping
  • printer not connected
  • connection to box lost
  • ...
@Mzt-t Mzt-t closed this as completed Jan 19, 2016
@peteruithoven
Copy link
Member Author

Are you sure you've added feedback on that it's (re)slicing?
Are you sure you're disabling the buttons when the connection to the WiFi-Box is lost?

@Mzt-t
Copy link
Contributor

Mzt-t commented Jan 19, 2016

I just remembered that we are going to show feedback by using the slicing progress into the plugins' progress bar. We'll need this signal to detect the starting of a slicing. And this one to give us a percentage between 0 and 100%. I'll look into it. I'll keep this issue open till I've added the signals.

As for the buttons, they are are auto-disabling when the box loses connection with the printer, but turning off the printer would not, because the latter can not get information from /d3dapi/info/status to check the state. I've added a timeout of 5 seconds in the "GET" function. So basically: if we have no answer in 5 seconds after requesting printer info, the plugin will assume the printer is off and it will set the printer state to "disconnected", the buttons will behave accordingly.

Added timeout of 5 seconds @ PrinterConnection.py line. 441
Setting printer state to disconnected @ PrinterConnection.py line. 357

@Mzt-t Mzt-t reopened this Jan 19, 2016
@Mzt-t
Copy link
Contributor

Mzt-t commented Jan 19, 2016

It seems there are two possible ways we can have the disconnect status.
1: When the Wi-Fi box is on but not connected to the printer physically.
2: When the Wi-Fi box was on, but now off. (Printer turned off/No power)

I have them both set to the printer state "disconnected", since there doesn't need to be a distinction (yet). But I do keep them apart: "Box not connected to a printer" and "Lost connection to Wi-Fi box".

@peteruithoven
Copy link
Member Author

I would personally add a separate state, since the interface should show slightly different feedback. Maybe something like "unavailable" or "unknown"?
The benefit would be that you could create a updatePhrase() function that could set all possible phrases according to the different states.

@Mzt-t
Copy link
Contributor

Mzt-t commented Feb 24, 2016

I seperated them into two states: "disconnected" for when the Doodle3D WiFi-Box is not connected to the printer, and "lost" for when the connection with the Doodle3D WiFi-Box is lost.

lost L.354
disconnected L.365

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

No branches or pull requests

2 participants