-
-
Notifications
You must be signed in to change notification settings - Fork 40.4k
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
Knob Goblin add via support #11831
Conversation
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
Co-authored-by: Joel Challis <git@zvecr.com>
per drashna review
Looks like you have some merge conflicts that need to be resolved, here. |
fixed the merge conflicts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks!
{"Label": "F17", "x": 1, "y": 0}, | ||
{"Label": "F18", "x": 2, "y": 0}, | ||
{"Label": "F19", "x": 3, "y": 0}, | ||
{"Label": "F20", "x": 4, "y": 0}, |
There was a problem hiding this comment.
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
render_goblin_logo(); | ||
|
||
oled_set_cursor(0,11); | ||
|
||
switch (get_highest_layer(layer_state)) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?)
[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 | ||
), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 */
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; | ||
|
||
} |
There was a problem hiding this comment.
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.
Description
Added Via support.
Minor OLED code modifications to allow for more supported layers.
Types of Changes
Checklist