From 72315116597ac763a5766b4a1642d7d6840d68bf Mon Sep 17 00:00:00 2001 From: Joseph Coffland Date: Sat, 23 Jun 2018 12:21:29 -0700 Subject: [PATCH] Error on home if max-soft-limit <= min-soft-limit + 1. #139 --- CHANGELOG.md | 3 +++ src/py/bbctrl/State.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b264aa..3a2d134 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ Buildbotics CNC Controller Firmware Changelog ============================================== +## v0.3.25 + - Error on home if max-soft-limit <= min-soft-limit + 1. #139 + ## v0.3.24 - Added unhome button on axis position popup. - Ignore soft limits of max <= min. diff --git a/src/py/bbctrl/State.py b/src/py/bbctrl/State.py index 5c390a6..2bee646 100644 --- a/src/py/bbctrl/State.py +++ b/src/py/bbctrl/State.py @@ -201,6 +201,12 @@ class State(object): if mode == 'switch-max' and not int(self.get(axis + '_xs')): return 'Configured for max switch but switch is disabled' + softMin = int(self.get(axis + '_tn')) + softMax = int(self.get(axis + '_tm')) + if softMax <= softMin + 1: + return 'max-soft-limit must be at least 1mm greater ' \ + 'than min-soft-limit' + def motor_enabled(self, motor): return bool(int(self.vars.get('%dpm' % motor, 0))) -- 2.27.0