From 2cb5b0246c082dd7ccc91cfc00ab816126ca8ca4 Mon Sep 17 00:00:00 2001 From: make-ing Date: Wed, 9 Sep 2015 14:06:30 +0200 Subject: [PATCH] fixed grbl travel settup problem when switching to senior --- src/octoprint/plugins/lasercutterprofiles/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/octoprint/plugins/lasercutterprofiles/__init__.py b/src/octoprint/plugins/lasercutterprofiles/__init__.py index 65856fab..e721e34e 100644 --- a/src/octoprint/plugins/lasercutterprofiles/__init__.py +++ b/src/octoprint/plugins/lasercutterprofiles/__init__.py @@ -204,10 +204,16 @@ class LaserCutterProfilesPlugin(octoprint.plugin.SettingsPlugin, if self._printer.is_locked() or self._printer.is_operational(): if "volume" in new_profile: if "width" in new_profile["volume"]: - self._printer.commands('$130=' + str(int(new_profile['volume']['width']))) + width = int(new_profile['volume']['width']) + if identifier == "_mrbeam_senior": + width *= 2 + self._printer.commands('$130=' + str(width)) time.sleep(0.1) ### TODO find better solution then sleep if "depth" in new_profile["volume"]: - self._printer.commands('$131=' + str(int(new_profile['volume']['depth']))) + depth = int(new_profile['volume']['depth']) + if identifier == "_mrbeam_senior": + depth *= 2 + self._printer.commands('$131=' + str(depth)) new_profile["id"] = identifier