Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Achordion fix 2345 #74

Merged
merged 2 commits into from
Oct 5, 2024
Merged

Achordion fix 2345 #74

merged 2 commits into from
Oct 5, 2024

Conversation

ilc
Copy link
Collaborator

@ilc ilc commented Oct 1, 2024

This updates achordion to the latest version, fixes a logic error in achordion, and also fixes a bug with 2345=67

With this code my board is now stable.

@SiriusStarr SiriusStarr mentioned this pull request Oct 1, 2024
Copy link
Collaborator

@SiriusStarr SiriusStarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor things.

I understand why I wasn't seeing this, though, since I don't use streaks.

@@ -67,8 +68,10 @@ static uint8_t achordion_state = STATE_RELEASED;
static void update_streak_timer(uint16_t keycode, keyrecord_t* record) {
if (achordion_streak_continue(keycode)) {
// We use 0 to represent an unset timer, so `| 1` to force a nonzero value.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably ditch this unnecessary comment and leave one explaining your change, so we know what's going on next time upstream achordion changes.

@@ -201,19 +200,20 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
in_mod_tap_layer = get_highest_layer(layer_state);
layer_state = layer_state & ~(1 << in_mod_tap_layer);

action_exec(record->event);

// action_exec(record->event);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to not leave code commented out with no explanation, because it makes my brain nervous wondering if it's meant to be that way. 😆 I say purge it or explain it.

@@ -57,6 +57,7 @@
extern "C" {
#endif


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this accidental or just missed from the upstream? Probably want to minimize the diff if it's unnecessary, unless your formatter is yelling that much.

This fixes a rare bug in the achordion timer, by simplifying
the logic. I'm not sure where the math is wrong.  Just that it
is.

Also make 2345=67 more compatible with achordion to close
up the final bug I found in the whole thing.
@ilc ilc force-pushed the achordion-fix-2345 branch from d79c8c4 to 65a8379 Compare October 3, 2024 01:39
@ilc
Copy link
Collaborator Author

ilc commented Oct 3, 2024

All comments are addressed. I'm not that worried about forgetting about streaking. I'll probably upstream the logic later.

Copy link
Collaborator

@SiriusStarr SiriusStarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working fine here thus far. 👍

@ilc ilc merged commit 25badcf into svalboard:vial Oct 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants