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

[PENDING] Changed Helix OLED display to use oled_driver.c #24

Conversation

mtei
Copy link

@mtei mtei commented Nov 7, 2019

Description

Changed Helix OLED display to use oled_driver.c

  • Changed all keymap.c in helix/rev2/keymaps to use oled_driver.c
  • Changed all keymap.c in helix/pico/keymaps to use oled_driver.c
  • helix/rev1 uses helix/local_drivers/ssd1306.c as before.

This PR also added a build method that uses split_common so that split_common can be tried with Helix.
The default build method uses the previous code, but you can build using split_common as follows.

  • build helix/rev1 (Helix alpha)

    $ make helix/rev1:KEY_MAP
    
  • build helix/pico (HelixPico) with helix previous codes

    $ make helix/pico:KEY_MAP
    $ make helix/pico/back:KEY_MAP
    
  • build helix/rev2 (Helix or Helix beta) with helix previous codes

    $ make helix:KEY_MAP
    $ make helix/rev2/back:KEY_MAP
    $ make helix/rev2/under:KEY_MAP
    $ make helix/rev2/oled:KEY_MAP
    $ make helix/rev2/oled/back:KEY_MAP
    $ make helix/rev2/oled/under:KEY_MAP
    
  • build helix/pico (HelixPico) with split_common codes

    $ make helix/pico/sc:KEY_MAP
    $ make helix/pico/sc/back:KEY_MAP
    $ make helix/pico/sc/under:KEY_MAP
    
  • build helix/rev2 (Helix) with split_common codes

    $ make helix/rev2/sc:KEY_MAP
    $ make helix/rev2/sc/back:KEY_MAP
    $ make helix/rev2/sc/under:KEY_MAP
    $ make helix/rev2/sc/oled:KEY_MAP
    $ make helix/rev2/sc/oledback:KEY_MAP
    $ make helix/rev2/sc/oledunder:KEY_MAP
    

All keymaps have been tested and verified to work.

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

mtei added 16 commits October 30, 2019 07:06
Code deleted from ssd1306.c during Helix beta (helix/rev2) development has been restored to rev1/keymaps/OLED_sample/keymap.c.
how to build:
 $ make OLED_ENABLE=yes helix:default
 $ make OLED_ENABLE=old helix:default  ## using old ssd1306.c
how to build:
 $ make OLED_ENABLE=yes HELIX=noaudio helix/pico:default
 $ make OLED_ENABLE=old HELIX=noaudio helix/pico:default ## using old ssd1306.c
how to build:
 $ make OLED_ENABLE=yes HELIX=noaudio helix/pico:mtei
 $ make OLED_ENABLE=old HELIX=noaudio helix/pico:mtei ## using old ssd1306.c

// Firmware size when OLD ssd1306.c is used
 % make SIZE_MARGIN=16000 OLED_ENABLE=old HELIX=noaudio helix/pico:all
Making helix/pico with keymap biacco     - 15850/28672 (55%, 12822 bytes free)
Making helix/pico with keymap default    - 22150/28672 (77%, 6522 bytes free)
Making helix/pico with keymap mtei       - 22394/28672 (78%, 6278 bytes free)

// Firmware size when NEW oled_driver.c is used
 % make SIZE_MARGIN=16000 OLED_ENABLE=yes HELIX=noaudio helix/pico:all
Making helix/pico with keymap biacco     - 17198/28672 (59%, 11474 bytes free) +1348
Making helix/pico with keymap default    - 22568/28672 (78%, 6104 bytes free)  +418
Making helix/pico with keymap mtei       - 22798/28672 (79%, 5874 bytes free)  +404
Changed keymaps: edvorakjp, five_rows, five_rows_jis, froggy, yshrsmz

how to build:
 $ make OLED_ENABLE=yes  helix/rev2/back:all
 $ make OLED_ENABLE=old  helix/rev2/back:all ## using old ssd1306.c

// Firmware size when OLD ssd1306.c is used
 % make SIZE_MARGIN=16000 OLED_ENABLE=old helix/rev2/back:all
Making helix/rev2/back with keymap default          - 26290/28672 (91%, 2382 bytes free)
Making helix/rev2/back with keymap edvorakjp        - 25376/28672 (88%, 3296 bytes free)
Making helix/rev2/back with keymap five_rows        - 26464/28672 (92%, 2208 bytes free)
Making helix/rev2/back with keymap five_rows_jis    - 25422/28672 (88%, 3250 bytes free)
Making helix/rev2/back with keymap froggy           - 26338/28672 (91%, 2334 bytes free)
Making helix/rev2/back with keymap led_test         - 24852/28672 (86%, 3820 bytes free)
Making helix/rev2/back with keymap yshrsmz          - 24688/28672 (86%, 3984 bytes free)

// Firmware size when NEW oled_driver.c is used
 % make SIZE_MARGIN=16000 OLED_ENABLE=yes helix/rev2/back:all
Making helix/rev2/back with keymap default          - 26748/28672 (93%, 1924 bytes free)  +458
Making helix/rev2/back with keymap edvorakjp        - 25788/28672 (89%, 2884 bytes free)  +412
Making helix/rev2/back with keymap five_rows        - 26920/28672 (93%, 1752 bytes free)  +456
Making helix/rev2/back with keymap five_rows_jis    - 25958/28672 (90%, 2714 bytes free)  +536
Making helix/rev2/back with keymap froggy           - 26798/28672 (93%, 1874 bytes free)  +460
Making helix/rev2/back with keymap led_test         - 25310/28672 (88%, 3362 bytes free)  +458
Making helix/rev2/back with keymap yshrsmz          - 25108/28672 (87%, 3564 bytes free)  +420
Changed keymaps: biacco, default, mtei

how to build:
 $ make HELIX=noaudio,oled helix/pico:default
 $ make HELIX=noaudio,oled helix/pico:mtei
Changed files: default, edvorakjp, five_rows, five_rows_jis, froggy, yshrsmz

how to build:
 $ make helix/rev2/oled/back:all
how to build:
  ### build helix/pico (HelixPico) with split_common codes
  $ make helix/pico/sc:KEY_MAP
  $ make helix/pico/sc/back:KEY_MAP
  $ make helix/pico/sc/under:KEY_MAP

  ### build helix/rev2 (Helix) with split_common codes
  $ make helix/rev2/sc:KEY_MAP
  $ make helix/rev2/sc/back:KEY_MAP
  $ make helix/rev2/sc/under:KEY_MAP
  $ make helix/rev2/sc/oled:KEY_MAP
  $ make helix/rev2/sc/oledback:KEY_MAP
  $ make helix/rev2/sc/oledunder:KEY_MAP

  ### build helix/rev1 (Helix alpha)
  $ make helix/rev1:KEY_MAP

  ### build helix/pico (HelixPico) with helix old codes
  $ make helix/pico:KEY_MAP
  $ make helix/pico/back:KEY_MAP

  ### build helix/rev2 (Helix or Helix beta) with helix old codes
  $ make helix:KEY_MAP
  $ make helix/rev2/back:KEY_MAP
  $ make helix/rev2/under:KEY_MAP
  $ make helix/rev2/oled:KEY_MAP
  $ make helix/rev2/oled/back:KEY_MAP
  $ make helix/rev2/oled/under:KEY_MAP
@mtei
Copy link
Author

mtei commented Nov 7, 2019

先日、遊舎工房にお邪魔した時にお話した、helix の OLED ドライバを 標準の drivers/oled/oled_dirver.c への切り替え作業と、split_common をお試しするための作業が完成しました。

私の手元の PC で、以下のようにブランチを作りました。

$ cd qmk_firmware
$ git checkout -b helix_change_to_use_oled_driver 0.7.46

前回と同様に以下の手順を実行すれば、qmk へのpullreq が綺麗に出来るはずです。

まずないんさんの PC と Github リポジトリに qmk の最新をとりこみます。

次にないんさんの PC で、以下を実行

$ cd qmk_firmware
$ git checkout -b helix_change_to_use_oled_driver 0.7.46
$ git push origin helix_change_to_use_oled_driver

ないんさんの GitHub リポジトリで、この PR のタイトルの右にある編集ボタンを押して
マージ先のブランチを、helix_change_to_use_oled_driver に変更する。(まだマージはしません。)

ないんさんの PC で、以下を実行すれば、私のところの helix_change_to_use_oled_driver とまったく同じ内容のブランチが test_oled_driver という名前で出来上がるので、内容の確認と動作の確認をします。

$ cd qmk_firmware
$ git fetch origin pull/24/head:test_oled_driver
$ git checkout test_oled_driver

確認が終了したら、ないんさんの GitHub リポジトリで、マージをする。

最後に helix_change_to_use_oled_driver ブランチを qmk に PullRequest すれば、綺麗な PR になると思われます。

@MakotoKurauchi MakotoKurauchi changed the base branch from master to helix_change_to_use_oled_driver November 13, 2019 10:04
scan rate result:

* Helix with helix original code
  * `$ make HELIX=no_ani,scan helix/rev2/back:five_rows:flash`
     `> matrix scan frequency: 1593`
  * `$ make HELIX=no_ani,scan helix/rev2/oled/back:five_rows:flash`
     `> matrix scan frequency: 320`

* Helix with split_common
  * `$ make HELIX=no_ani,scan helix/rev2/sc/back:five_rows:flash`
     `> matrix scan frequency: 1200`
  * `$ make HELIX=no_ani,scan helix/rev2/sc/oledback:five_rows:flash`
     `> matrix scan frequency: 300`
@mtei
Copy link
Author

mtei commented Nov 19, 2019

Excuse me, let me be pending this PR. すみません、この PR ちょっと保留にさせてください。

ないんさんも気がついたように、split_common にはいくつかの機能不足があって、現行の Helix のコードでできていることができなくなります。それもあって、split_common 利用はとりあえずオプション扱いで、デファオルトのコンパイルは従来通りのコードを使用しています。

また、この PR では、rev2 と pico の全部の keymap.c を ssd1306.c 使用から、drivers/oled_driver.c の使用に書き換えています。すでに qmk に登録されている keymap.c はテストが済んでいます。しかしフォークやクローンをしてローカルにカスタマイズしているユーザーへの配慮が足りていませんでした。
これは、qmk 本家の 別件のPR 7385 番のコメント issuecomment-554737000 で指摘があって、このまま本家に PR を出すと重大な変更扱いになって、マージされるのが四ヶ月くらい先になりそうな気配です。

なので、もっとマージしてもらいやすい形で、いくつかに分割して PR を作り直したいと思います。

お騒がせしてすみません。

@mtei mtei changed the title Changed Helix OLED display to use oled_driver.c [PENDING] Changed Helix OLED display to use oled_driver.c Nov 19, 2019
@mtei mtei closed this Nov 20, 2019
@mtei mtei mentioned this pull request Dec 15, 2019
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant