mirror of
https://github.com/Doodle3D/doodle3d-connect.git
synced 2024-12-26 02:23:48 +01:00
disconnected and connecting state info
This commit is contained in:
parent
994d0e8ebb
commit
882057e300
@ -46,7 +46,8 @@
|
|||||||
$("#btnStop").hide();
|
$("#btnStop").hide();
|
||||||
$("#btnNewPrint").hide();
|
$("#btnNewPrint").hide();
|
||||||
|
|
||||||
|
$("#infoDisconnected").hide();
|
||||||
|
$("#infoConnecting").hide();
|
||||||
|
|
||||||
//$("#btnSend").on("click", function(data) {
|
//$("#btnSend").on("click", function(data) {
|
||||||
// // console.log("test",$("#gcode").val());
|
// // console.log("test",$("#gcode").val());
|
||||||
@ -141,6 +142,7 @@
|
|||||||
d3d.util.showLoader();
|
d3d.util.showLoader();
|
||||||
|
|
||||||
_infoAPI.getStatus(function(successData) {
|
_infoAPI.getStatus(function(successData) {
|
||||||
|
|
||||||
$("#grpStatusAndControl").show();
|
$("#grpStatusAndControl").show();
|
||||||
|
|
||||||
var state = successData.state;
|
var state = successData.state;
|
||||||
@ -152,7 +154,19 @@
|
|||||||
$("#infoState").show();
|
$("#infoState").show();
|
||||||
$("#infoState").text("Printer " + state + "...");
|
$("#infoState").text("Printer " + state + "...");
|
||||||
$("#grpStatusAndControl").hide();
|
$("#grpStatusAndControl").hide();
|
||||||
|
|
||||||
|
if (state==="connecting") {
|
||||||
|
$("#infoConnecting").show();
|
||||||
|
$("#infoDisconnected").hide();
|
||||||
|
} else if (state==="disconnected") {
|
||||||
|
$("#infoConnecting").hide();
|
||||||
|
$("#infoDisconnected").show();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
$("#infoDisconnected").hide();
|
||||||
|
$("#infoConnecting").hide();
|
||||||
|
|
||||||
$("#infoState").hide();
|
$("#infoState").hide();
|
||||||
$("#grpStatusAndControl").show();
|
$("#grpStatusAndControl").show();
|
||||||
$("#infoNozzleTemperature").html(successData.hotend + " / " + successData.hotend_target + " °C");
|
$("#infoNozzleTemperature").html(successData.hotend + " / " + successData.hotend_target + " °C");
|
||||||
|
@ -69,6 +69,8 @@
|
|||||||
|
|
||||||
}, function(failData) {
|
}, function(failData) {
|
||||||
console.log("_connectAPI.list failData",failData);
|
console.log("_connectAPI.list failData",failData);
|
||||||
|
$("#infoWiFiBox").html("<span class='error'>failed to retrieve list with local WiFi-Box'es</span>");
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#lstBoxes").on("change", function(data) {
|
$("#lstBoxes").on("change", function(data) {
|
||||||
@ -211,7 +213,6 @@
|
|||||||
_printerAPI.fetch(data,function(successData) {
|
_printerAPI.fetch(data,function(successData) {
|
||||||
console.log("fetchPrint success",successData);
|
console.log("fetchPrint success",successData);
|
||||||
|
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
var url = d3d.util.replaceURLParameters("#control",_pageData);
|
var url = d3d.util.replaceURLParameters("#control",_pageData);
|
||||||
$.mobile.changePage(url);
|
$.mobile.changePage(url);
|
||||||
|
@ -108,8 +108,7 @@
|
|||||||
<h2>Material</h2>
|
<h2>Material</h2>
|
||||||
<p id="infoMaterial">...</p>
|
<p id="infoMaterial">...</p>
|
||||||
</li>
|
</li>
|
||||||
|
</ul>
|
||||||
</ul>
|
|
||||||
|
|
||||||
Please select your Doodle3D WiFi-Box:
|
Please select your Doodle3D WiFi-Box:
|
||||||
<ul data-role="listview" data-inset="true">
|
<ul data-role="listview" data-inset="true">
|
||||||
@ -136,6 +135,17 @@
|
|||||||
<!-- <p class="intro">...</p> -->
|
<!-- <p class="intro">...</p> -->
|
||||||
<div id="infoState">loading...</div>
|
<div id="infoState">loading...</div>
|
||||||
|
|
||||||
|
<div id="infoDisconnected">
|
||||||
|
<p>Please make sure the WiFi-Box is connected to your 3D-printer using a USB cable.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="infoConnecting">
|
||||||
|
<p>This can take a while, 20 seconds or so...</p>
|
||||||
|
<!-- <p>Hmm... this takes longer than usual...</p> -->
|
||||||
|
<p>If it takes too long please try to restart your WiFi-Box. Also make sure the WiFi-Box is running the latest firmware.</p>
|
||||||
|
<p>If you think you're really stuck, please <a href="javascript:talkus('open')">chat</a> with us to see if we can help.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="grpStatusAndControl">
|
<div id="grpStatusAndControl">
|
||||||
<ul data-role="listview" data-inset="true">
|
<ul data-role="listview" data-inset="true">
|
||||||
<li id="liPrinterId" data-icon="false">
|
<li id="liPrinterId" data-icon="false">
|
||||||
|
Loading…
Reference in New Issue
Block a user