diff --git a/package.json b/package.json index ce57a15..6c3ad00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bbctrl", - "version": "1.0.7", + "version": "1.0.8b1", "homepage": "https://onefinitycnc.com/", "repository": "https://github.com/OneFinityCNC/onefinity", "license": "GPL-3.0+", diff --git a/scripts/gplan-build.sh b/scripts/gplan-build.sh index f770c5e..2d858c4 100755 --- a/scripts/gplan-build.sh +++ b/scripts/gplan-build.sh @@ -4,8 +4,14 @@ cd /mnt/host scons -j 8 -C cbang disable_local="re2 libevent" export CBANG_HOME="/mnt/host/cbang" -perl -i -0pe 's/case 610: setPathMode.*;/case 610: break;/gm' /mnt/host/camotics/src/gcode/ControllerImpl.cpp -perl -i -0pe 's/case 611: setPathMode.*;/case 611: break;/gm' /mnt/host/camotics/src/gcode/ControllerImpl.cpp -perl -i -0pe 's/case 640: {[^}]+}/case 640: break;/gm' /mnt/host/camotics/src/gcode/ControllerImpl.cpp +CAMOTICS_ROOT="/mnt/host/camotics" +CAMOTICS_PLAN="${CAMOTICS_ROOT}/src/gcode/plan" + +mkdir -p ${CAMOTICS_ROOT}/build +touch ${CAMOTICS_ROOT}/build/version.txt + +perl -i -0pe 's/(fabs\((config\.maxVel\[axis\]) \/ unit\[axis\]\));/std::min(\2, \1);/gm' ${CAMOTICS_PLAN}/LineCommand.cpp ${CAMOTICS_PLAN}/LinePlanner.cpp +perl -i -0pe 's/(fabs\((config\.maxJerk\[axis\]) \/ unit\[axis\]\));/std::min(\2, \1);/gm' ${CAMOTICS_PLAN}/LineCommand.cpp ${CAMOTICS_PLAN}/LinePlanner.cpp +perl -i -0pe 's/(fabs\((config\.maxAccel\[axis\]) \/ unit\[axis\]\));/std::min(\2, \1);/gm' ${CAMOTICS_PLAN}/LineCommand.cpp ${CAMOTICS_PLAN}/LinePlanner.cpp scons -j 8 -C camotics gplan.so with_gui=0 with_tpl=0 diff --git a/src/py/bbctrl/Config.py b/src/py/bbctrl/Config.py index 370dddd..f9f283d 100644 --- a/src/py/bbctrl/Config.py +++ b/src/py/bbctrl/Config.py @@ -164,6 +164,10 @@ class Config(object): motor['max-jerk'] = 1000 motor['zero-backoff'] = 1 + if version < (1, 0, 8): + config['settings']['max-deviation'] = 0.05 + config['settings']['junction-accel'] = 200000 + config['version'] = self.version.split('b')[0] config['full_version'] = self.version diff --git a/src/py/bbctrl/Planner.py b/src/py/bbctrl/Planner.py index 142d943..e1efb08 100644 --- a/src/py/bbctrl/Planner.py +++ b/src/py/bbctrl/Planner.py @@ -83,6 +83,7 @@ class Planner(): state = self.ctrl.state config = self.ctrl.config is_pwm = config.get('tool-type') == 'PWM Spindle' + deviation = config.get('max-deviation') cfg = { # NOTE Must get current units not configured default units @@ -91,8 +92,9 @@ class Planner(): 'max-accel': state.get_axis_vector('am', 1000000), 'max-jerk': state.get_axis_vector('jm', 1000000), 'rapid-auto-off': config.get('rapid-auto-off') and is_pwm, - 'max-blend-error': config.get('max-deviation'), - 'max-merge-error': config.get('max-deviation'), + 'max-blend-error': deviation, + 'max-merge-error': deviation, + 'max-arc-error': deviation / 10, 'junction-accel': config.get('junction-accel'), } diff --git a/src/resources/config-template.json b/src/resources/config-template.json index 98e5c56..539ee3e 100644 --- a/src/resources/config-template.json +++ b/src/resources/config-template.json @@ -9,7 +9,7 @@ "help": "Default allowed deviation from programmed path. Also see G64 & G61.", "type": "float", - "min": 0.001, + "min": 0.05, "max": 100, "unit": "mm", "default": 0.1 diff --git a/src/resources/onefinity_machinist_defaults.json b/src/resources/onefinity_machinist_defaults.json index d6577e3..7542227 100644 --- a/src/resources/onefinity_machinist_defaults.json +++ b/src/resources/onefinity_machinist_defaults.json @@ -28,7 +28,7 @@ }, "settings": { "junction-accel": 200000, - "max-deviation": 0.001, + "max-deviation": 0.05, "units": "METRIC", "probing-prompts": true }, diff --git a/src/resources/onefinity_woodworker_defaults.json b/src/resources/onefinity_woodworker_defaults.json index ccfe8bc..bca8fc7 100644 --- a/src/resources/onefinity_woodworker_defaults.json +++ b/src/resources/onefinity_woodworker_defaults.json @@ -28,7 +28,7 @@ }, "settings": { "junction-accel": 200000, - "max-deviation": 0.001, + "max-deviation": 0.05, "units": "METRIC", "probing-prompts": true },