Skip to content

Commit

Permalink
Merge pull request #85 from clholgat/cholgate/1.0_bug_fixing
Browse files Browse the repository at this point in the history
Update garter carriage values for 910
  • Loading branch information
t0mpr1c3 authored Jun 15, 2023
2 parents 39dfa36 + 68c5489 commit beb4348
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/ayab/encoders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,11 @@ void Encoders::encA_falling() {
if (hallValueSmall || hallValue > FILTER_R_MAX[m_machineType]) {
m_hallActive = Right;

if (hallValueSmall) {

// The garter carriage has a second set of magnets that are going to
// pass the sensor and will reset state incorrectly if allowed to
// continue.
if (hallValueSmall && m_carriage != Garter) {
m_carriage = Knit;
}

Expand Down
6 changes: 3 additions & 3 deletions src/ayab/encoders.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ constexpr uint8_t END_LEFT[NUM_MACHINES] = {0U, 0U, 0U};
constexpr uint8_t END_RIGHT[NUM_MACHINES] = {255U, 255U, 140U};
constexpr uint8_t END_OFFSET[NUM_MACHINES] = {28U, 28U, 14U};

constexpr uint8_t GARTER_SLOP = 14;
constexpr uint8_t GARTER_SLOP = 2;

constexpr uint8_t START_OFFSET[NUM_MACHINES][NUM_DIRECTIONS][NUM_CARRIAGES] = {
// KH910
{
// K, L, G
{40, 40, 8}, // Left
{16, 16, 32} // Right
{40, 40, 32}, // Left
{16, 16, 56} // Right
},
// KH930
{
Expand Down

0 comments on commit beb4348

Please sign in to comment.