diff --git a/docs/machines/cnc/index.md b/docs/machines/cnc/index.md index a5904b7fd..aec9e4d77 100644 --- a/docs/machines/cnc/index.md +++ b/docs/machines/cnc/index.md @@ -8,6 +8,8 @@ has_children: true # CNC +Find your machine, below, and click on the appropriate link for the latest firmware. + ## Maslow _Please read the [Maslow-specific instructions](/machines/cnc/maslow)._ @@ -27,6 +29,6 @@ _Please read the [Maslow-specific instructions](/machines/cnc/maslow)._ - [Grbl](https://github.com/gnea/grbl) ([Download](https://github.com/gnea/grbl/releases)) - [Grbl-Mega](https://github.com/gnea/grbl-Mega) ([Download](https://github.com/gnea/grbl-Mega/releases)) -### Tested On +#### Tested On - SainSmart Genmitsu 3180 Pro (Baud Rate: 115200) diff --git a/src/app/lib/Maslow/MaslowCalibration.jsx b/src/app/lib/Maslow/MaslowCalibration.jsx index b05c3f557..7581909e2 100644 --- a/src/app/lib/Maslow/MaslowCalibration.jsx +++ b/src/app/lib/Maslow/MaslowCalibration.jsx @@ -132,9 +132,9 @@ class MaslowCalibration { return 0; } if (Math.abs(skewRight) > Math.abs(skewLeft)) { - return skewRight; + return Math.round(skewRight); } else { - return skewLeft; + return Math.round(skewLeft); } } diff --git a/src/app/lib/active-state.js b/src/app/lib/active-state.js index 836d8468f..da80fdea2 100644 --- a/src/app/lib/active-state.js +++ b/src/app/lib/active-state.js @@ -1,5 +1,7 @@ import _ from 'lodash'; import { + IMPERIAL_UNITS, + METRIC_UNITS, GRBL, MASLOW, MARLIN, @@ -135,6 +137,10 @@ class ActiveState { return this._state; } + get units() { + return this.isImperialUnits ? IMPERIAL_UNITS : METRIC_UNITS; + } + get isImperialUnits() { return this.modal.units === 'G20'; } diff --git a/src/app/widgets/Axes/Axes.jsx b/src/app/widgets/Axes/Axes.jsx index 981836a81..d62dfb506 100644 --- a/src/app/widgets/Axes/Axes.jsx +++ b/src/app/widgets/Axes/Axes.jsx @@ -22,6 +22,7 @@ const Axes = (props) => { 0) { const dir = result.skew > 0 ? 'clockwise' : 'counter-clockwise'; pre += `Measurements indicate about ${skewAmt}mm ${dir} skew. `; - pre += 'Be extra-certain the stock is not rotated. Otherwise, this should disappear with repeated calibration.'; + pre += 'Be extra-certain the stock is not rotated. Otherwise, this should disappear with repeated calibration. '; } if (result.change.avgErrDist > 0 || result.change.maxErrDist > 0) { return pre + 'The error margin went up. This should not happen. Please start over from the beginning.'; @@ -359,9 +364,9 @@ class CalibrationModal extends PureComponent { return pre + 'Results are quite good for edge calibration; precision calibration may improve them further.'; } } else if (accuracy <= 12.5 && !isPrecisionTab) { - return pre + 'Results are pretty good for edge calibration; precision calibration may improve them further.'; + return pre + 'Results are decent for edge calibration. You should strive for less than 6mm accuracy (lower is better). You can apply results and use Edge calibration again, or move on to the "Precision" tab if results do not improve with repeated calibration.'; } else if (accuracy <= 25) { - return pre + 'Your machine could be calibrated further. If this is your first or second calibration run, this message is normal. If it does not improve, review the help.'; + return pre + 'For better accuracy, it is recommended that you run calibration again. You should strive for less than 6mm accuracy (lower is better). If this does not improve with repeated calibration, review the help.'; } else { return pre + 'Your machine is quite un-calibrated. Please review the help, and check that your frame build is not compromising accuracy.'; } @@ -577,8 +582,8 @@ class CalibrationModal extends PureComponent { {i18n._('Stock')} {i18n._('Frame')} {i18n._('Sled')} - {i18n._('Chains')} {i18n._('Z-Axis')} + {i18n._('Chains')} {i18n._('Edge')} {i18n._('Precision')} @@ -600,7 +605,7 @@ class CalibrationModal extends PureComponent {
)} @@ -785,11 +797,11 @@ class CalibrationModal extends PureComponent {
)} @@ -851,12 +863,12 @@ class CalibrationModal extends PureComponent { {!setFrameSettings && ( )} {setFrameSettings && ( @@ -926,40 +938,6 @@ class CalibrationModal extends PureComponent { )} - {curTab === 'chains' && ( -
-
- {'Now the Maslow will learn how long the chains are currently extended.'} -
- {'This will also create a "save point" to restore calibration (if chains ever come off sprockets).'} -
- {'Please read carefully; "Chains" are the most important step in all of calibration.'} -
- {!alreadyStartedCalibration && !measuredChains && ( -
- -
- )} - {!alreadyStartedCalibration && measuredChains && ( -
-

Chains Set

- - Accuracy is currently at {Math.max(1, Math.round(measuredChains.optimized.maxErrDist * 10) / 10)}mm -
-
- Use Edge Calibration (and then precision calibration) to finish calibration. -
-
- )} - {alreadyStartedCalibration && this.renderAlreadyCalibrated()} -
- )} {curTab === 'z' && (
@@ -1106,6 +1084,43 @@ class CalibrationModal extends PureComponent {
)} + {curTab === 'chains' && ( +
+
+ {'Now the Maslow will learn how long the chains are currently extended.'} +
+ {'This will also create a "save point" to restore calibration (if chains ever come off sprockets).'} +
+ {'Please read carefully; "Chains" are the most important step in all of calibration.'} +
+ {!alreadyStartedCalibration && !measuredChains && ( +
+ +
+ )} + {!alreadyStartedCalibration && measuredChains && ( +
+

Chains Set

+ + Accuracy is currently at {Math.max(1, Math.round(measuredChains.optimized.maxErrDist * 10) / 10)}mm +
+
+ Use Edge Calibration (and then precision calibration) to finish calibration. +
+
+ )} + {alreadyStartedCalibration && this.renderAlreadyCalibrated()} +
+ )} {isCalibrationTab && (
{!hasCalibrationResult && ( @@ -1205,15 +1220,15 @@ class CalibrationModal extends PureComponent { style={{ position: 'absolute', right: '0px', bottom: '0px', width: '40%' }} >

New Accuracy: {accuracy}mm

- These results must be applied to take effect!
{this.getCalibrationRecommendation(result, accuracy)} -
-
+
+ These results must be applied to take effect! After they are applied, you may run Edge or Precision calibration again. +

{canApplyCalibration && (
{canCalibrate && ( - +
+ +
)} {isCalibrating && (i18n._('Calibrating') + '...')} {!canCalibrate && !isCalibrating && !hasCalibrationResult && ( @@ -1297,9 +1319,6 @@ class CalibrationModal extends PureComponent { {!calibrated && ( {'Once all measurements have been entered, the "Calibrate" button will appear.'} -

- {'Tip: try to keep the Console visible in the background of this modal. '} - {'Watch the console output; it can help to learn the gcode & grbl commands, as well as spot problems.'}
)}
diff --git a/src/app/widgets/Maslow/MeasureChainsFlow.jsx b/src/app/widgets/Maslow/MeasureChainsFlow.jsx index a5fec50f5..05a0717c1 100644 --- a/src/app/widgets/Maslow/MeasureChainsFlow.jsx +++ b/src/app/widgets/Maslow/MeasureChainsFlow.jsx @@ -3,8 +3,8 @@ import PropTypes from 'prop-types'; import Workspaces from 'app/lib/workspaces'; import Keypad from 'app/widgets/Axes/Keypad'; import { - METRIC_UNITS, -} from '../../constants'; + IMPERIAL_UNITS, +} from 'app/constants'; // import i18n from 'app/lib/i18n'; class MeasureChainsFlow extends PureComponent { @@ -12,6 +12,8 @@ class MeasureChainsFlow extends PureComponent { workspaceId: PropTypes.string.isRequired, calibration: PropTypes.object.isRequired, setChains: PropTypes.func.isRequired, + setStep: PropTypes.func.isRequired, + step: PropTypes.string, measureCenterOffset: PropTypes.func.isRequired, moveToCenter: PropTypes.func.isRequired, }; @@ -23,7 +25,6 @@ class MeasureChainsFlow extends PureComponent { pages = ['Preparation', 'Alignment', 'Slack', 'Attachment', 'Measurement', 'Axes']; state = { - page: this.pages[0], jog: { metric: { step: 0, @@ -47,12 +48,12 @@ class MeasureChainsFlow extends PureComponent { } get pageNum() { - return this.pages.indexOf(this.state.page); + return this.pages.indexOf(this.props.step) || 0; } set pageNum(pn) { pn = Math.max(0, Math.min(pn, this.pages.length - 1)); - this.setState({ page: this.pages[pn] }); + this.props.setStep(this.pages[pn]); } setPage(name) { @@ -67,13 +68,18 @@ class MeasureChainsFlow extends PureComponent { this.pageNum -= 1; } + get isImperialUnits() { + return this.props.units === IMPERIAL_UNITS; + } + updateJogStep(callback) { - const v = callback(this.state.jog.metric.step); - const metricJogSteps = this.workspace.metricJogSteps; - const step = Math.max(0, Math.min(v, metricJogSteps.length - 1)); + const key = this.isImperialUnits ? 'imperial' : 'metric'; + const v = callback(this.state.jog[key].step); + const jogSteps = this.isImperialUnits ? this.workspace.imperialJogSteps : this.workspace.metricJogSteps; + const step = Math.max(0, Math.min(v, jogSteps.length - 1)); this.setState({ jog: { - metric: { + [key]: { step: step, } } @@ -82,9 +88,10 @@ class MeasureChainsFlow extends PureComponent { keypadActions = { getJogDistance: () => { - const step = this.state.jog.metric.step; - const metricJogSteps = this.workspace.metricJogSteps; - const distance = Number(metricJogSteps[step]) || 0; + const key = this.isImperialUnits ? 'imperial' : 'metric'; + const step = this.state.jog[key].step; + const jogSteps = this.isImperialUnits ? this.workspace.imperialJogSteps : this.workspace.metricJogSteps; + const distance = Number(jogSteps[step]) || 0; return distance; }, stepBackward: () => { @@ -105,7 +112,8 @@ class MeasureChainsFlow extends PureComponent {