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

Use the new ST7565 driver on Ergodox Infinity #13165

Merged
merged 3 commits into from
Jul 7, 2021

Conversation

firetech
Copy link
Contributor

@firetech firetech commented Jun 10, 2021

Description

Add config for the new ST7565 driver by @fauxpark (#13089 ) to Ergodox Infinity, and enable it by default, disabling the uGFX-based Visualizer.

This means that the Ergodox Infinity is now built without uGFX (by default). A default (weak) display implementation, somewhat inspired by the old default visualizer (showing keyboard leds and layer state on the master half) has been added.

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

This means that the Ergodox Infinity is now built without uGFX (by
default). The downside is that every keymap needs to implement their own
code for the display (same behaviour as for keyboards with OLEDs).

Includes a sample implementation for the default keymap.
@firetech
Copy link
Contributor Author

firetech commented Jun 10, 2021

Side note, switching over to this for my daily driver firmware, with basically the same things rendered to the LCDs, roughly quadrupled the matrix scan rate on my board (from ~250 to ~1000). 😄

@fauxpark fauxpark requested a review from a team June 10, 2021 09:56
@firetech
Copy link
Contributor Author

firetech commented Jun 10, 2021

@fauxpark Oh, I should probably mention... I did observe some weird issues while creating the sample display implementation... I first tried writing QMK_VERSION to the line below the logo, but got weird behaviour when that text overflowed from the last line to the first. Partly seemed like only the part that overflowed got marked as dirty, even if I wrote the logo after that text to overwrite the overflowing text.

Edit: The weird thing is that I did exactly the same thing earlier (when I did my initial tests), and it worked fine at that point, but that was with another keymap (and, I think, split_common running instead of serial_link), not that that should matter.

@drashna
Copy link
Member

drashna commented Jun 10, 2021

If you add the task function to the infinity's c file, but set it as weak, it will have a default graphic that can be overwritten. The splitkb/zima is a good example of where I did this.

@firetech
Copy link
Contributor Author

If you add the task function to the infinity's c file, but set it as weak, it will have a default graphic that can be overwritten.

I considered doing that, but got the feeling from @fauxpark in a comment in #13089 that it wasn't desired. 😛

@drashna
Copy link
Member

drashna commented Jun 10, 2021

If you add the task function to the infinity's c file, but set it as weak, it will have a default graphic that can be overwritten.

I considered doing that, but got the feeling from @fauxpark in a comment in #13089 that it wasn't desired. 😛

I think it's more of a "less than ideal situation" for the handling. But IMO, it should be okay.

Somewhat inspired by the old default visualizer.

Remove the example implementation from the default keymap.
@firetech
Copy link
Contributor Author

I added a default (weak) st7565_task_user implementation, so the default display behaviour is now quite similar to the default display behaviour with VISUALIZER_ENABLE = yes.

If one tried to build with `VISUALIZER_ENABLE = yes` and
`ST7565_ENABLE = no`, the `ST7565_CONTRAST` define would conflict.

There are a few visualizer.c implementations in
ergodox_infinity/keymaps, so some users may desire to stick with the
visualizer.
@fauxpark
Copy link
Member

fauxpark commented Jul 7, 2021

Thanks!

@fauxpark fauxpark merged commit e675a9f into qmk:develop Jul 7, 2021
cadusk pushed a commit to cadusk/qmk_firmware that referenced this pull request Jul 7, 2021
* qmk/develop: (23 commits)
  Use the new ST7565 driver on Ergodox Infinity (qmk#13165)
  Xelus Ninjin: rename LAYOUT_all to LAYOUT_tkl_ansi_tsangan; add info.json (qmk#13477)
  Kopibeng XT65: Layout Macro Refactor (qmk#13476)
  [Keyboard] Add poker87c and poker87d (qmk#12810)
  [Keyboard] Add new Elise, 65% Keyboard ANSI / ISO  (qmk#12782)
  [Keyboard] Add bm65iso (qmk#13400)
  [Keyboard] Add keyboard reviung5 (qmk#13375)
  [Keyboard] Add kabedon98e (qmk#13314)
  [Keyboard] Set reasonable defaults for Corne keyboard (qmk#13440)
  /bin/bash to /usr/bin/env bash (qmk#13422)
  Update `MSG_PYTHON_MISSING` (qmk#13427)
  core: chibios: bootloader: use integer pointers as volatile (qmk#13450)
  Migrate SHIFT_ESC and RGB `fn_actions` to Grave Escape and RGB keycodes (qmk#13360)
  `keymap_extras`: Remove deprecated defines (qmk#12949)
  [Keyboard] fix encoder_update_user for nullbitsco/nibble (qmk#13451)
  Traveller cleanup (qmk#13441)
  LatinPadBLE: correct info.json data (qmk#13452)
  Jabberwocky: adjust key positioning in Configurator (qmk#13447)
  Molecule: Layout Macro Refactor (qmk#13453)
  [Docs] added list of MIDI keycodes (qmk#13159)
  ...
@firetech firetech deleted the ergodox_infinity_st7565 branch July 12, 2021 15:48
@minusmario
Copy link

I added a default (weak) st7565_task_user implementation, so the default display behaviour is now quite similar to the default display behaviour with VISUALIZER_ENABLE = yes.

It seems that the screen on the non-master side won't react with both display and backgroundcolor to user input, eg. demostrate layer or numlock state, is this the default behavior of qmk or did I do something wrong? I've deleted the is_keyboard_master if block in my own st7565_task_user function. Thanks.

@firetech
Copy link
Contributor Author

firetech commented Nov 7, 2021

It seems that the screen on the non-master side won't react with both display and backgroundcolor to user input, eg. demostrate layer or numlock state, is this the default behavior of qmk or did I do something wrong? I've deleted the is_keyboard_master if block in my own st7565_task_user function. Thanks.

That's just the default behaviour of QMK. You need to add SPLIT_LAYER_STATE_ENABLE and SPLIT_LED_STATE_ENABLE to your config for the secondary half to be aware of those specific things. More information and more such options can be found in the documentation.

nhongooi pushed a commit to nhongooi/qmk_firmware that referenced this pull request Dec 5, 2021
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