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

Partially port GET_SLAVE_STATUS from helix to split_common #7732

Closed
wants to merge 4 commits into from

Conversation

zvecr
Copy link
Member

@zvecr zvecr commented Dec 28, 2019

Description

To help with the slower scan rates on the current arm_split branch, this PR partially ports some of the helix code to split_common. GET_SLAVE_STATUS aims to quickly query the slave side if anything has changed, before requesting the full slave side matrix. My limited testing gives about a +50% increase to scan rate.

Current scan rates

before

32u4 -> 1435
f303 -> 859

after

32u4 -> 2066
f303 -> 1321

In my limited testing with mashing keys, I have been unable to get f303 with GET_SLAVE_STATUS to slow down below what it was before. (Speedup might change for boards not ortho_4x12)

Types of Changes

  • Core
  • Bugfix
  • New feature
  • Enhancement/optimization
  • Keyboard (addition or update)
  • Keymap/layout/userspace (addition or update)
  • Documentation

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • I have tested the changes and verified that they work and don't break anything (as well as I can manage).

@zvecr zvecr requested a review from a team December 28, 2019 21:37
@zvecr zvecr changed the title Partially port GET_SLAVE_STATUS from helix -> scan rate +50% Partially port GET_SLAVE_STATUS from helix Dec 28, 2019
@zvecr zvecr changed the title Partially port GET_SLAVE_STATUS from helix Partially port GET_SLAVE_STATUS from helix to split_common Dec 28, 2019
@zvecr zvecr marked this pull request as ready for review December 28, 2019 22:35
@drashna drashna requested a review from a team December 29, 2019 01:45
@zvecr zvecr added the on hold label Jan 17, 2020
@zvecr
Copy link
Member Author

zvecr commented Jan 17, 2020

Getting some dropped keyup events on f303. Need to investigate further. Dug into the helix code a little more. Latest fix aligns the logic a little more, which seems to help with the dropped keypresses.

@zvecr zvecr removed the on hold label Jan 20, 2020
zvecr added a commit to zvecr/qmk_firmware that referenced this pull request Jan 22, 2020
Partially port GET_SLAVE_STATUS from helix to split_common
@zvecr zvecr added the on hold label Jan 31, 2020
zvecr added a commit that referenced this pull request Feb 4, 2020
Partially port GET_SLAVE_STATUS from helix to split_common

static uint8_t s_last_slave_buffer_change_count = 0;
if (soft_serial_transaction(GET_SLAVE_STATUS) == TRANSACTION_END && slave_buffer_change_count != s_last_slave_buffer_change_count) {
printf("matrix sync needed:%u:%u\n", slave_buffer_change_count, s_last_slave_buffer_change_count);
Copy link
Member

Choose a reason for hiding this comment

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

Lets remove the printf as it's causing CI failures.

Copy link
Member

Choose a reason for hiding this comment

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

Also, dprintf would work better here, I think

@zvecr zvecr added the breaking_change Changes that need to wait for a version increment label Feb 21, 2020
@drashna drashna requested a review from a team March 1, 2020 01:25
@drashna drashna mentioned this pull request May 3, 2020
16 tasks
@Erovia
Copy link
Member

Erovia commented Jun 21, 2020

I guess we could get this merged into develop after fixing the conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking_change Changes that need to wait for a version increment core on hold optimization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants