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

Added Keyboard Lotus58Glow #20281

Closed
wants to merge 3 commits into from
Closed

Conversation

TweetyDaBird
Copy link
Contributor

Description

Started over from scratch and added Lotus 58 Glow default firmware

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

atmel-dfu to atmeldfu
Copy link
Member

@waffle87 waffle87 left a comment

Choose a reason for hiding this comment

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

  • All my same suggestions made to the atmeldfu directory also need to be applied to caterina and nanoboot directories.
  • It would be preferable to have a top level info.json file with code that applies to all versions, then info.json files in sub directories with things that differ. Same goes for keymaps. Here's a good reference.

"build": {
"lto": true
},
"debounce": 5,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"debounce": 5,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unsure why?

Comment on lines +71 to +137
// Rotate OLED to fit vertical placement. DO NOT EDIT!
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {

if (is_keyboard_left()) {
return OLED_ROTATION_90;
}
return OLED_ROTATION_270;
}

// Renders default QMK Logo. DO NOT EDIT!
void render_logo(void) {
static const char PROGMEM qmk_logo[] = {
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
};
oled_write_P(qmk_logo, false);
}

static void print_status_narrow(void) {
// Create OLED content
oled_write_P(PSTR("\n"), false);
oled_write_P(PSTR(""), false);
oled_write_P(PSTR("Lotus -58-"), false);
oled_write_P(PSTR("\n"), false);

// Print current layer
oled_write_P(PSTR("Layer"), false);
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("-Base\n"), false);
break;
case 1:
oled_write_P(PSTR("-Num \n"), false);
break;
case 2:
oled_write_P(PSTR("-Func\n"), false);
break;
case 3:
oled_write_P(PSTR("-Sys \n"), false);
break;
default:
oled_write_P(PSTR("Undef"), false);
}

// Display autoshift
oled_write_P(PSTR("\n"), false);
led_t led_usb_state = host_keyboard_led_state();
oled_write_ln_P(PSTR("Caps- lock"), led_usb_state.caps_lock);
bool autoshift = get_autoshift_state();
oled_write_P(PSTR("\n"), false);
oled_write_P(PSTR("Auto-Shift"), autoshift);
oled_write_P(PSTR("\n"), false);

}

bool oled_task_user(void) {
// Render the OLED
if (is_keyboard_left()) {
print_status_narrow();
//render_logo();
} else {
print_status_narrow();
//render_logo();
}
return false;
}
Copy link
Member

Choose a reason for hiding this comment

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

Ideally, this should be removed from all the keymaps, and placed in lotus58.c file using the correct _kb functions.

@TweetyDaBird TweetyDaBird deleted the Lotus58Glow branch March 30, 2023 06:09
@TweetyDaBird TweetyDaBird restored the Lotus58Glow branch March 30, 2023 06:10
@TweetyDaBird TweetyDaBird deleted the Lotus58Glow branch March 30, 2023 06:10
@TweetyDaBird TweetyDaBird restored the Lotus58Glow branch March 30, 2023 06:10
@drashna drashna mentioned this pull request Apr 14, 2023
14 tasks
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.

2 participants