Restored estop text, Removed more references to power-mode
authorJoseph Coffland <joseph@cauldrondevelopment.com>
Sat, 9 Mar 2019 23:23:32 +0000 (15:23 -0800)
committerJoseph Coffland <joseph@cauldrondevelopment.com>
Sat, 9 Mar 2019 23:23:32 +0000 (15:23 -0800)
CHANGELOG.md
src/js/axis-vars.js
src/js/indicators.js
src/pug/templates/estop.pug
src/py/bbctrl/State.py
src/stylus/style.styl

index 0f3659392b0df41e557663496307b145f7a20d68..1d395cac5a3d6e33dd97f76c96c0cb178b9c426d 100644 (file)
@@ -1,5 +1,5 @@
 Buildbotics CNC Controller Firmware Changelog
-==============================================
+=============================================
 
 ## v0.4.6
  - Fixed a rare ``Negative s-curve time`` error.
@@ -9,6 +9,7 @@ Buildbotics CNC Controller Firmware Changelog
  - Limit idle-current to 2A.
  - Removed dangerous ``power-mode`` in favor of simpler ``enabled`` option.
  - Fixed bug where motor driver could fail to disabled during estop.
+ - Restored estop text.
 
 ## v0.4.5
  - Fix for random errors while running VFD.
index c86b224d23543415d12e5c29fea7b1b2b05194c6..6f0b7c43de3c7c97a51674180211a741fb87c55d 100644 (file)
@@ -63,8 +63,7 @@ module.exports = {
       var off        = this.state['offset_' + axis];
       var motor_id   = this._get_motor_id(axis);
       var motor      = motor_id == -1 ? {} : this.config.motors[motor_id];
-      var pm         = motor['power-mode'];
-      var enabled    = typeof pm != 'undefined' && pm != 'disabled';
+      var enabled    = typeof motor.enabled != 'undefined' && motor.enabled;
       var homingMode = motor['homing-mode']
       var homed      = this.state[motor_id + 'homed'];
       var min        = this.state[motor_id + 'tn'];
index e9881b1de4a37e3243c3f54e37a41c26df824af1..058667372a70cb2ae3be314b9cb7837a59208909 100644 (file)
@@ -55,8 +55,8 @@ module.exports = {
 
   methods: {
     is_motor_enabled: function (motor) {
-      return typeof this.state[motor + 'pm'] != 'undefined' &&
-        this.state[motor + 'pm'];
+      return typeof this.state[motor + 'me'] != 'undefined' &&
+        this.state[motor + 'me'];
     },
 
 
index 472c72c2c8af5d1a9d2367239d47b21f8edad796..2af3df0caf3b771587b7669a55cd4f97bab1766e 100644 (file)
@@ -31,12 +31,12 @@ script#estop-template(type="text/x-template")
     xmlns:xlink="http://www.w3.org/1999/xlink",
     width="130", height="130")
       defs
-        path#text-path-1(style="fill:none;stroke:none", d="m 73.735867,673.1299 c 0,55.10749 44.673453,99.78094 99.780973,99.78094 55.10748,0 99.78093,-44.67345 99.78093,-99.78094 0,-55.10749 -44.67345,-99.78094 -99.78093,-99.78094 -55.10752,0 -99.780973,44.67345 -99.780973,99.78094 z")
+        path#text-path-1(d="m 73.735,673.129 c 0,55.107 44.673,99.780 99.780,99.780 55.107,0 99.780,-44.673 99.780,-99.780 0,-55.107 -44.673,-99.780 -99.780,-99.780 -55.107,0 -99.780,44.673 -99.780,99.780 z")
 
-        path#text-path-2(style="fill:none;stroke:none", d="m 258.7149,673.1299 c 0,47.0536 -38.14448,85.19809 -85.19809,85.19809 -47.0536,0 -85.198083,-38.14449 -85.198083,-85.19809 0,-47.05361 38.144483,-85.19809 85.198083,-85.19809 47.05361,0 85.19809,38.14448 85.19809,85.19809 z")
+        path#text-path-2(d="m 258.714,673.129 c 0,47.053 -38.144,85.198 -85.198,85.198 -47.053,0 -85.198,-38.144 -85.198,-85.198 0,-47.053 38.144,-85.198 85.198,-85.198 47.053,0 85.198,38.144 85.198,85.198 z")
 
         filter#filter5134(style="color-interpolation-filters:sRGB")
-          feflood(flood-opacity="0.431373", flood-color="rgb(0,0,0)")
+          feflood(flood-opacity="0.431", flood-color="rgb(0,0,0)")
           fecomposite(in2="SourceGraphic", operator="in")
           fegaussianblur(stddeviation="4", result="blur")
           feoffset(dx="4", dy="4", result="offset")
@@ -44,7 +44,7 @@ script#estop-template(type="text/x-template")
             result="fbSourceGraphic")
           fecolormatrix(result="fbSourceGraphicAlpha", in="fbSourceGraphic",
             values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0")
-          feflood(flood-opacity="0.431373", flood-color="rgb(0,0,0)",
+          feflood(flood-opacity="0.431", flood-color="rgb(0,0,0)",
             in="fbSourceGraphic")
           fecomposite(in2="fbSourceGraphic", operator="out")
           fegaussianblur(stddeviation="4", result="blur")
@@ -53,7 +53,7 @@ script#estop-template(type="text/x-template")
             result="fbSourceGraphic")
           fecolormatrix(result="fbSourceGraphicAlpha", in="fbSourceGraphic",
             values="0 0 0 -1 0 0 0 0 -1 0 0 0 0 -1 0 0 0 0 1 0")
-          feflood(flood-opacity="0.431373", flood-color="rgb(0,0,0)",
+          feflood(flood-opacity="0.431", flood-color="rgb(0,0,0)",
             in="fbSourceGraphic")
           fecomposite(in2="fbSourceGraphic", operator="in")
           fegaussianblur(stddeviation="4", result="blur")
@@ -61,61 +61,58 @@ script#estop-template(type="text/x-template")
           fecomposite(in2="offset", in="fbSourceGraphic", operator="over")
 
         filter#filter5158(style="color-interpolation-filters:sRGB",)
-          feflood(flood-opacity="0.431373", flood-color="rgb(0,0,0)")
+          feflood(flood-opacity="0.431", flood-color="rgb(0,0,0)")
           fecomposite(in2="SourceGraphic", operator="out")
           fegaussianblur(stddeviation="7", result="blur")
           feoffset(dx="4", dy="4")
           fecomposite(in2="SourceGraphic", operator="atop")
 
         filter#filter5266(style="color-interpolation-filters:sRGB")
-          feflood(flood-opacity="0.372549", flood-color="rgb(0,0,0)")
+          feflood(flood-opacity="0.372", flood-color="rgb(0,0,0)")
           fecomposite(in2="SourceGraphic", operator="in")
           fegaussianblur(stddeviation="2", result="blur")
           feoffset(dx="1", dy="1", result="offset")
           fecomposite(in="SourceGraphic", in2="offset", operator="over")
 
         filter#filter5278(style="color-interpolation-filters:sRGB")
-          feflood(flood-opacity="0.372549", flood-color="rgb(0,0,0)")
+          feflood(flood-opacity="0.372", flood-color="rgb(0,0,0)")
           fecomposite(in2="SourceGraphic", operator="out")
           fegaussianblur(stddeviation="2", result="blur")
           feoffset(dx="2", dy="2", result="offset")
           fecomposite(in="offset", in2="SourceGraphic", operator="atop")
 
 
-      g(transform="scale(0.6, 0.6),translate(-65, -526)")
+      g(transform="scale(0.6, 0.6), translate(-65, -526)")
         // Yellow ring
         circle.ring(style="fill:#f5e138;filter:url(#filter5266)",
           cx="173", cy="633", r="100")
 
         // Text
-        text(style="font-weight:bold;font-size:20px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none",
-          transform="matrix(-0.73361478,-0.67956556,0.67956556,-0.73361478,-156.72624,1250.7027)",
-          x="-1350.5394", y="-1579.3965")
-          textpath(xlink:href="#text-path-2") EMERGENCY
+        g(style="font-weight:bold;font-size:20px;font-family:Sans;fill:#666")
+          text(transform="matrix(-0.733,-0.679,0.679,-0.733,-156.726,1250.703)")
+            textpath(xlink:href="#text-path-2") EMERGENCY
 
-        text(style="font-weight:bold;font-size:20px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none",
-          transform="matrix(0.27634044,-0.96105981,0.96105981,0.27634044,-523.81801,609.02637)",
-          x="-754.20117", y="157.03941")
-          textpath(xlink:href="#text-path-1") STOP
+          text(transform="matrix(0.276,-0.961,0.961,0.276,-523.818,609.026)")
+            textpath(xlink:href="#text-path-1") STOP
 
         g.button
-          circle(style="fill:#b72424;filter:url(#filter5134)",
+          circle(style="fill:#c42626;filter:url(#filter5134)",
             cx="173", cy="633", r="74")
 
           // Inner circle
-          circle(style="fill:#b72424;filter:url(#filter5158)",
+          circle(style="fill:#c42626;filter:url(#filter5158)",
             cx="173", cy="633", r="37")
 
           // Arrows
-          g(transform="matrix(0.32737901,0,0,0.32737901,50.806169,478.96619)", style="stroke:#fff;stroke-width:26;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;filter:url(#filter5278);fill:none")
+          g(transform="matrix(0.327,0,0,0.327,50.806,478.966)", style="stroke:#fff;stroke-width:13;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;filter:url(#filter5278);fill:none")
             g
-              path(transform="matrix(1.9461546,0,0,1.9461546,-359.98722,-383.37383)", style="stroke-width:13", d="m 411.6967,521.14701 c -10.57464,4.47269 -22.20085,6.94599 -34.40474,6.94599 -12.20389,0 -23.8301,-2.4733 -34.40474,-6.94599 -10.57463,-4.4727 -20.09769,-10.94478 -28.09526,-18.94236 -7.99757,-7.99757 -12.91355,-13.50409 -17.38625,-24.07872")
-              path(d="m 221.80189,582.65761 -2.99162,-35.52447 28.48213,14.16667 z")
+              path(transform="matrix(1.946,0,0,1.946,-359.987,-383.373)", d="m 411.696,521.147 c -10.574,4.472 -22.200,6.945 -34.404,6.945 -12.203,0 -23.830,-2.473 -34.404,-6.945 -10.574,-4.472 -20.097,-10.944 -28.095,-18.942 -7.997,-7.997 -12.913,-13.504 -17.386,-24.078")
+              path(d="m 221.801,582.657 -2.991,-35.524 28.482,14.166 z")
 
-            g(transform="matrix(-0.5,-0.8660254,0.8660254,-0.5,149.81163,1033.4478)")
-              path(transform="matrix(1.9461546,0,0,1.9461546,-359.98722,-383.37383)", style="stroke-width:13", d="m 411.6967,521.14701 c -10.57464,4.47269 -22.20085,6.94599 -34.40474,6.94599 -12.20389,0 -23.8301,-2.4733 -34.40474,-6.94599 -10.57463,-4.4727 -20.09769,-10.94478 -28.09526,-18.94236 -7.99757,-7.99757 -11.52544,-14.20559 -17.38625,-24.07872")
-              path(d="m 221.80189,582.65761 -2.99162,-35.52447 28.48213,14.16667 z")
+            g(transform="matrix(-0.5,-0.866,0.866,-0.5,149.811,1033.447)")
+              path(transform="matrix(1.946,0,0,1.946,-359.987,-383.373)", d="m 411.696,521.147 c -10.574,4.472 -22.200,6.945 -34.404,6.945 -12.203,0 -23.830,-2.473 -34.404,-6.945 -10.574,-4.472 -20.097,-10.944 -28.095,-18.942 -7.997,-7.997 -11.525,-14.205 -17.386,-24.078")
+              path(d="m 221.801,582.657 -2.991,-35.524 28.482,14.166 z")
 
-            g(transform="matrix(-0.5,0.8660254,-0.8660254,-0.5,971.43059,383.18517)")
-              path(transform="matrix(1.9461546,0,0,1.9461546,-359.98722,-383.37383)", style="stroke-width:13", d="m 411.6967,521.14701 c -10.57464,4.47269 -22.20085,6.94599 -34.40474,6.94599 -12.20389,0 -23.8301,-2.4733 -34.40474,-6.94599 -10.57463,-4.4727 -20.09769,-10.94478 -28.09526,-18.94236 -7.99757,-7.99757 -9.56206,-8.6246 -14.03476,-19.19923")
-              path(d="m 221.80189,582.65761 -2.99162,-35.52447 28.48213,14.16667 z")
+            g(transform="matrix(-0.5,0.866,-0.866,-0.5,971.430,383.185)")
+              path(transform="matrix(1.946,0,0,1.946,-359.987,-383.373)", d="m 411.696,521.147 c -10.574,4.472 -22.200,6.945 -34.404,6.945 -12.203,0 -23.830,-2.473 -34.404,-6.945 -10.574,-4.472 -20.097,-10.944 -28.095,-18.942 -7.997,-7.997 -9.562,-8.624 -14.034,-19.199")
+              path(d="m 221.801,582.657 -2.991,-35.524 28.482,14.166 z")
index bf1e0ab111e0f29e06804de025610731ee67f26c..12903b8e33c64178cb5d54ef637d628c55a2d473 100644 (file)
@@ -277,10 +277,10 @@ class State(object):
 
 
     def find_motor(self, axis):
-        for motor in range(6):
+        for motor in range(4):
             if not ('%dan' % motor) in self.vars: continue
             motor_axis = 'xyzabc'[self.vars['%dan' % motor]]
-            if motor_axis == axis.lower() and self.vars.get('%dpm' % motor, 0):
+            if motor_axis == axis.lower() and self.vars.get('%dme' % motor, 0):
                 return motor
 
 
@@ -339,7 +339,7 @@ class State(object):
 
 
     def motor_enabled(self, motor):
-        return bool(int(self.vars.get('%dpm' % motor, 0)))
+        return bool(int(self.vars.get('%dme' % motor, 0)))
 
 
     def motor_homing_mode(self, motor):
index 53204283b56b937dbf487ed719ee9341812ca081..4dffc46a0dbd2fa1da15e63c908a471591358a1a 100644 (file)
@@ -217,7 +217,7 @@ span.unit
         height 12em
 
       > select, > input:not([type=checkbox])
-        min-width 11em
+        min-width 200px
 
       > tt
         min-width 15.25em
@@ -236,6 +236,9 @@ span.unit
   &.active .ring
     animation blink 2s step-start 0s infinite
 
+  &:hover .button circle
+    fill #b72424 !important
+
   svg
     cursor pointer
 
@@ -792,7 +795,7 @@ tt.save
     white-space nowrap
 
   fieldset.limits, fieldset.homing, fieldset.motion .pure-control-group,
-  fieldset.power .pure-control-group.tmpl-input-power-mode
+  fieldset.power .pure-control-group.tmpl-input-enabled
     display none
 
   fieldset.motion .pure-control-group.tmpl-input-reverse