From 1fed2c361b5ff64625ed26aeb61d3c5e85a0c472 Mon Sep 17 00:00:00 2001 From: BarbourSmith Date: Fri, 1 Jun 2018 10:26:07 -0700 Subject: [PATCH] Add warning if motors are too close to top of work area --- CalibrationWidgets/vertDistToMotorsGuess.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CalibrationWidgets/vertDistToMotorsGuess.py b/CalibrationWidgets/vertDistToMotorsGuess.py index 2c61aa6d..c79d40f1 100644 --- a/CalibrationWidgets/vertDistToMotorsGuess.py +++ b/CalibrationWidgets/vertDistToMotorsGuess.py @@ -82,7 +82,11 @@ def dismiss_popup(self): def enterValues(self): try: dist = float(self.enterMeasurement.text) - self.data.config.set('Maslow Settings', 'motorOffsetY', str(dist)) + + if dist > 300: + self.data.config.set('Maslow Settings', 'motorOffsetY', str(dist)) + else: + self.data.message_queue.put("Message: Warning: The value you entered for the distance between the motors and the top of the work area is very small. This may cause too much strain on the motors at the top of the sheet.") self.readyToMoveOn() except: self.data.message_queue.put("Message: Couldn't convert that to a number...")