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

Interaction with Vial fails with specific cols value #39

Open
sago35 opened this issue Apr 7, 2024 · 2 comments
Open

Interaction with Vial fails with specific cols value #39

sago35 opened this issue Apr 7, 2024 · 2 comments

Comments

@sago35
Copy link
Owner

sago35 commented Apr 7, 2024

For example, the setting value of 56 works fine, but it doesn't work properly with the correct key number of 48.

https://github.com/sago35/tinygo-keyboard/blob/0.4.0/targets/sg48key/vial.json#L5

Here is the layer 1 of Vial when set to 48.
It appears that there is a misalignment of 8 keys. The corrected value to compensate for this offset seems to be 56.

image

@sago35
Copy link
Owner Author

sago35 commented Jul 18, 2024

I figured out the reason.
The correct value was 56.
The sg48key is created using d.AddSquaredMatrixKeyboard(colPins, ...).
In this case, cols becomes len(colPins) * (len(colPins) - 1), so with the current setting, 8 x 7 == 56.
Therefore, nothing was incorrect.

@sago35
Copy link
Owner Author

sago35 commented Jul 18, 2024

The matrix.rows and matrix.cols values saved in vial.json need to be consistent with the AddXXXXKeyboard() function of the keyboard firmware written in TinyGo. This will not work properly unless it is checked. Some sort of verification mechanism is necessary.

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

No branches or pull requests

1 participant