==============================================
## v0.3.24
- -
+ - Added unhome button on axis position popup.
+ - Ignore soft limits of max <= min.
+ - Fixed problem with restarting program in imperial units mode.
## v0.3.23
- Fix for modbus read operation.
--- /dev/null
+startup_message off
sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
echo "sudo -u pi startx" >> /etc/rc.local
cp /mnt/host/xinitrc /home/pi/.xinitrc
+cp /mnt/host/ratpoisonrc /home/pi/.ratpoisonrc
+cp /mnt/host/xorg.conf /etc/X11/
# Set screen resolution
sed -i 's/^#disable_overscan/disable_overscan/' /boot/config.txt
rm -rf $(basename bbctrl-*.tar.bz2 .tar.bz2)
+# Allow any user to shutdown
+chmod +s /sbin/{halt,reboot,shutdown,poweroff}
+
# Clean up
apt-get autoremove -y
apt-get autoclean -y
--- /dev/null
+Section "ServerFlags"
+ Option "DontVTSwitch" "on"
+EndSection
button.pure-button(@click="position_msg['#{axis}'] = false")
| Cancel
+ button.pure-button(v-if="is_homed('#{axis}')",
+ @click="unhome('#{axis}')") Unhome
+
button.pure-button.button-success(
@click="set_position('#{axis}', axis_position)") Set
+
message(:show.sync="manual_home['#{axis}']")
h3(slot="header") Manually home {{'#{axis}' | upper}} axis
},
+ unhome: function (axis) {
+ this.position_msg[axis] = false;
+ api.put('home/' + axis + '/clear');
+ },
+
+
show_set_position: function (axis) {
this.axis_position = 0;
this.position_msg[axis] = true;
def home(self, axis, position = None):
state = self.ctrl.state
- if position is not None:
- self.mdi('G28.3 %c%f' % (axis, position))
- super().resume()
+ if position is not None: self.mdi('G28.3 %c%f' % (axis, position))
else:
self._begin_cycle('homing')
# Home axis
log.info('Homing %s axis' % axis)
self.planner.mdi(axis_homing_procedure % {'axis': axis}, False)
- super().resume()
+
+
+ def unhome(self, axis): self.mdi('G28.2 %c0' % axis)
def estop(self): super().estop()
}
if with_limits:
- config['min-soft-limit'] = self._get_soft_limit('tn', -math.inf)
- config['max-soft-limit'] = self._get_soft_limit('tm', math.inf)
+ minLimit = self._get_soft_limit('tn', -math.inf)
+ maxLimit = self._get_soft_limit('tm', math.inf)
+
+ # If max <= min then no limit
+ for axis in 'xyzabc':
+ if maxLimit[axis] <= minLimit[axis]:
+ minLimit[axis], maxLimit[axis] = -math.inf, math.inf
+
+ config['min-soft-limit'] = minLimit
+ config['max-soft-limit'] = maxLimit
if not mdi:
program_start = self.ctrl.config.get('program-start')
class HomeHandler(bbctrl.APIHandler):
- def put_ok(self, axis, set_home):
+ def put_ok(self, axis, action, *args):
if axis is not None: axis = ord(axis[1:2].lower())
- if set_home:
+ if action == '/set':
if not 'position' in self.json:
raise HTTPError(400, 'Missing "position"')
self.ctrl.mach.home(axis, self.json['position'])
+ elif action == '/clear': self.ctrl.mach.unhome(axis)
else: self.ctrl.mach.home(axis)
(r'/api/firmware/update', FirmwareUpdateHandler),
(r'/api/upgrade', UpgradeHandler),
(r'/api/file(/.+)?', bbctrl.FileHandler),
- (r'/api/home(/[xyzabcXYZABC](/set)?)?', HomeHandler),
+ (r'/api/home(/[xyzabcXYZABC]((/set)|(/clear))?)?', HomeHandler),
(r'/api/start', StartHandler),
(r'/api/estop', EStopHandler),
(r'/api/clear', ClearHandler),