added flashing state to ui (not working)
This commit is contained in:
parent
39bd1b4375
commit
f4e0801853
3 changed files with 64 additions and 54 deletions
|
|
@ -510,6 +510,9 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
|||
def is_locked(self):
|
||||
return self._comm is not None and self._comm.isLocked()
|
||||
|
||||
def is_flashing(self):
|
||||
return self._comm is not None and self._comm.isFlashing()
|
||||
|
||||
#~~ sd file handling
|
||||
|
||||
def get_sd_files(self):
|
||||
|
|
@ -751,7 +754,8 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
|||
"paused": self.is_paused(),
|
||||
"ready": self.is_ready(),
|
||||
"sdReady": self.is_sd_ready(),
|
||||
"locked": self.is_locked()
|
||||
"locked": self.is_locked(),
|
||||
"flashing": self.is_flashing(),
|
||||
}
|
||||
|
||||
#~~ comm.MachineComPrintCallback implementation
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ $(function() {
|
|||
self.isSdReady = ko.observable(undefined);
|
||||
self.isLocked = ko.observable(undefined);
|
||||
self.isConnecting = ko.observable(undefined);
|
||||
self.isFlashing = ko.observable(undefined);
|
||||
|
||||
self.filename = ko.observable(undefined);
|
||||
self.progress = ko.observable(undefined);
|
||||
|
|
@ -134,6 +135,7 @@ $(function() {
|
|||
self.isReady(data.flags.ready);
|
||||
self.isSdReady(data.flags.sdReady);
|
||||
self.isLocked(data.flags.locked);
|
||||
self.isFlashing(data.flags.flashing);
|
||||
self.isConnecting(data.text === "Connecting" || data.text === "Opening serial port");
|
||||
|
||||
if (self.isPaused() != prevPaused) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
</div>
|
||||
<div id="statusbox">
|
||||
|
||||
<div id="control" class="accordion-inner" data-bind="visible: isReady() || isLocked() ">
|
||||
<div id="control" class="accordion-inner" data-bind="visible: isReady() || isLocked() || isFlashing()">
|
||||
<div data-bind="visible: isLocked ">
|
||||
Mr Beam is in a locked state as it does not know its position.
|
||||
First remove any objects blocking the gantry's travel range.
|
||||
|
|
@ -68,6 +68,10 @@
|
|||
<!--<button class="btn btn-default" data-bind="enable: isLocked() && loginState.isUser(), click: function() { $root.sendHomeCommand(['x', 'y']) }"><i class="icon-unlock">Unlock</i></button>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div data-bind="visible: isFlashing ">
|
||||
Mr Beam is flashing the Arduino with a new firmware.
|
||||
Please do NOT power off the System during flashing!
|
||||
</div>
|
||||
<div data-bind="visible: !isLocked() ">
|
||||
{{ _('Position') }}: <strong data-bind="text: laserPos"></strong>
|
||||
|
|
|
|||
Loading…
Reference in a new issue