Removed python based webcam support (didn't work well with the raspi), switched instead to external stream (mjpg-streamer being the preferred webcam server)

This commit is contained in:
Gina Häußge committed 2013-01-03 00:39:17 +01:00
1 parent 8dc5e249d5
commit 4e4eed84bb
7 files changed
+67 -124

No files matched your search

-8
View File
@@ -97,12 +97,4 @@ table th.gcode_files_action, table td.gcode_files_action {
#webcam_container {
height: 440px;
background-color: #000000;
}
#webcam_placeholder {
height: 440px;
line-height: 440px;
text-align: center;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
-27
View File
@@ -438,32 +438,6 @@ function DataUpdater(connectionViewModel, printerStateViewModel, temperatureView
}
var dataUpdater = new DataUpdater(connectionViewModel, printerStateViewModel, temperatureViewModel, speedViewModel, terminalViewModel);
function WebcamViewModel() {
var self = this;
self.webcamUpdateInterval = 5000;
self.offlineUrl = "/static/img/webcam-offline.png";
self.url = ko.observable(undefined);
self.enabled = ko.observable(undefined);
self.enabled.subscribe(function(newValue) {
if (newValue) {
self.requestData();
} else {
$("#webcam_image")
}
});
self.requestData = function() {
if (!self.enabled())
return;
self.url(AJAX_BASEURL + "webcam/image?" + (new Date()).getTime());
setTimeout(self.requestData, self.webcamUpdateInterval);
}
}
var webcamViewModel = new WebcamViewModel();
$(function() {
//~~ Print job control
@@ -603,7 +577,6 @@ $(function() {
ko.applyBindings(printerStateViewModel, document.getElementById("jog"));
ko.applyBindings(terminalViewModel, document.getElementById("term"));
ko.applyBindings(speedViewModel, document.getElementById("speed"));
ko.applyBindings(webcamViewModel, document.getElementById("webcam"));
//~~ startup commands