From 300ad5d5cb7530efb2095c6950ac7797df88888b Mon Sep 17 00:00:00 2001 From: Jonathan Perret Date: Sun, 1 Dec 2024 21:12:01 +0100 Subject: [PATCH] Adjust carriage offsets to theoretically optimal values --- src/ayab/encoders.h | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/ayab/encoders.h b/src/ayab/encoders.h index 28c7256d..e4d750e3 100644 --- a/src/ayab/encoders.h +++ b/src/ayab/encoders.h @@ -83,23 +83,32 @@ constexpr uint8_t ALL_MAGNETS_CLEARED_RIGHT[NUM_MACHINES] = {199U, 199U, 130U}; constexpr uint8_t GARTER_SLOP = 2U; constexpr uint8_t START_OFFSET[NUM_MACHINES][NUM_DIRECTIONS][NUM_CARRIAGES] = { - // KH910 + // KH910: 16 solenoids, half-cycle is 8 needles + // - K: selectors 24 needles away from center -> solenoid activation points 16 needles away from center + // - L: selectors 12 needles away from center -> solenoid activation points 4 needles away from center + // - G: selector at center -> solenoid activation points 8 needles away from center + // — add END_OFFSET (28) + // - for G add magnet distance from center (12) { // K, L, G - {42U, 32U, 32U}, // Left - {16U, 32U, 50U} // Right + {44U, 32U, 32U}, // Left + {12U, 24U, 48U} // Right }, - // KH930 + // KH930: same as KH910 { // K, L, G - {42U, 32U, 32U}, // Left - {16U, 32U, 50U} // Right + {44U, 32U, 32U}, // Left + {12U, 24U, 48U} // Right }, - // KH270 + // KH270: 12 solenoids, half-cycle is 6 needles + // - K: selectors 15 needles away from center -> solenoid activation points 9 needles away + // - add END_OFFSET (5) + // - add MAGNET_DISTANCE_270 (12) + // - add actual magnet distance from center (3) { // K - {28U, 0U, 0U}, // Left - {16U, 0U, 0U} // Right + {29U, 0U, 0U}, // Left + {11U, 0U, 0U} // Right }}; // Should be calibrated to each device