Browse Source

Simpler report_current_position for SCARA

Scott Lahteine 8 years ago
parent
commit
5efb12e889
2 changed files with 7 additions and 19 deletions
  1. 2
    14
      Marlin/Marlin_main.cpp
  2. 5
    5
      Marlin/stepper.h

+ 2
- 14
Marlin/Marlin_main.cpp View File

5116
   stepper.report_positions();
5116
   stepper.report_positions();
5117
 
5117
 
5118
   #if IS_SCARA
5118
   #if IS_SCARA
5119
-    SERIAL_PROTOCOLPGM("SCARA Theta:");
5120
-    SERIAL_PROTOCOL(delta[A_AXIS]);
5121
-    SERIAL_PROTOCOLPGM("   Psi+Theta:");
5122
-    SERIAL_PROTOCOLLN(delta[B_AXIS]);
5123
-
5124
-    SERIAL_PROTOCOLPGM("SCARA Cal - Theta:");
5125
-    SERIAL_PROTOCOL(delta[A_AXIS]);
5126
-    SERIAL_PROTOCOLPGM("   Psi+Theta (90):");
5127
-    SERIAL_PROTOCOLLN(delta[B_AXIS] - delta[A_AXIS] - 90);
5128
-
5129
-    SERIAL_PROTOCOLPGM("SCARA step Cal - Theta:");
5130
-    SERIAL_PROTOCOL(delta[A_AXIS] / 90 * planner.axis_steps_per_mm[A_AXIS]);
5131
-    SERIAL_PROTOCOLPGM("   Psi+Theta:");
5132
-    SERIAL_PROTOCOLLN((delta[B_AXIS] - delta[A_AXIS]) / 90 * planner.axis_steps_per_mm[A_AXIS]);
5119
+    SERIAL_PROTOCOLPAIR("SCARA Theta:", stepper.get_axis_position_mm(A_AXIS));
5120
+    SERIAL_PROTOCOLLNPAIR("   Psi+Theta:", stepper.get_axis_position_mm(B_AXIS));
5133
     SERIAL_EOL;
5121
     SERIAL_EOL;
5134
   #endif
5122
   #endif
5135
 }
5123
 }

+ 5
- 5
Marlin/stepper.h View File

91
       static bool performing_homing;
91
       static bool performing_homing;
92
     #endif
92
     #endif
93
 
93
 
94
-    //
95
-    // Positions of stepper motors, in step units
96
-    //
97
-    static volatile long count_position[NUM_AXIS];
98
-
99
   private:
94
   private:
100
 
95
 
101
     static unsigned char last_direction_bits;        // The next stepping-bits to be output
96
     static unsigned char last_direction_bits;        // The next stepping-bits to be output
144
     #endif
139
     #endif
145
 
140
 
146
     //
141
     //
142
+    // Positions of stepper motors, in step units
143
+    //
144
+    static volatile long count_position[NUM_AXIS];
145
+
146
+    //
147
     // Current direction of stepper motors (+1 or -1)
147
     // Current direction of stepper motors (+1 or -1)
148
     //
148
     //
149
     static volatile signed char count_direction[NUM_AXIS];
149
     static volatile signed char count_direction[NUM_AXIS];

Loading…
Cancel
Save