Skip to content

Commit

Permalink
Add system status to position updates
Browse files Browse the repository at this point in the history
  • Loading branch information
BarbourSmith committed Jul 19, 2018
1 parent f12afee commit 9ca7c2c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion cnc_ctrl_v1/Report.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,14 +264,21 @@ void returnPoz(){
if (millis() - lastRan > POSITIONTIMEOUT){


Serial.print(F("<Idle,MPos:"));
Serial.print(F("<"));
if (sys.pause){
Serial.print(F("Pause,MPos:"));
}
else{
Serial.print(F("Idle,MPos:"));
}
Serial.print(sys.xPosition/sys.inchesToMMConversion);
Serial.print(F(","));
Serial.print(sys.yPosition/sys.inchesToMMConversion);
Serial.print(F(","));
Serial.print(zAxis.read()/sys.inchesToMMConversion);
Serial.println(F(",WPos:0.000,0.000,0.000>"));


returnError();

lastRan = millis();
Expand Down
2 changes: 1 addition & 1 deletion cnc_ctrl_v1/System.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Copyright 2014-2017 Bar Smith*/
#define NEED_Z_DIST_PER_ROT bit(3)

// Storage for global system states
// Some of this could be more appropiately moved to the gcode parser
// Some of this could be more appropriately moved to the gcode parser
typedef struct {
bool stop; // Stop flag.
byte state; // State tracking flag
Expand Down
2 changes: 1 addition & 1 deletion cnc_ctrl_v1/cnc_ctrl_v1.ino
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void loop(){
initMotion(); // on USB disconnect. Might consider removing
setSpindlePower(false); // this restriction for safety if we are
} // comfortable that USB disconnects are
// not a common occurence anymore
// not a common occurrence anymore
kinematics.init();

// Let's go!
Expand Down

0 comments on commit 9ca7c2c

Please sign in to comment.