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

add dp60 indicator mode #8801

Merged
merged 5 commits into from
Nov 6, 2020
Merged

add dp60 indicator mode #8801

merged 5 commits into from
Nov 6, 2020

Conversation

yulei
Copy link
Contributor

@yulei yulei commented Apr 14, 2020

Add support for an open source viper/eagle FR4 plate(8 RGB indicator leds).
https://github.com/yulei/viper_plate

Description

Types of Changes

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

Issues Fixed or Closed by This PR

Checklist

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

@drashna drashna requested a review from a team April 23, 2020 19:27
Copy link
Member

@noroadsleft noroadsleft left a comment

Choose a reason for hiding this comment

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

Looks fine to me.

@noroadsleft noroadsleft requested a review from drashna May 6, 2020 23:07
#define w_nop4 w_nop2 w_nop2
#define w_nop8 w_nop4 w_nop4
#define w_nop16 w_nop8 w_nop8
void inline indicator_sendarray_mask_ind(uint8_t *data, uint16_t datlen, uint8_t maskhi) {
Copy link
Member

Choose a reason for hiding this comment

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

Not a fan of this duplication of core code. Im guessing the only requirement is to be able to use 2 different RGB pins, and if so, theres ways to avoid having to re-implement the ws2812 driver.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current avr ws2812 driver embedded the PIN definition on the assembly codes. I'm not familiar with assembly and have no idea how to extract the PIN definition from the codes. Any help is great.

Copy link
Member

Choose a reason for hiding this comment

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

IIRC, we've had this talk on discord (not you specifically), but there is no way to do this without ... basically re-implementing it, as the data pin HAS to be defined at compile time, and can't be changed in runtime.

This is also why #9412 was opened.

Copy link
Member

Choose a reason for hiding this comment

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

I think was the main thing holding this back.

Another way to do this, maybe would be to undefine the rgbled pin, define the new version, and then include ws2812.c. Which, is super hacky, but wouldn't duplicate core code.

@stale
Copy link

stale bot commented Jun 21, 2020

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@Erovia Erovia requested a review from zvecr June 26, 2020 20:23
@stale stale bot removed the awaiting changes label Jun 26, 2020
@stale
Copy link

stale bot commented Aug 11, 2020

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@stale
Copy link

stale bot commented Oct 5, 2020

Thank you for your contribution!
This pull request has been automatically marked as stale because it has not had activity in the last 45 days. It will be closed in 30 days if no further activity occurs. Please feel free to give a status update now, or re-open when it's ready.
For maintainers: Please label with awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

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.

Could you add a GPL2+ compatible license header to all of the c and h files?

For instance:

/* Copyright %YEAR% %YOUR_NAME%
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#define w_nop4 w_nop2 w_nop2
#define w_nop8 w_nop4 w_nop4
#define w_nop16 w_nop8 w_nop8
void inline indicator_sendarray_mask_ind(uint8_t *data, uint16_t datlen, uint8_t maskhi) {
Copy link
Member

Choose a reason for hiding this comment

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

I think was the main thing holding this back.

Another way to do this, maybe would be to undefine the rgbled pin, define the new version, and then include ws2812.c. Which, is super hacky, but wouldn't duplicate core code.

@stale stale bot removed the awaiting changes label Oct 10, 2020
@drashna drashna requested a review from a team October 10, 2020 23:32
@yulei
Copy link
Contributor Author

yulei commented Oct 15, 2020

Could you add a GPL2+ compatible license header to all of the c and h files?

For instance:

/* Copyright %YEAR% %YOUR_NAME%
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

Added license header for those files and moved the ws2812 driver code to a separate file. To avoid the link time error(duplicate function name), I have to rename the origin ws2812* to indicator*, thus if someone rename the function names on the ws2812.c. Those codes will be broken :(

@drashna
Copy link
Member

drashna commented Oct 18, 2020

Looks like there is a merge conflict here, too. If you can resolve that?

@noroadsleft noroadsleft merged commit d7c90d8 into qmk:master Nov 6, 2020
@noroadsleft
Copy link
Member

Thanks!

nicsuzor added a commit to nicsuzor/qmk_firmware that referenced this pull request Nov 14, 2020
* upstream/master: (48 commits)
  [Keymap] idobo:egstad (qmk#10783)
  Adding few Korean translated files (qmk#5895)
  [Keyboard] Keebwerk MEGA Initial commit (qmk#10777)
  Indicator LEDs as config (qmk#10816)
  add missing physical layout options and VIA support for Sesame (qmk#10471)
  [Keyboard] Fix unused variables in mschwingen modelm (qmk#10811)
  Add big spacebar defaults to Underscore33 (qmk#10731)
  Add qmk info -l to show the layouts too (qmk#10882)
  New command: qmk lint (qmk#10761)
  Updates to Talljoe's Keymaps (qmk#10115)
  [Keymap] bcat keymaps and userspace (qmk#10705)
  add dp60 indicator mode (qmk#8801)
  E85 backlight & LED indicator updates (qmk#10678)
  Add support for 4 IS31FL3731 devices (qmk#10860)
  [Keymap] add brandonschlack userspace and keymaps (qmk#10411)
  [Keymap] add ai03/polaris:mekberg (qmk#10508)
  CLI: Add `qmk clean` (qmk#10785)
  Adds support for XD84 Pro (qmk#9750)
  Freyr refactor (qmk#10833)
  KC60 refactor (qmk#10834)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants