mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-22 01:07:56 +01:00
Sending end GCode at manual stop
This commit is contained in:
parent
7da38d2e98
commit
4c0e927480
@ -80,7 +80,6 @@
|
|||||||
<div id="portrait">
|
<div id="portrait">
|
||||||
<img class="vertImage" src="img/bg_vertical2.png"/>
|
<img class="vertImage" src="img/bg_vertical2.png"/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="js/libs/jquery-1.8.3.min.js"></script>
|
<script src="js/libs/jquery-1.8.3.min.js"></script>
|
||||||
<!--<script src="js/libs/bootstrap.min.js"></script>-->
|
<!--<script src="js/libs/bootstrap.min.js"></script>-->
|
||||||
<script src="js/settings.js"></script>
|
<script src="js/settings.js"></script>
|
||||||
|
@ -24,6 +24,8 @@ function Printer() {
|
|||||||
|
|
||||||
this.maxGCodeSize = 10; // max size of gcode in MB's (estimation)
|
this.maxGCodeSize = 10; // max size of gcode in MB's (estimation)
|
||||||
|
|
||||||
|
this.sendStopGCodeDelay = 1000;
|
||||||
|
|
||||||
// Events
|
// Events
|
||||||
Printer.UPDATE = "update";
|
Printer.UPDATE = "update";
|
||||||
|
|
||||||
@ -133,6 +135,7 @@ function Printer() {
|
|||||||
this.stop = function() {
|
this.stop = function() {
|
||||||
console.log("Printer:stop");
|
console.log("Printer:stop");
|
||||||
var postData = { id: 0 };
|
var postData = { id: 0 };
|
||||||
|
var self = this;
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: this.wifiboxURL + "/printer/stop",
|
url: this.wifiboxURL + "/printer/stop",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -141,6 +144,8 @@ function Printer() {
|
|||||||
timeout: this.timeoutTime,
|
timeout: this.timeoutTime,
|
||||||
success: function(data){
|
success: function(data){
|
||||||
console.log("Printer:stop response: ", data);
|
console.log("Printer:stop response: ", data);
|
||||||
|
|
||||||
|
setTimeout(function() { console.log("send: ",gcodeEnd); self.print(gcodeEnd) },self.sendStopGCodeDelay);
|
||||||
}
|
}
|
||||||
}).fail(function() {
|
}).fail(function() {
|
||||||
console.log("Printer:stop: failed");
|
console.log("Printer:stop: failed");
|
||||||
|
Loading…
Reference in New Issue
Block a user