Browse Source

Revert Manhattan

espr14 3 years ago
parent
commit
c2ab8785f4
1 changed files with 5 additions and 5 deletions
  1. 5 5
      Firmware/xyzcal.cpp

+ 5 - 5
Firmware/xyzcal.cpp

@@ -551,8 +551,8 @@ void xyzcal_scan_pixels_32x32_Zhop(int16_t cx, int16_t cy, int16_t min_z, int16_
 
 	for (uint8_t r = 0; r < 32; r++){ ///< Y axis
 		for (uint8_t d = 0; d < 2; ++d){
-			go_manhattan((d & 1) ? (cx + 1024) : (cx - 1024), cy - 1024 + r * 64, _Z, Z_ACCEL, Z_MIN_DELAY);
-			// xyzcal_lineXYZ_to((d & 1) ? (cx + 1024) : (cx - 1024), cy - 1024 + r * 64, _Z, delay_us, 0);
+			// go_manhattan((d & 1) ? (cx + 1024) : (cx - 1024), cy - 1024 + r * 64, _Z, Z_ACCEL, Z_MIN_DELAY);
+			xyzcal_lineXYZ_to((d & 1) ? (cx + 1024) : (cx - 1024), cy - 1024 + r * 64, _Z, delay_us, 0);
 			sm4_set_dir(X_AXIS, d);
 			for (uint8_t c = 0; c < 32; c++){ ///< X axis
 				z_trig = min_z;
@@ -620,11 +620,11 @@ void xyzcal_scan_pixels_32x32_Zhop(int16_t cx, int16_t cy, int16_t min_z, int16_
 				const int16_t half_x = length_x / 2;
 				/// don't go up if PINDA not triggered (optimization)
 				const bool up = _PINDA;
-				const int8_t axis = up ? X_AXIS_MASK | Z_AXIS_MASK : X_AXIS_MASK;
+				const uint8_t axes = up ? X_AXIS_MASK | Z_AXIS_MASK : X_AXIS_MASK;
 				const uint8_t dir = Z_PLUS_MASK | (d & 1 ? X_MINUS_MASK : X_PLUS_MASK);
 
-				accelerate(axis, dir, Z_ACCEL, current_delay_us, Z_MIN_DELAY, half_x);				
-				go_and_stop(axis, dir, Z_ACCEL, current_delay_us, length_x - half_x);
+				accelerate(axes, dir, Z_ACCEL, current_delay_us, Z_MIN_DELAY, half_x);				
+				go_and_stop(axes, dir, Z_ACCEL, current_delay_us, length_x - half_x);
 			}
 		}
 		// DBG(_n("\n\n"));