-
-
Notifications
You must be signed in to change notification settings - Fork 39.9k
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
add matrix macro consistency check at compile time #12111
Conversation
…trix.c, quantum/split_common/matrix.c
|
This reverts commit aed02e2.
|
Apparently I also had a quick stab at similar validation without realising you'd started doing something similar: Mine certainly doesn't cater for all the cases, but it is done purely at compile-time without requiring a function definition. Unsure if you'd like to go down this route? Either way, there are a fair few build errors as a result, with mismatching definitions -- some of which you've also listed yourself. |
In this PR, Travis-CI reported only the above three cases. I don't think this PR merge will be possible without resolving at least these three cases. And I'm not sure if this PR should be merged. |
Sorry for interrupting. I made mine into another PR. #12151 |
I like the idea for this feature but I think it might be better to implement it in python so that more situations can check this. Adding a validation check somewhere around here would be the way to do that. Now that matrix data can be located in |
I have organized the implementation of this PR based on the implementation of validations.c done by tzarc. Further revisions are probably not necessary. This PR only adds The macros In contrast, the three macros Therefore, I think it is most appropriate to do this test in |
We're starting to validate information like this in more places. Even if this code is in place we will still want to check and highlight this situation at other times, EG Additionally, in python we can choose to throw warnings instead so that currently working but technically incorrect keyboards don't block the PR. |
I like the direction of the transition to data-driven QMK. However, as of today, I'm not sure how much of that has been achieved and what is being done now. Even if the check can be done in Python, I think it is worth checking in |
Thank you for your contribution! |
Thank you for your contribution! |
Description
Test the consistency of (MATRIX_ROW_PINS and MATRIX_ROWS) and (MATRIX_COL_PINS and MATRIX_COLS) at compile time.
Types of Changes
Checklist