A print stop button has been added to the status display screen.
The source code has been updated on github.
Contents of screen
During printing, the status is “Building” as described above. In this state, I was able to press the stop button.
The stop button is located below the built-in camera image.
A confirmation screen is displayed by pressing the button, and a print stop command is issued to the Adventurer3 by pressing OK.
However, it takes a long time until the print stop command is actually sent after the OK button is pressed. It is still unclear about this reason.
As a result, he has repeatedly pressed the stop button.
Therefore, until the actual stop command is sent, the display of the button is changed so that it can not be pressed.
Program structure
This time we added a Web API that executes G code on the server side.
@bp.route('/gcode', methods=['POST'])
def gcode():
"""Gコードを実行する"""
if bp.monitor != None and bp.monitor.is_alive():
var = request.json
retBody = {
"ret": bp.monitor.gcode(var['gcode'])
}
else:
retBody = {
"ret" : "ng"
}
return make_response(jsonify(retBody))
On the client side, when the button is pressed, the G code of M26 is sent.
Therefore, if it is one line of G code, this WebApi enables control of Adventurer3 with the client side code.
The next step is
Since we were able to control Adventurer3 inside the router, we would like to create a mechanism to control Adventurer3 from the outside this time. This makes it possible to check the printing situation at any time, even if you are out, and quickly stop the Adventurer3 if it is in a bad condition.
コメント