|
20 | 20 | constexpr size_t DefaultNumAnchors = 4; |
21 | 21 | // Default anchor coordinates |
22 | 22 | // These are only placeholders. Each machine must have these values calibrated in order to work correctly. |
23 | | -constexpr float DefaultAnchors[6][3] = {{ 0.0, -2000.0, -100.0}, |
| 23 | +constexpr float DefaultAnchors[7][3] = {{ 0.0, -2000.0, -100.0}, |
24 | 24 | { 2000.0, 1000.0, -100.0}, |
25 | 25 | {-2000.0, 1000.0, -100.0}, |
26 | 26 | { 0.0, 0.0, 3000.0}, |
27 | 27 | { 0.0, 0.0, 0.0}, |
| 28 | + { 0.0, 0.0, 0.0}, |
28 | 29 | { 0.0, 0.0, 0.0}}; |
29 | 30 | constexpr float DefaultPrintRadius = 1500.0; |
30 | 31 |
|
@@ -84,13 +85,13 @@ void HangprinterKinematics::Init() noexcept |
84 | 85 | * In practice you might want to compensate a bit more or a bit less */ |
85 | 86 | constexpr float DefaultSpoolBuildupFactor = 0.007; |
86 | 87 | /* Measure and set spool radii with M669 to achieve better accuracy */ |
87 | | - constexpr float DefaultSpoolRadii[HANGPRINTER_MAX_AXES] = { 75.0, 75.0, 75.0, 75.0, 75.0, 75.0}; // HP4 default |
| 88 | + constexpr float DefaultSpoolRadii[HANGPRINTER_MAX_AXES] = { 75.0, 75.0, 75.0, 75.0, 75.0, 75.0, 75.0}; // HP4 default |
88 | 89 | /* If axis runs lines back through pulley system, set mechanical advantage accordingly with M669 */ |
89 | | - constexpr uint32_t DefaultMechanicalAdvantage[HANGPRINTER_MAX_AXES] = { 2, 2, 2, 2, 2, 4}; // HP4 default |
90 | | - constexpr uint32_t DefaultLinesPerSpool[HANGPRINTER_MAX_AXES] = { 1, 1, 1, 1, 1, 1}; // HP4 default |
91 | | - constexpr uint32_t DefaultMotorGearTeeth[HANGPRINTER_MAX_AXES] = { 20, 20, 20, 20, 20, 20}; // HP4 default |
92 | | - constexpr uint32_t DefaultSpoolGearTeeth[HANGPRINTER_MAX_AXES] = { 255, 255, 255, 255, 255, 255}; // HP4 default |
93 | | - constexpr uint32_t DefaultFullStepsPerMotorRev[HANGPRINTER_MAX_AXES] = { 25, 25, 25, 25, 25, 25}; |
| 90 | + constexpr uint32_t DefaultMechanicalAdvantage[HANGPRINTER_MAX_AXES] = { 2, 2, 2, 2, 2, 2, 4}; // HP4 default |
| 91 | + constexpr uint32_t DefaultLinesPerSpool[HANGPRINTER_MAX_AXES] = { 1, 1, 1, 1, 1, 1, 1}; // HP4 default |
| 92 | + constexpr uint32_t DefaultMotorGearTeeth[HANGPRINTER_MAX_AXES] = { 20, 20, 20, 20, 20, 20, 20}; // HP4 default |
| 93 | + constexpr uint32_t DefaultSpoolGearTeeth[HANGPRINTER_MAX_AXES] = { 255, 255, 255, 255, 255, 255, 255}; // HP4 default |
| 94 | + constexpr uint32_t DefaultFullStepsPerMotorRev[HANGPRINTER_MAX_AXES] = { 25, 25, 25, 25, 25, 25, 25}; |
94 | 95 | ARRAY_INIT(anchors, DefaultAnchors); |
95 | 96 | numAnchors = DefaultNumAnchors; |
96 | 97 | printRadius = DefaultPrintRadius; |
@@ -183,6 +184,7 @@ bool HangprinterKinematics::Configure(unsigned int mCode, GCodeBuffer& gb, const |
183 | 184 | { |
184 | 185 | Kinematics::Configure(mCode, gb, reply, error); |
185 | 186 | reply.lcatf("P:Print radius: %.1f", (double)printRadius); |
| 187 | + // TODO FIX messages are too long if there are 7 anchors or more |
186 | 188 | for (size_t i = 0; i < numAnchors; ++i) |
187 | 189 | { |
188 | 190 | reply.lcatf("%c:%.2f, %.2f, %.2f", |
@@ -674,8 +676,8 @@ void HangprinterKinematics::PrintParameters(const StringRef& reply) const noexce |
674 | 676 | HangprinterKinematics::ODriveAnswer HangprinterKinematics::GetODrive3EncoderEstimate(DriverId const driver, bool const makeReference, const StringRef& reply, bool const subtractReference) THROWS(GCodeException) |
675 | 677 | { |
676 | 678 | const uint8_t cmd = CANSimple::MSG_GET_ENCODER_ESTIMATES; |
677 | | - static CanAddress seenDrives[HANGPRINTER_MAX_AXES] = { 0, 0, 0, 0, 0, 0 }; |
678 | | - static float referencePositions[HANGPRINTER_MAX_AXES] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; |
| 679 | + static CanAddress seenDrives[HANGPRINTER_MAX_AXES] = { 0, 0, 0, 0, 0, 0, 0 }; |
| 680 | + static float referencePositions[HANGPRINTER_MAX_AXES] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 }; |
679 | 681 | static size_t numSeenDrives = 0; |
680 | 682 | size_t thisDriveIdx = 0; |
681 | 683 |
|
|
0 commit comments