Skip to content

Commit 8c37be1

Browse files
committed
Updated URL for getting tech support and updated software version links
1 parent baf1269 commit 8c37be1

File tree

3 files changed

+25
-32
lines changed

3 files changed

+25
-32
lines changed

host/printflow/fwupdate.html

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -66,27 +66,25 @@
6666
<script>
6767
var log="";
6868
$.getJSON('../services/settings/releaseTagName').done(function (data){
69-
var currentfirmwarerevision=data;
70-
$.getJSON('https://api.github.com/repos/Photocentric3D/Photonic3D/releases/latest').done(function (remotedata){
71-
var remotefirmwarerevision=remotedata.tag_name;
72-
log="Local firmware version:\n&nbsp;&nbsp;&nbsp;&nbsp;"+currentfirmwarerevision+"\n";
73-
log+="Server firmware version:\n&nbsp;&nbsp;&nbsp;&nbsp;"+remotefirmwarerevision+"\n\n";
74-
var localFloat = currentfirmwarerevision.replace("Photocentric-","").replace("photocentric-","");
75-
var remoteFloat = remotefirmwarerevision.replace("Photocentric-","").replace("photocentric-","");
76-
if ((parseFloat(localFloat)) < (parseFloat(remoteFloat))){
77-
log+="Your firmware needs an update. Restart the printer, and we will automatically update the printer";
78-
window.location.href=("error.html?type=info&errorname=Firmware Update Available&errordetails=There is a new firmware update available. Please restart your printer when it is convenient to do so, and we will install it automatically");
79-
80-
}
81-
else {
82-
log+="Your firmware is up-to-date!";
69+
var currentsoftwarerevision=data;
70+
$.getJSON('../services/settings/printerProfileRepo').done(function (data) {
71+
var repo = data;
72+
$.getJSON('https://api.github.com/repos/'+repo+'/releases/latest').done(function (remotedata){
73+
var remotesoftwarerevision = remotedata.tag_name;
74+
log="Current Printer software version:\n&nbsp;&nbsp;&nbsp;&nbsp;"+currentsoftwarerevision+"\n";
75+
log+="Server software version:\n&nbsp;&nbsp;&nbsp;&nbsp;"+remotesoftwarerevision+"\n\n";
76+
if (remotesoftwarerevision != currentsoftwarerevision){
77+
log+="Your printer software is different than the latest version. Restart the printer, and we will automatically update the printer";
78+
window.location.href=("error.html?type=info&errorname=Printer Software Update Available&errordetails=There is a new software update available. Please restart your printer when it is convenient to do so, and we will install it automatically");
79+
} else {
80+
log+="Your printer software is up-to-date!";
8381
}
8482
document.getElementById("log").innerHTML=log;
85-
})
86-
.fail(function (){
87-
document.getElementById("log").innerHTML="Could not access remote server to fetch remote firmware version.\n\nPlease try again later";
83+
}) .fail(function (){
84+
document.getElementById("log").innerHTML="Could not access remote server to fetch remote printer software version.\n\nPlease try again later";
8885
});
8986
});
87+
});
9088
</script>
9189
<div class="screen">
9290
<div class="main">

host/printflow/js/printflow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function printredirect(){
133133
if ((typeof Cookies.get('lastfailedjob') === 'undefined')||(Cookies.get('lastfailedjob')!=jobId)){
134134
Cookies.set('lastfailedjob',jobId);
135135
setTimeout(function() {
136-
window.location.href=("error.html?errorname=Print Failed&errordetails=The print of "+runningjobName+" [Job ID: "+jobId+"] has unexpectedly failed.&errordetails2=Please retry the print, and if the issue persists, contact Technical Support via <b>www.photocentric3d.com</b>");
136+
window.location.href=("error.html?errorname=Print Failed&errordetails=The print of "+runningjobName+" [Job ID: "+jobId+"] has unexpectedly failed.&errordetails2=Please retry the print, and if the issue persists, contact Technical Support via <b>www.photonic3d.com</b>");
137137
}, 100);
138138
}
139139
}

host/printflow/swupdate.html

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,25 @@
6666
<script>
6767
var log="";
6868
$.getJSON('../services/settings/releaseTagName').done(function (data){
69-
var currentsoftwarerevision=data;
70-
if (typeof repo === 'undefined'){
71-
repo = "Photocentric3D/Photonic3D";
72-
//override to master repo if repo hasn't been populated by printerconfig.js
73-
}
69+
var currentsoftwarerevision=data;
70+
$.getJSON('../services/settings/printerProfileRepo').done(function (data) {
71+
var repo = data;
7472
$.getJSON('https://api.github.com/repos/'+repo+'/releases/latest').done(function (remotedata){
75-
var remotesoftwarerevision=remotedata.tag_name;
73+
var remotesoftwarerevision = remotedata.tag_name;
7674
log="Current Printer software version:\n&nbsp;&nbsp;&nbsp;&nbsp;"+currentsoftwarerevision+"\n";
7775
log+="Server software version:\n&nbsp;&nbsp;&nbsp;&nbsp;"+remotesoftwarerevision+"\n\n";
78-
var localFloat = currentsoftwarerevision.replace("Photocentric-","").replace("photocentric-","");
79-
var remoteFloat = remotesoftwarerevision.replace("Photocentric-","").replace("photocentric-","");
80-
if ((parseFloat(localFloat)) < (parseFloat(remoteFloat))){
81-
log+="Your printer software needs an update. Restart the printer, and we will automatically update the printer";
76+
if (remotesoftwarerevision != currentsoftwarerevision){
77+
log+="Your printer software is different than the latest version. Restart the printer, and we will automatically update the printer";
8278
window.location.href=("error.html?type=info&errorname=Printer Software Update Available&errordetails=There is a new software update available. Please restart your printer when it is convenient to do so, and we will install it automatically");
83-
}
84-
else {
79+
} else {
8580
log+="Your printer software is up-to-date!";
8681
}
8782
document.getElementById("log").innerHTML=log;
88-
})
89-
.fail(function (){
83+
}) .fail(function (){
9084
document.getElementById("log").innerHTML="Could not access remote server to fetch remote printer software version.\n\nPlease try again later";
9185
});
9286
});
87+
});
9388
</script>
9489
<div class="screen">
9590
<div class="main">

0 commit comments

Comments
 (0)