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

[Keyboard][Fixes] Capsunlocked CU80 #12166

Closed
wants to merge 14 commits into from

Conversation

maz0r
Copy link

@maz0r maz0r commented Mar 8, 2021

Description

Addresses several issues raised by @sigprof in #12019 after merge.
These have been raised as an Issue, as I was unsure when I would have time to work on everything.

Added RGB_MATRIX_MAXIMUM_BRIGHTNESS to limit RGB maximum to 100 of 255.
Updated layout in v2_iso_rgb.c to reflect keyboard modifiers, as I has misunderstood its purpose..
Updated layout in v2_ansi_rgb.c to reflect keyboard modifiers ^^.
Updated keymap.c for all _rgb variants layouts to include RGB_SPD.

--

Does not address the brightness override caused by using rgb_matrix_set_color().

  • I agree that with only two keys it's a non issue (and if you have caps lock on use you need to know so you can disable it ;) )
  • I can't think of an obvious way to address this without changes to the method in quantum\rgb_matrix.c?

Does not address comments on merging layouts for the _rgb variants using #ifdef functions.

  • I'll pick this up with @rys who maintains the board , I am happy to investigate / test on a new fork, although It will be a few days before I have time, and I can see testing being "fun" :D

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

Fixes #12165

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).

maz0r and others added 13 commits February 25, 2021 21:51
*Not sure if this is the right way to go about this*

Intention is to add RGB matrix support as an option for users who wish to use per key effects, as the v2_ansi and v2_iso is setup for underglow effects.

Created new folders for capsunlocked/cu80/v2_ansi_rgb and capsunlocked/cu80/v2_iso_rgb to add support for RGB matrix lighting utilising the WS2812 driver.
Removed redundant code for matrix scan and record.
Used suggested method for Caps and Scroll lock key state
testers reported issues on waking from sleep where the board would become unresponsive, adding this appears to resolve the problem
retested the build locally locally with msys2 on both 0.11.69 and 0.12.8
make -j 1 capsunlocked/cu80/v2_ansi_rgb:all
make -j 1 capsunlocked/cu80/v2_iso_rgb:all

all variations build, so not sure whats happening with the travis builds ?!!
Removed UNICODE_ENABLE  per suggestion
apologies, missed the non functional changes you requested, my bad

Co-authored-by: Ryan <fauxpark@gmail.com>
apologies, missed the non functional changes you requested, my bad

Co-authored-by: Ryan <fauxpark@gmail.com>
Added RGB_MATRIX_MAXIMUM_BRIGHTNESS to limit RGB maximum to 100 of 255.
Updated layout in v2_iso_rgb.c to reflect keyboard modifiers, as I has misunderstood its purpose..
Updated layout in v2_ansi_rgb.c to reflect keyboard modifiers, as I has misunderstood its purpose..
Updated keymap.c for all _rgb variants layouts to include RGB_SPD.
forgot to revert this change before checkin (dirty hack so my VIA build keybinds are correct)
Added RGB_MATRIX_MAXIMUM_BRIGHTNESS to limit RGB maximum to 100 of 255.
Updated layout in v2_iso_rgb.c to reflect keyboard modifiers, as I has misunderstood its purpose..
Updated layout in v2_ansi_rgb.c to reflect keyboard modifiers, as I has misunderstood its purpose..
Updated keymap.c for all _rgb variants layouts to include RGB_SPD.
@github-actions github-actions bot added keyboard keymap via Adds via keymap and/or updates keyboard for via support labels Mar 8, 2021
maz0r added a commit to maz0r/qmk_firmware that referenced this pull request Mar 11, 2021
- Removed cu80/v2_ansi_rgb & cu80/v2_iso_rgb  sub folders.

*All the below changes occured for both v2_ansi and v2_iso with relevant changes (num leds/ layout etc)*

- Refactor info.json to new format containing most rules.mk and config.h variables
	- Removed variables which now exist in info.json per `qmk info`

- Homoglated keymaps into /default and /via using widows layout (sorry rys :p)

- Updated Readme.mk to includ maz0r as co-maintainer
- ToDo: update build instructions

- Added #ifdef CU80_RGB  in config.h
	- Define's     RGB_MATRIX_KEYPRESSES  &  RGB_MATRIX_MAXIMUM_BRIGHTNESS 50
	- Undefine's      RGBLIGHT_ANIMATIONS, RGBLIGHT_HUE_STEP, RGBLIGHT_SAT_STEP, RGBLIGHT_VAL_STEP, RGBLIGHT_LIMIT_VAL

- Refactor <board>.c added #ifdef block to toggle RGB functionality.

- Added /rgb folder
	- Added config.h
		- toggles CU80_RGB define
		- replaces product ID for VIA
		- replaces product Name for VIA
	- Added rules.mk
		- Sets RGBLIGHT_ENABLE = no       to avoid build errors from having both lighting features enabled.
		- Sets RGB_MATRIX_ENABLE = yes    to build with rgb matrix
		- Defines the RGB_MATRIX_DRIVER = WS2812

>> This results in [WARNINGS] when /rgb firmware is build as the overrides are applied :(

`
QMK Firmware 0.12.15
Making capsunlocked/cu80/v2_ansi with keymap default                                                   [OK]

Making capsunlocked/cu80/v2_ansi with keymap via                                                       [OK]

Making capsunlocked/cu80/v2_ansi/rgb with keymap default                                               [WARNINGS]
	WARNING capsunlocked/cu80/v2_ansi/rgb: PRODUCT_ID in config.h is overwriting usb.pid in info.json
	WARNING capsunlocked/cu80/v2_ansi/rgb: Feature rgblight is specified in both info.json and rules.mk, the rules.mk value wins.

Making capsunlocked/cu80/v2_ansi/rgb with keymap via                                                   [WARNINGS]
	WARNING capsunlocked/cu80/v2_ansi/rgb: PRODUCT_ID in config.h is overwriting usb.pid in info.json
	WARNING capsunlocked/cu80/v2_ansi/rgb: Feature rgblight is specified in both info.json and rules.mk, the rules.mk value wins.

Making capsunlocked/cu80/v2_iso with keymap default                                                    [OK]

Making capsunlocked/cu80/v2_iso with keymap via                                                        [OK]

Making capsunlocked/cu80/v2_iso/rgb with keymap default                                                [WARNINGS]
	WARNING capsunlocked/cu80/v2_iso/rgb: PRODUCT_ID in config.h is overwriting usb.pid in info.json
	WARNING capsunlocked/cu80/v2_iso/rgb: Feature rgblight is specified in both info.json and rules.mk, the rules.mk value wins.

Making capsunlocked/cu80/v2_iso/rgb with keymap via                                                    [WARNINGS]
	WARNING capsunlocked/cu80/v2_iso/rgb: PRODUCT_ID in config.h is overwriting usb.pid in info.json
	WARNING capsunlocked/cu80/v2_iso/rgb: Feature rgblight is specified in both info.json and rules.mk, the rules.mk value wins.
`

- Includes Fixes for Issue qmk#12165 / PR qmk#12166 rgb matrix max brightness.
@maz0r
Copy link
Author

maz0r commented Mar 11, 2021

Closing this in favor of refactor on PR #12193

@maz0r maz0r closed this Mar 11, 2021
maz0r added a commit to maz0r/qmk_firmware that referenced this pull request Mar 11, 2021
failed to pull these over as I rebased on master.
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.

CU80 RGB MATRIX - Brightness Limits
1 participant