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

[Keyboard] Add IDOBAO ID80 #8728

Merged
merged 12 commits into from
Apr 12, 2020
Merged

[Keyboard] Add IDOBAO ID80 #8728

merged 12 commits into from
Apr 12, 2020

Conversation

sigprof
Copy link
Contributor

@sigprof sigprof commented Apr 7, 2020

Description

Add support for the IDOBAO ID80 keyboard (available on AliExpress and on Drop).

Most of the work was actually done automatically by the KBFirmware JSON to QMK Parser, using the ID80.json file published on Drop as the data source.

Some things I'm not 100% sure about:

  1. #define RGBLED_NUM 28 value comes from the JSON data, but the actual PCB that I got has 16 underglow LEDs and 4 more LEDs on the top surface (20 total). However, the PCB photos from the Drop listing for a separate ID80 PCB show 6 LEDs on the top surface (22 total). Should the value be set to 20 (to match the actually existing PCB that I have, even though it is apparently not a final revision — the seller told that the first batch of PCBs had incorrect sizes, therefore a batch of cases with enlarged top bezel was made just for those PCBs, and the first AliExpress buyers, including me, got PCBs and cases from that batch), to 22 (to match what is shown on Drop, although that version also looks like another prototype — it even has some missing components), or left alone (because all those RGB LEDs are not really visible through the metal case)? Resolved: I decided to set RGBLED_NUM to 20, which is correct for the PCB I got from AliExpress; if a future PCB revision with a different number of LEDs would appear, it would be possible to add support for it in the same way as was done for yd60mq.

  2. The matrix layout described in the JSON data has a completely empty row (row 6, connected to pin F0; I looked at the PCB, and the corresponding MCU pin does not seem to have any PCB track connected to it). Should this row be removed from the matrix completely, or is keeping the row and column numbers identical to the vendor-provided JSON useful in some way? Resolved: I decided to remove the unused row to save EEPROM space in case VIA is enabled.

  3. The numbering of rows in the matrix is from bottom to top, which is different from most other keyboards and requires defining BOOTMAGIC_LITE_ROW and BOOTMAGIC_LITE_COLUMN to make Bootmagic Lite use the Esc key for its activation. I guess it does not really matter, because the only place where those details of the matrix layout are really visible is VIA (the saved JSON keymap contains mappings in the matrix order), and those files are not supposed to be edited manually.

  4. Is CONSOLE_ENABLE useful to have in the default configuration, or should it be turned off to save some space? With the current code and avr-gcc 8.4.0 I see 88% flash usage for make id80:default, and 90% usage for make id80:via (this part is not included in the PR yet). Setting CONSOLE_ENABLE=no brings the flash usage down to 75% and 76%.

I also tried to add VIA support, and it seems to work well, but the matrix layout must be 100% frozen before enabling VIA, so I did not add files for it yet.

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

Add initial support for the IDOBAO ID80 keyboard.

Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor.  The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.
Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.
Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically.  Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.
The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.
The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.
Replace info.json generated by the KBF to QMK converter with another
version generated using https://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/).  The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).
The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.
Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.
@mechmerlin
Copy link
Contributor

YEESSSS!!! Thank youuu!

For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.
The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows.  However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part).  Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.
Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.
@sigprof
Copy link
Contributor Author

sigprof commented Apr 9, 2020

After some more thinking I decided to remove the empty row from the matrix, mostly to save the EEPROM space when VIA is enabled. Having a 9×12 matrix leaves just 122 bytes available for dynamic macros; reducing the matrix size to 9×11 leaves 194 bytes for macros.

The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain.  However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
@sigprof
Copy link
Contributor Author

sigprof commented Apr 12, 2020

After looking at #8629, I decided to set RGBLED_NUM according to the actual PCB that I got from AliExpress — if boards from Drop will have with a different number of LEDs, this could be fixed later by creating a separate revision, as was done for yd60mq.

The RGB behavior is still not ideal, because the underglow effects assume that all LEDs are arranged uniformly around the PCB edges, therefore the extra 4 LEDs on top somewhat break the animation. This could be fixed by invoking rgblight_set_effect_range(0, 16); somewhere, but then some custom solution would be needed to control the extra 4 LEDs on top. Given the fact that the stock ID80 case does not provide proper visibility for any of those LEDs, I'm not sure that I should invest any more time into this.

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.

Don't see anything really controversial

@drashna drashna requested a review from a team April 12, 2020 19:57
@drashna drashna requested a review from a team April 12, 2020 20:06
@zvecr
Copy link
Member

zvecr commented Apr 12, 2020

Thanks!

@zvecr zvecr merged commit 17bda00 into qmk:master Apr 12, 2020
calmh added a commit to calmh/qmk_firmware that referenced this pull request Apr 13, 2020
* master: (973 commits)
  Fix AVR SPI parameter configuration, remove timeouts due to sync protocol. (qmk#8775)
  VIA Support: Jane V2 (qmk#8735)
  Add a simple custom keymap for Gergo. (qmk#8662)
  Add via support to keebio/bdn9 (qmk#8620)
  DP60 VIA cleanups (qmk#8697)
  Adding Niu Mini to VIA (qmk#8702)
  Allow trailing whitespace in markdown docs, for formatting purposes. (qmk#8774)
  Add support for hardware and board initialisation overrides. (qmk#8330)
  [Keyboard] Add IDOBAO ID80 (qmk#8728)
  [Keyboard] Quefrency Rev2 Caps Lock LED, set lighting defaults (qmk#8729)
  [Keyboard] Add handwired Fc200rt qmk board (qmk#8726)
  Bugfix for quantum/dip_switch.c (qmk#8731)
  Add *OPT aliases for *ALT keycodes and macros (qmk#8714)
  [Keymap] Add keymap for Nyquist rev3 (qmk#8706)
  format code according to conventions [skip ci]
  Added Workman ZXCVM variation (qmk#8686)
  [Keyboard] jotpad16 status leds (qmk#8643)
  [Keyboard] Add handwired BDN9-BLE (qmk#8192)
  Fix bug with layer caching in get_event_keycode (qmk#8693)
  [Keyboard] Add CannonKeys Atlas keyboard (qmk#8207)
  ...
Quarren42 pushed a commit to Quarren42/qmk_firmware that referenced this pull request Apr 15, 2020
* id80: New keyboard (IDOBAO ID80)

Add initial support for the IDOBAO ID80 keyboard.

Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor.  The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.

* id80: Update default keymap to match stock

Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.

* id80: Add Caps Lock indicator support

Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically.  Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.

* id80: Remove placeholder functions

The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.

* id80: Use Esc as the Bootmagic Lite activation key

The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.

* id80: Update info.json

Replace info.json generated by the KBF to QMK converter with another
version generated using https://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/).  The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).

* id80: Enable NKRO

The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.

* id80: Use unique USB vendor/product ID

Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.

* id80: Fix right modifiers in the default keymap

For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.

* id80: Remove empty row 6 (F0) from matrix

The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows.  However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part).  Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.

* id80: Update row numbers in the LAYOUT macro

Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.

* id80: Set RGBLED_NUM to 20 to match the actual PCB

The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain.  However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
@orvils
Copy link

orvils commented Apr 20, 2020

Thank you for the work! Just compiled and flashed this onto my board. Works fine.

One question - by default ID80 enters bootloader by holding down Space+B while plugging the USB in, after flashing your firmware this does not seem to work? I did add RESET key on one of the layers, so not a big issue, just wondering.

Waiting on VIA support.

@sigprof
Copy link
Contributor Author

sigprof commented Apr 20, 2020

@orvils
I enabled Bootmagic Lite (hold Esc when plugging the USB in to reset the EEPROM and enter the bootloader) instead of the full bootmagic, therefore Space+B and other full bootmagic combinations no longer work. Apparently Bootmagic Lite is preferred for new boards, and enabling the VIA support also forces BOOTMAGIC_ENABLE := lite, so even I would choose to enable full bootmagic, the VIA firmware would still use the lite variant, which would be even more confusing.

Note that the stock firmware apparently has RESET on Fn+Esc, so you do not even need to know about Space+B to replace it.

kylekuj pushed a commit to kylekuj/qmk_firmware that referenced this pull request Apr 21, 2020
* id80: New keyboard (IDOBAO ID80)

Add initial support for the IDOBAO ID80 keyboard.

Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor.  The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.

* id80: Update default keymap to match stock

Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.

* id80: Add Caps Lock indicator support

Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically.  Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.

* id80: Remove placeholder functions

The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.

* id80: Use Esc as the Bootmagic Lite activation key

The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.

* id80: Update info.json

Replace info.json generated by the KBF to QMK converter with another
version generated using https://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/).  The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).

* id80: Enable NKRO

The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.

* id80: Use unique USB vendor/product ID

Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.

* id80: Fix right modifiers in the default keymap

For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.

* id80: Remove empty row 6 (F0) from matrix

The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows.  However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part).  Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.

* id80: Update row numbers in the LAYOUT macro

Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.

* id80: Set RGBLED_NUM to 20 to match the actual PCB

The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain.  However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
mrlinuxfish pushed a commit to mrlinuxfish/qmk_firmware that referenced this pull request May 3, 2020
* id80: New keyboard (IDOBAO ID80)

Add initial support for the IDOBAO ID80 keyboard.

Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor.  The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.

* id80: Update default keymap to match stock

Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.

* id80: Add Caps Lock indicator support

Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically.  Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.

* id80: Remove placeholder functions

The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.

* id80: Use Esc as the Bootmagic Lite activation key

The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.

* id80: Update info.json

Replace info.json generated by the KBF to QMK converter with another
version generated using https://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/).  The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).

* id80: Enable NKRO

The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.

* id80: Use unique USB vendor/product ID

Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.

* id80: Fix right modifiers in the default keymap

For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.

* id80: Remove empty row 6 (F0) from matrix

The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows.  However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part).  Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.

* id80: Update row numbers in the LAYOUT macro

Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.

* id80: Set RGBLED_NUM to 20 to match the actual PCB

The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain.  However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
bitherder pushed a commit to bitherder/qmk_firmware that referenced this pull request May 15, 2020
* id80: New keyboard (IDOBAO ID80)

Add initial support for the IDOBAO ID80 keyboard.

Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor.  The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.

* id80: Update default keymap to match stock

Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.

* id80: Add Caps Lock indicator support

Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically.  Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.

* id80: Remove placeholder functions

The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.

* id80: Use Esc as the Bootmagic Lite activation key

The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.

* id80: Update info.json

Replace info.json generated by the KBF to QMK converter with another
version generated using https://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/).  The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).

* id80: Enable NKRO

The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.

* id80: Use unique USB vendor/product ID

Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.

* id80: Fix right modifiers in the default keymap

For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.

* id80: Remove empty row 6 (F0) from matrix

The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows.  However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part).  Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.

* id80: Update row numbers in the LAYOUT macro

Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.

* id80: Set RGBLED_NUM to 20 to match the actual PCB

The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain.  However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
sowbug pushed a commit to sowbug/qmk_firmware that referenced this pull request May 24, 2020
* id80: New keyboard (IDOBAO ID80)

Add initial support for the IDOBAO ID80 keyboard.

Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor.  The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.

* id80: Update default keymap to match stock

Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.

* id80: Add Caps Lock indicator support

Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically.  Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.

* id80: Remove placeholder functions

The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.

* id80: Use Esc as the Bootmagic Lite activation key

The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.

* id80: Update info.json

Replace info.json generated by the KBF to QMK converter with another
version generated using https://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/).  The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).

* id80: Enable NKRO

The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.

* id80: Use unique USB vendor/product ID

Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.

* id80: Fix right modifiers in the default keymap

For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.

* id80: Remove empty row 6 (F0) from matrix

The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows.  However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part).  Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.

* id80: Update row numbers in the LAYOUT macro

Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.

* id80: Set RGBLED_NUM to 20 to match the actual PCB

The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain.  However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
turky pushed a commit to turky/qmk_firmware that referenced this pull request Jun 13, 2020
* id80: New keyboard (IDOBAO ID80)

Add initial support for the IDOBAO ID80 keyboard.

Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor.  The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.

* id80: Update default keymap to match stock

Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.

* id80: Add Caps Lock indicator support

Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically.  Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.

* id80: Remove placeholder functions

The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.

* id80: Use Esc as the Bootmagic Lite activation key

The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.

* id80: Update info.json

Replace info.json generated by the KBF to QMK converter with another
version generated using https://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/).  The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).

* id80: Enable NKRO

The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.

* id80: Use unique USB vendor/product ID

Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.

* id80: Fix right modifiers in the default keymap

For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.

* id80: Remove empty row 6 (F0) from matrix

The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows.  However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part).  Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.

* id80: Update row numbers in the LAYOUT macro

Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.

* id80: Set RGBLED_NUM to 20 to match the actual PCB

The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain.  However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
jakobaa pushed a commit to jakobaa/qmk_firmware that referenced this pull request Jul 7, 2020
* id80: New keyboard (IDOBAO ID80)

Add initial support for the IDOBAO ID80 keyboard.

Most source files were generated by the KBFirmware JSON to QMK Parser
(https://noroadsleft.github.io/kbf_qmk_converter/) based on the
ID80.json file provided by the keyboard vendor.  The only change to
rules.mk was to set `COMMAND_ENABLE = no` to make the compiled firmware
fit into the available flash space.

* id80: Update default keymap to match stock

Update the Fn layer in the default keymap to match the stock firmware
which was actually flashed into the PCB.

* id80: Add Caps Lock indicator support

Although the KBFirmware JSON includes information about the MCU pins
used for keyboard indicator LEDs, the KBF to QMK converter does not
generate the required code automatically.  Implement the LED handling
code, and at the same time switch from the older `led_set_kb` API to the
newer `led_update_kb`.

* id80: Remove placeholder functions

The provided skeletons for `matrix_scan_kb` and `process_record_kb` did
not do anything useful, so remove them.

* id80: Use Esc as the Bootmagic Lite activation key

The Esc key is not at the (0, 0) position in the ID80 matrix, therefore
setting `BOOTMAGIC_LITE_ROW` and `BOOTMAGIC_LITE_COLUMN` is required to
use the Esc key for Bootmagic Lite.

* id80: Update info.json

Replace info.json generated by the KBF to QMK converter with another
version generated using https://www.keyboard-layout-editor.com/ and the
KLE raw to QMK info.json converter (https://qmk.fm/converter/).  The
updated info.json has the correct physical layout (the distance between
the function key row and the main block is actually 0.25U, but the
vendor-provided ID80.json had 0.5U there) and correct key labels (using
the stock layout instead of raw matrix locations and pin names).

* id80: Enable NKRO

The default keymap is updated to have NK_TOGG at Fn+N, like most other
keyboards which have NKRO enabled.

* id80: Use unique USB vendor/product ID

Having an unique USB vendor/product ID is required for VIA support.
The vendor ID value is the same as for the `idobo` (ID75) keyboard.

* id80: Fix right modifiers in the default keymap

For some reason the default keymap converted from the vendor-supplied
JSON had the right Shift, Alt and Ctrl keys mapped to the left side
modifier keycodes.

* id80: Remove empty row 6 (F0) from matrix

The matrix layout which was defined in the vendor-supplied ID80.json
file had 12 rows which corresponded to the left and right parts of the
6 physical rows.  However, the row 6 of the matrix (connected to the F0
pin), which corresponded to the right part of the physical bottom row,
was completely empty (all 9 keys of the bottom row were placed in the
matrix row for the left part).  Keeping this row in the matrix just
wastes resources; in particular, when the VIA support is enabled, having
a 9×12 matrix with 4 layers leaves only 122 bytes available for dynamic
macros, which is less than the recommended minimum of 128 bytes.
Removing the unused row reduces the matrix size to 9×11, which leaves
194 bytes of EEPROM space for dynamic macros.

* id80: Update row numbers in the LAYOUT macro

Update row numbers in the names of the LAYOUT macro parameters after
removing a row in the middle.

* id80: Set RGBLED_NUM to 20 to match the actual PCB

The vendor-supplied ID80.json file specified that the PCB should have
28 RGB LEDs in the chain.  However, the actual PCB that was shipped
from AliExpress had 20 LEDs in the chain (16 underglow LEDs, and then 4
more LEDs on top of the PCB, to the right of the Enter key location).
Update RGBLED_NUM to match the actual PCB.
@sigprof sigprof deleted the id80 branch September 2, 2020 20:47
Copy link

@lmbundit lmbundit left a comment

Choose a reason for hiding this comment

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

Hi,

Can you add an alternative for RGB 22?
Thank

Bundit

@noroadsleft
Copy link
Member

@lmbundit Are you able to flash a .hex file and test it if I can get you one?

@lmbundit
Copy link

lmbundit commented Feb 4, 2021 via email

@sigprof
Copy link
Contributor Author

sigprof commented Feb 4, 2021

@lmbundit Actually I already wondered for some time whether the range of LEDs which are used for effects should be limited by default:

    rgblight_set_effect_range(0, 16);

The reason is that many lighting effects are set up for a ring of LEDs (actually it's a rectangle on this PCB, but the point is that the effects assume a closed shape where the first LED of the chain is near the last one). Currently the effects assume there are 20 LEDs, but actually only 16 of them are visible if the acrylic bottom is used, and there is a visible discontinuity on the left edge of the keyboard, where LED 0 is near LED 15. Limiting the effect range would solve this issue, but the LEDs on top would no longer light up, unless some custom code to control them is added.

I assume that you want some way to make the ID80 firmware with support for 6 top LEDs available from config.qmk.fm; however, the problem is that currently the web configurator does not offer any way to set custom options, therefore the only way to provide such an option would be to define another keyboard model (actually two, because there are separate models for the ANSI and ISO versions of the PCB).

I looked what is offered on idobao.net, and it seems that even the most recent “Crystal” version of ID80 (with either transparent acrylic or smokey PC case) would not provide good visibility for the LEDs on top of the PCB (the plate does not have any holes above those LEDs, so you would get just a limited amount of light bleeding through the space between the plate and the PCB). So any modifications which make those LEDs visible would probably require a custom case (or, for that Crystal version, a customized plate) and some soldering to install those LEDs. I'm not sure that the existence of such a custom modification would be a good justification for adding two extra keyboard models to the already huge list. Adding a keymap which enables all LEDs could be possible (that keymap then could be used as a starting point for user keymaps), but it would not help users who want to use the web configurator.

It could be possible to make some hacks for the VIA firmware to make the number of LEDs configurable from there (using the layout options in a non-standard way), but I'm afraid that such hacks would be frowned upon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants