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] Add FancyAlice66 #17491

Closed
wants to merge 21 commits into from
Closed

[Keyboard] Add FancyAlice66 #17491

wants to merge 21 commits into from

Conversation

z-ww447
Copy link
Contributor

@z-ww447 z-ww447 commented Jun 28, 2022

Added FancyAlice66 by Fancytech, with optional rotary encoder slot.

Description

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

@github-actions github-actions bot added keyboard keymap via Adds via keymap and/or updates keyboard for via support labels Jun 28, 2022
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.

Also, if the only difference in the encoder keymaps are support for the encoders, then they should be removed.

z-ww447 and others added 2 commits July 3, 2022 18:32
moved encoder definition to keyboard.c

Co-authored-by: Drashna Jaelre <drashna@live.com>
@z-ww447
Copy link
Contributor Author

z-ww447 commented Jul 3, 2022

I've removed the extra keymaps and added encoder support to kb.c as requested. I've managed to keep the encoder support for via, please let me know if that's acceptable

@z-ww447 z-ww447 requested a review from drashna July 3, 2022 16:00
@z-ww447 z-ww447 requested a review from drashna July 4, 2022 15:01
@z-ww447
Copy link
Contributor Author

z-ww447 commented Jul 4, 2022

Please let me know if my implementation is acceptable

Smaller image size

Co-authored-by: Drashna Jaelre <drashna@live.com>
@z-ww447 z-ww447 requested a review from drashna July 4, 2022 17:11
@drashna drashna requested a review from a team July 11, 2022 19:34
@z-ww447 z-ww447 requested a review from fauxpark July 12, 2022 09:01
@z-ww447 z-ww447 requested a review from fauxpark July 12, 2022 09:36
@z-ww447
Copy link
Contributor Author

z-ww447 commented Jul 25, 2022

@fauxpark can you review the changes please

keyboards/fancytech/fancyalice66/config.h Outdated Show resolved Hide resolved
keyboards/fancytech/fancyalice66/info.json Outdated Show resolved Hide resolved
Comment on lines +20 to +68
#if defined(VIA_ENABLE) && defined(ENCODER_ENABLE)

# ifdef ENCODERS
static uint8_t encoder_state[ENCODERS] = {0};
static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY;
static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY;
# endif

void encoder_action_unregister(void) {
# ifdef ENCODERS
for (int index = 0; index < ENCODERS; ++index) {
if (encoder_state[index]) {
keyevent_t encoder_event = (keyevent_t) {
.key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
.pressed = false,
.time = (timer_read() | 1)
};
encoder_state[index] = 0;
action_exec(encoder_event);
}
}
# endif
}

void encoder_action_register(uint8_t index, bool clockwise) {
# ifdef ENCODERS
keyevent_t encoder_event = (keyevent_t) {
.key = clockwise ? encoder_cw[index] : encoder_ccw[index],
.pressed = true,
.time = (timer_read() | 1)
};
encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
action_exec(encoder_event);
# endif
}

void matrix_scan_kb(void) {
encoder_action_unregister();
matrix_scan_user();
}

bool encoder_update_kb(uint8_t index, bool clockwise) {
encoder_action_register(index, clockwise);
// don't return user actions, because they are in the keymap
// encoder_update_user(index, clockwise);
return true;
};

#endif
Copy link
Member

Choose a reason for hiding this comment

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

This can be replaced with the new Encoder Map feature.

z-ww447 and others added 2 commits September 26, 2022 20:03
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
@drashna drashna self-requested a review September 30, 2022 05:25
@github-actions
Copy link

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 bug, awaiting review, breaking_change, in progress, or on hold to prevent the issue from being re-flagged.

@github-actions github-actions bot added the stale Issues or pull requests that have become inactive without resolution. label Nov 15, 2022
@github-actions
Copy link

Thank you for your contribution!
This pull request has been automatically closed because it has not had activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.
// [stale-action-closed]

@github-actions github-actions bot closed this Dec 16, 2022
@ogabriel
Copy link

@chent7 any chance of openning another pull request? probably the maintainers didnt have time to review previosly, so it was automatically closed

@z-ww447
Copy link
Contributor Author

z-ww447 commented Apr 30, 2023

@chent7 any chance of openning another pull request? probably the maintainers didnt have time to review previosly, so it was automatically closed

I didn't have time to continue working on the new changes. But feel free to continue with new PR if you would like to work on it.

@adophoxia adophoxia mentioned this pull request May 1, 2023
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keyboard keymap stale Issues or pull requests that have become inactive without resolution. via Adds via keymap and/or updates keyboard for via support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants