Salandora / octoprint-customControl

This plugin makes Custom Controls editable through the OctoPrint WebUI
GNU Affero General Public License v3.0
25 stars 15 forks source link

Feature Request: Popup while running #3

Closed lciscon closed 8 years ago

lciscon commented 8 years ago

I'd like to be able to optionally display a popup while the command is running. For example if you create a control to heat the bed using a heat-and-wait code:

M109 S220 T0

Then it would be useful for there to be a popup on the screen saying "Heating..." while it is running.

Salandora commented 8 years ago

Well I'm sorry but this is the wrong place for such a request, this plugin is only an editor to easily create, edit or remove custom controls from your controls tab in octoprint. You would need to request such a feature at OctoPrint.

lciscon commented 8 years ago

I'm talking about a change to this plugin not to Octoprint itself. I currently use this plugin heavily so I know exactly what I'm asking for. I'm asking for an additional flag in the control options dialog similar to the prompt option you currently have. If that flag is set it should pop up a dialog showing whatever text you have specified. It would use exact the same code you already use for prompting for input. Then when the execution completes it would hide the dialog. It is almost a trivial change. It does not require any changes to Octoprint itself.

lciscon commented 8 years ago

Edit: Looking at the code it appears all you're doing is editing the Octoprint configuration file. I believe the optional javascript code snipet can be used to achieve what I want. I will pursue that approach.

Salandora commented 8 years ago

Well as I said this is only an editor nothing more. The whole custom control part is inside of OctoPrint. So any popup, detection routine or anything else need to be added to OctoPrint itself. I can also say the "trivial" change to get such a popup is not so "trivial" as you think. First of all you need a way to detect if the command has been completed. Well this becomes the first big problem because OctoPrint is not capable to decide what feedback is for what command. In your M109 this might be a bit simpler then on another commands you could try to implement a routine which checks if the temperature is in a stable offset around your desired temperature for a specific time. But what about e.g. G28 command? You don't get a feedback for this.

Oh and well I still believe this is the wrong place to request this. This is why I close it now.

If you still think I'm wrong feel free to fork this project add the desired functionality and make a PR for it. As long as it is not going to change this editor into some active feedback watching thing I will consider merging it.