Skip to content

Commit 4187f73

Browse files
committed
minor change to lcd update JS + added favicon
1 parent d6cd2d2 commit 4187f73

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

favicon.ico

1.12 KB
Binary file not shown.

js/main.js

+7-8
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,19 @@ function refreshLcd(){
106106
$.post('socketmessage.php', {messageType: "lcd", message: ""}, function(lcdText){
107107
try
108108
{
109-
lcdText = JSON.parse(lcdText);
109+
lcdText = JSON.parse(lcdText);
110110
for (var i = lcdText.length - 1; i >= 0; i--) {
111111
$('#lcd .lcd-text #lcd-line-' + i).html(lcdText[i]);
112-
};
113-
window.setTimeout(checkScriptStatus,5000);
112+
}
114113
}
115114
catch(e)
116115
{
117-
document.write(lcdText);
118-
$('#lcd .lcd-text #lcd-line-0').html("Cannot connect to");
119-
$('#lcd .lcd-text #lcd-line-1').html("script. Refresh");
120-
$('#lcd .lcd-text #lcd-line-2').html("page to try again");
121-
$('#lcd .lcd-text #lcd-line-3').html(" ");
116+
$('#lcd .lcd-text #lcd-line-0').html("Cannot receive");
117+
$('#lcd .lcd-text #lcd-line-1').html("LCD text from");
118+
$('#lcd .lcd-text #lcd-line-2').html("Python script");
119+
$('#lcd .lcd-text #lcd-line-3').html(" ");
122120
}
121+
window.setTimeout(checkScriptStatus,5000);
123122
});
124123
}
125124

0 commit comments

Comments
 (0)