Skip to content

Instantly share code, notes, and snippets.

@triffid
Created January 6, 2013 00:38
Show Gist options
  • Select an option

  • Save triffid/4464526 to your computer and use it in GitHub Desktop.

Select an option

Save triffid/4464526 to your computer and use it in GitHub Desktop.
G92 fix
diff --git a/src/modules/robot/Robot.cpp b/src/modules/robot/Robot.cpp
index 3dcb7bb..c4bf877 100644
--- a/src/modules/robot/Robot.cpp
+++ b/src/modules/robot/Robot.cpp
@@ -112,10 +112,7 @@ void Robot::execute_gcode(Gcode* gcode){
case 91: this->absolute_mode = false; break;
case 92: {
if(gcode->get_num_args() == 0){
- for (char letter = 'X'; letter <= 'Z'; letter++){
- if ( gcode->has_letter(letter) )
- this->last_milestone[letter-'X'] = this->to_millimeters(0.0);
- }
+ clear_vector_double(this->last_milestone);
}else{
for (char letter = 'X'; letter <= 'Z'; letter++){
if ( gcode->has_letter(letter) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment