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

Knob Goblin add via support #11831

Merged
merged 31 commits into from
Feb 16, 2021
Merged

Knob Goblin add via support #11831

merged 31 commits into from
Feb 16, 2021

Conversation

mrT1ddl3s
Copy link

@mrT1ddl3s mrT1ddl3s commented Feb 8, 2021

Description

Added Via support.
Minor OLED code modifications to allow for more supported layers.

Types of Changes

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

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

mrT1ddl3s and others added 27 commits January 22, 2021 10:58
New macropad initial commit. Keyboard and keymap
per fauxpark review

Co-authored-by: Ryan <fauxpark@gmail.com>
per fauxpark review

Co-authored-by: Ryan <fauxpark@gmail.com>
per fauxpark review

Co-authored-by: Ryan <fauxpark@gmail.com>
info file fix for wrong display on configurator
fix wrong graphic display on configurator
definitions moved from keymap .c file to keyboard .c file to allow for QMK Configurator to be used without losing encoder and OLED function.
Per drasha review

Co-authored-by: Drashna Jaelre <drashna@live.com>
change render_logo to render_goblin_logo
add attribute weak to oled_task_user
add space before "One" and "two" so that "T" in three doesn't stay on OLED
add text on OLED for up to 6 layers
IDs updated. Bootmagic lite defined for top left button
@github-actions github-actions bot added keyboard keymap via Adds via keymap and/or updates keyboard for via support labels Feb 8, 2021
keyboards/knobgoblin/config.h Outdated Show resolved Hide resolved
keyboards/knobgoblin/readme.md Outdated Show resolved Hide resolved
mrT1ddl3s and others added 2 commits February 9, 2021 09:16
Co-authored-by: Joel Challis <git@zvecr.com>
@mrT1ddl3s mrT1ddl3s requested a review from zvecr February 11, 2021 19:20
@mrT1ddl3s mrT1ddl3s requested a review from drashna February 13, 2021 16:22
@drashna
Copy link
Member

drashna commented Feb 14, 2021

Looks like you have some merge conflicts that need to be resolved, here.

@mrT1ddl3s
Copy link
Author

fixed the merge conflicts

@zvecr zvecr requested a review from a team February 16, 2021 14:39
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.

Thanks!

@drashna drashna merged commit 9a2b0a5 into qmk:master Feb 16, 2021
@mrT1ddl3s mrT1ddl3s deleted the knobgoblin_dev branch February 16, 2021 17:58
Comment on lines +11 to +14
{"Label": "F17", "x": 1, "y": 0},
{"Label": "F18", "x": 2, "y": 0},
{"Label": "F19", "x": 3, "y": 0},
{"Label": "F20", "x": 4, "y": 0},
Copy link

Choose a reason for hiding this comment

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

Is the wonky indentation intentional? (I think the project indentation policy is 4 space, no hard-tabs.) If not could you filter this through something like underscore print --wrapwidth 72 please? (jq doesn't produce quite as nice-looking output unfortunately.) See https://github.com/ddopson/underscore-cli

Comment on lines 76 to 80
render_goblin_logo();

oled_set_cursor(0,11);

switch (get_highest_layer(layer_state)) {
Copy link

Choose a reason for hiding this comment

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

As with the JSON, but qmk cformat keyboards/knobgoblin/knobgoblin.c will run clang-format for you. (In your keymap.c sections where you want to keep the formatting intact, you can wrap those in /* clang-format off */ and /* clang-format on */.

break;
case 2:
oled_set_cursor(0,11);
oled_write_P(PSTR("THREE\n"), false);
Copy link

Choose a reason for hiding this comment

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

Should there be a space before THREE here too? (Or is it for quasi centre-alignment on the display?)

Comment on lines +21 to +27
[0] = LAYOUT_ortho(
KC_EQL, KC_PSLS, KC_PAST, KC_PMNS,
KC_P7, KC_P8, KC_P9, KC_PPLS,
KC_P4, KC_P5, KC_P6, KC_PPLS,
KC_MPLY, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_MUTE, MO(1), KC_P0, KC_PDOT, KC_PENT
),
Copy link

Choose a reason for hiding this comment

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

I'd wrap these in /* clang-format off */ and /* clang-format on */ just to be safe, so they don't get mangled next time someone decides to run clang-format on the entire codebase. Seems to happen once every few months.

Copy link

Choose a reason for hiding this comment

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

e.g.

    [0] = LAYOUT_ortho(/* clang-format off */
                  KC_EQL, KC_PSLS, KC_PAST, KC_PMNS,
                  KC_P7,  KC_P8,   KC_P9,   KC_PPLS,
                  KC_P4,  KC_P5,   KC_P6,   KC_PPLS,
         KC_MPLY, KC_P1,  KC_P2,   KC_P3,   KC_PENT,
         KC_MUTE, MO(1),  KC_P0,   KC_PDOT, KC_PENT
				 ), /* clang-format on */

Comment on lines 80 to 100
switch (get_highest_layer(layer_state)) {
case 0:
oled_set_cursor(0,11);
oled_advance_char();
oled_write_P(PSTR("ONE\n"), false);
oled_write_P(PSTR(" ONE\n"), false);
break;
case 1:
oled_set_cursor(0,11);
oled_advance_char();
oled_write_P(PSTR("TWO\n"), false);
oled_write_P(PSTR(" TWO\n"), false);
break;
case 2:
oled_set_cursor(0,11);
oled_write_P(PSTR("THREE\n"), false);
break;
case 3:
oled_write_P(PSTR(" FOUR\n"), false);
break;
case 4:
oled_write_P(PSTR(" FIVE\n"), false);
break;
case 5:
oled_write_P(PSTR(" SIX\n"), false);
break;

}
Copy link

Choose a reason for hiding this comment

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

FWIW I'd write this as:

const char PROGMEM* layer_text[] = {" ONE\n", " TWO\n", "THREE\n", " FOUR\n", " FIVE\n", " SIX\n"};
…
uint8_t layer = get_highest_layer(layer_state);
if(layer < 6) {
    oled_write_P(layer_text[layer], false);
}

Might save a few bytes on the firmware and avoids unnecessary code duplication.

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.

4 participants