Skip to content

Commit

Permalink
Correct typos
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Apr 24, 2017
1 parent c0921eb commit c5b9fcb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/controllers/Smoothie/SmoothieController.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class SmoothieController {

// Example
// "G0 X[posx - 8] Y[ymax]" -> "G0 X2 Y50"
line = this.translateWithContext(line, context);
line = this.translateLineWithContext(line, context);

this.emitAll('serialport:write', line);

Expand Down Expand Up @@ -211,7 +211,7 @@ class SmoothieController {

// Example
// "G0 X[posx - 8] Y[ymax]" -> "G0 X2 Y50"
line = this.translateWithContext(line, context);
line = this.translateLineWithContext(line, context);

this.serialport.write(line + '\n');
log.silly(`> ${line}`);
Expand Down
6 changes: 3 additions & 3 deletions src/app/controllers/TinyG/TinyGController.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,12 @@ class TinyGController {
const now = new Date().getTime();
const timespan = Math.abs(now - this.actionTime.senderFinishTime);
const toleranceTime = 1000; // 1000ms
const activeState = _.get(this.state, 'status.activeState');
const machineState = _.get(this.state, 'sr.machineState');
const isControllerIdle = _.includes([
TINYG_MACHINE_STATE_READY,
TINYG_MACHINE_STATE_STOP,
TINYG_MACHINE_STATE_END
], activeState);
], machineState);

if (!isControllerIdle) {
// Extend the sender finish time if the controller state is not idle
Expand All @@ -393,7 +393,7 @@ class TinyGController {
}

if (timespan > toleranceTime) {
log.debug(`Stop workflow: activeState=${activeState}, timespan=${timespan}ms`);
log.debug(`Stop workflow: machineState=${machineState}, timespan=${timespan}ms`);

this.actionTime.senderFinishTime = 0;

Expand Down

0 comments on commit c5b9fcb

Please sign in to comment.