From 28bf9364f6fea6d1e7ce4b558ca1d34218feae30 Mon Sep 17 00:00:00 2001 From: make-ing Date: Wed, 2 Sep 2015 11:04:38 +0200 Subject: [PATCH] working version of flashing ui --- src/octoprint/static/js/app/viewmodels/control.js | 6 ++++-- src/octoprint/templates/mrbeam_index.jinja2 | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/octoprint/static/js/app/viewmodels/control.js b/src/octoprint/static/js/app/viewmodels/control.js index e37aaef5..67af19c4 100644 --- a/src/octoprint/static/js/app/viewmodels/control.js +++ b/src/octoprint/static/js/app/viewmodels/control.js @@ -23,6 +23,7 @@ $(function() { self.isReady = ko.observable(undefined); self.isLoading = ko.observable(undefined); self.isLocked = ko.observable(undefined); + self.isFlashing = ko.observable(undefined); self.extrusionAmount = ko.observable(undefined); self.controls = ko.observableArray([]); @@ -90,6 +91,7 @@ $(function() { self.isReady(data.flags.ready); self.isLoading(data.flags.loading); self.isLocked(data.flags.locked); + self.isFlashing(data.flags.flashing); }; self.onEventSettingsUpdated = function (payload) { @@ -463,7 +465,7 @@ $(function() { self.rerenderControls(); } }; - + self._jogDistanceMapping = [0.1, 1, 5, 10, 50, 100]; self._configureJogDistanceSlider = function () { self.layerSlider = $("#jogDistance").slider({ @@ -600,7 +602,7 @@ $(function() { return "(" + pos.x + ", " + pos.y + ")"; } }, this); - + self.setCoordinateOrigin = function () { self.sendCustomCommand({type: 'command', command: "G92 X0 Y0"}); }; diff --git a/src/octoprint/templates/mrbeam_index.jinja2 b/src/octoprint/templates/mrbeam_index.jinja2 index 7304e342..2f6dbe93 100644 --- a/src/octoprint/templates/mrbeam_index.jinja2 +++ b/src/octoprint/templates/mrbeam_index.jinja2 @@ -73,7 +73,7 @@ Mr Beam is flashing the Arduino with a new firmware. Please do NOT power off the System during flashing! -
+
{{ _('Position') }}:
-
+
{{ _('Machine State') }}: