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

Refactor the crkbd/via keymap and fix OLED bugs #10354

Merged
merged 16 commits into from
Nov 17, 2020

Conversation

foostan
Copy link
Contributor

@foostan foostan commented Sep 18, 2020

Description

  • Currently the via keymap has OLED bugs, so this PR is fix it.
  • The via keymap should keep simplify as default keymap.
  • Remove unnecessary functions
  • Update default keymap based the via keymap
  • Remove foostan keymap because it will be legacy

@drashna What do you think about this PR? Would you confirm it please?

Types of Changes

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

Issues Fixed or Closed by This PR

Checklist

  • My code follows the code style of this project: C, Python
  • I have read the PR Checklist document and have made the appropriate changes.
  • 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).

Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

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

If the issue is with the OLED not rendering correctly, I just ran into the issue last night.

https://github.com/foostan/qmk_firmware/blob/refactor_crkbd_via_keymap/keyboards/crkbd/rev1/common/common.h#L24

This line should be changed to #define is_master is_keyboard_master()

https://github.com/foostan/qmk_firmware/blob/refactor_crkbd_via_keymap/keyboards/crkbd/rev1/common/common.c#L21

This line should be removed.

@drashna drashna self-assigned this Sep 19, 2020
@drashna drashna added via Adds via keymap and/or updates keyboard for via support keymap labels Sep 19, 2020
@foostan
Copy link
Contributor Author

foostan commented Sep 19, 2020

If the issue is with the OLED not rendering correctly, I just ran into the issue last night.
https://github.com/foostan/qmk_firmware/blob/refactor_crkbd_via_keymap/keyboards/crkbd/rev1/common/common.h#L24

This line should be changed to #define is_master is_keyboard_master()
https://github.com/foostan/qmk_firmware/blob/refactor_crkbd_via_keymap/keyboards/crkbd/rev1/common/common.c#L21

This line should be removed.

Thank you for your suggestion.
I'll fix them and push.

@drashna
Copy link
Member

drashna commented Sep 20, 2020

You're very welcome!

@2Moons-JP 2Moons-JP mentioned this pull request Sep 22, 2020
14 tasks
@foostan
Copy link
Contributor Author

foostan commented Sep 23, 2020

@drashna Would you confirm it again please?

Copy link
Member

@drashna drashna left a comment

Choose a reason for hiding this comment

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

LGTM!

@drashna drashna requested a review from a team October 4, 2020 19:36
@con-f-use
Copy link

error: conflicting types for 'is_keyboard_master'

can we get that fixed?

@drashna
Copy link
Member

drashna commented Oct 13, 2020

Specifically, the default keymap needs the extern uint8_t is_master removed.

@foostan
Copy link
Contributor Author

foostan commented Oct 14, 2020

extern uint8_t is_master removed

@drashna
Copy link
Member

drashna commented Oct 15, 2020

It looks like the default keymap is not compiling for the "common" revision.

The best solution may be to change the default to use the OLED Driver feature. But for now, it may be simplest to just turn off the oled for the default keymap.

Eg, add:

#ifdef KEYBOARD_crkbd_rev1_common
#    undef SSD1306OLED
#endif

The alternative is to copy the OLED code from the via keymap to the default keymap, too.

If you want I can edit the code to address this, though, if you'd like.

@foostan
Copy link
Contributor Author

foostan commented Oct 16, 2020

I know, somebody want to use the default keymap to use the OLED Driver feature.

The alternative is to copy the OLED code from the via keymap to the default keymap, too.

So that I think it’s best solution about this problem.
I'm going to update the default keymap.

@foostan
Copy link
Contributor Author

foostan commented Oct 17, 2020

It's okey compiling the default keymap with "common" and "legacy" revision.
But some keymaps to be error. Should we fix all of keymaps?

@drashna
Copy link
Member

drashna commented Oct 18, 2020

But some keymaps to be error. Should we fix all of keymaps?

That's fine. As long as the default and via keymaps compile, that's the important part. People can clean up their keymaps on their own. And because it will be simpler for them, in the long term.
Also, it will take longer to get merged if user keymaps are touched.

@foostan
Copy link
Contributor Author

foostan commented Oct 24, 2020

@drashna Thank you helping! I reverted the commit for personal keymaps without mine and yours.

@drashna drashna requested a review from a team October 25, 2020 00:00
@foostan
Copy link
Contributor Author

foostan commented Oct 25, 2020

@drashna When will it be merged? Need a review from someone else?

@foostan
Copy link
Contributor Author

foostan commented Nov 9, 2020

@drashna Hi, what should I do for it?

@lpwisniewski
Copy link

Thank you very much ! Since the last update I wasn't able to make the OLED and matrix leds working at the same time but thanks this PR it is now fixed.
I tested the default keymap, it's working correctly.

@lpwisniewski
Copy link

Actually the LEDs on the right side don't light up

@foostan
Copy link
Contributor Author

foostan commented Nov 13, 2020

@fauxpark Thank you for reviewing. I updated according to your suggestion.

@foostan
Copy link
Contributor Author

foostan commented Nov 13, 2020

@lpwisniewski You use crkbd/rev1/common:default, right? common is not compatible to matrix LED. Please use legacy.

@lpwisniewski
Copy link

Thanks @foostan, it fixed the issue, everything is working. Is there some documentation that explain the difference between legacy and common ?

@foostan
Copy link
Contributor Author

foostan commented Nov 13, 2020

@lpwisniewski Sorry it's hard to understand. Please see #6001 (comment)

@lpwisniewski
Copy link

Thank you very much for the link, and BTW thank you for everything else, your work on this keyboard is awesome

@drashna drashna requested a review from a team November 15, 2020 18:29
@drashna
Copy link
Member

drashna commented Nov 17, 2020

Thank you very much for the link, and BTW thank you for everything else, your work on this keyboard is awesome

Sorry, that's my fault. I'll see about opening a PR that makes it more/explicitly clear.

@drashna drashna merged commit 503b762 into qmk:master Nov 17, 2020
@foostan foostan deleted the refactor_crkbd_via_keymap branch November 17, 2020 11:32
xgnxs pushed a commit to xgnxs/qmk_firmware that referenced this pull request Jan 9, 2021
* Refactor the crkbd/via keymap and fix OLED bugs

* Revert "Refactor the crkbd/via keymap and fix OLED bugs"

This reverts commit dc9db02.

* Fix OLED display bugs

* Remove unused functions

* Remove uncessary the key logger

* Add new lines at end of file

* Remove unnecesary extern for is_master

* Remove extern is_master from rev1.h

* Remove ssd1306 from common dir because its the legacy lib

* Update default keymap based the via keymap

* Remove foostan keymap because it will be legacy

* Revert Remove unnecesary extern for is_master

* Remove unnecessary backslashes.
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Refactor the crkbd/via keymap and fix OLED bugs

* Revert "Refactor the crkbd/via keymap and fix OLED bugs"

This reverts commit dc9db02.

* Fix OLED display bugs

* Remove unused functions

* Remove uncessary the key logger

* Add new lines at end of file

* Remove unnecesary extern for is_master

* Remove extern is_master from rev1.h

* Remove ssd1306 from common dir because its the legacy lib

* Update default keymap based the via keymap

* Remove foostan keymap because it will be legacy

* Revert Remove unnecesary extern for is_master

* Remove unnecessary backslashes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keyboard keymap via Adds via keymap and/or updates keyboard for via support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants