input(v-model="mdi", @keyup.enter="submit_mdi")
.history(:class="{placeholder: !history}")
- {{history || 'MDI history displays here.'}}
+ | {{history || 'MDI history displays here.'}}
section#content3.tab-content
.jog
if (typeof msg == 'object') {
for (var key in msg)
- this.$set('state.' + key, msg[key]);
+ Vue.set(this.state, key, msg[key]);
if ('msg' in msg) this.$broadcast('message', msg);
}
this.status = 'disconnected';
this.$broadcast(this.status);
}.bind(this);
+
+ console.debug('Hello');
},
get_reason: function () {
- return this.state.x == 'HOLDING' ? this.state.pr : '';
+ if (this.state.x == 'ESTOPPED') return this.state.er;
+ if (this.state.x == 'HOLDING') return this.state.pr;
+ return '';
},
self._stop_sending_gcode()
self.vars.update(update)
- self.ctrl.lcd.update(update)
- self.ctrl.web.broadcast(update)
+ try:
+ self.ctrl.lcd.update(update)
+ except Exception as e:
+ log.error('Updating LCD: %s', e)
+
+ try:
+ self.ctrl.web.broadcast(update)
+ except Exception as e:
+ log.error('Updating Web: %s', e)
def queue_command(self, cmd):
self.queue.append(cmd)
def broadcast(self, msg):
- if self.clients:
+ if len(self.clients):
self.clients[0].broadcast(self.clients, msg)
"default": "when-moving",
"code": "pm"
},
- "max-current": {
- "type": "percent",
- "unit": "%",
- "default": 80,
- "code": "xc"
- },
- "min-current": {
- "type": "percent",
- "unit": "%",
- "default": 20,
- "code": "lc"
+ "drive-current": {
+ "type": "float",
+ "min": 0,
+ "max": 8,
+ "unit": "A",
+ "default": 2,
+ "code": "dc"
},
"idle-current": {
- "type": "percent",
- "unit": "%",
- "default": 1,
+ "type": "float",
+ "min": 0,
+ "max": 8,
+ "unit": "A",
+ "default": 0,
"code": "ic"
}
},