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

Update the Speedo firmware for v3.0 #10657

Merged
merged 8 commits into from
Oct 29, 2020
Merged

Update the Speedo firmware for v3.0 #10657

merged 8 commits into from
Oct 29, 2020

Conversation

pcewing
Copy link
Contributor

@pcewing pcewing commented Oct 16, 2020

Description

I have recently released a new major version of the CozyKeys Speedo which was an overhaul of the entire design. This PR implements the firmware to support the new version.

The original firmware was implemented years ago and a lot has changed in QMK since then so there is a fair amount of cleanup in this PR, some of which was recommended by the PR Checklist document.

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

ChangeLog

  • Existing firmware for the Speedo was moved into the cozykeys/v2 directory

keyboards/speedo/info.json Outdated Show resolved Hide resolved
keyboards/speedo/keymaps/default/keymap.c Outdated Show resolved Hide resolved
keyboards/speedo/keymaps/default/keymap.c Outdated Show resolved Hide resolved
keyboards/speedo/keymaps/default/keymap.c Outdated Show resolved Hide resolved
keyboards/speedo/rules.mk Outdated Show resolved Hide resolved
keyboards/speedo/rules.mk Outdated Show resolved Hide resolved
keyboards/speedo/rules.mk Outdated Show resolved Hide resolved
keyboards/speedo/rules.mk Outdated Show resolved Hide resolved
keyboards/speedo/readme.md Outdated Show resolved Hide resolved
@fauxpark fauxpark requested a review from a team October 17, 2020 16:34
@pcewing
Copy link
Contributor Author

pcewing commented Oct 17, 2020

Hey @fauxpark, thanks for the review! I agree with all of the suggestions except for one and committed those changes.

Replied directly to the one suggestion I'd prefer not to make.

@noroadsleft
Copy link
Member

@pcewing Do you know how many of the previous version boards are in the wild? The changes you've made here break support for that version.

@pcewing
Copy link
Contributor Author

pcewing commented Oct 17, 2020

@noroadsleft Unfortunately I don't know the answer to that. I never created a PCB for the previous version or directly sold the case parts, so if anyone had a copy they would have had to get their own case from a laser cutter. I never saw anyone post pictures of their own but that obviously doesn't mean no one ever built one.

I'd be happy to leave the existing firmware in tact and maybe restructure the directory tree to look something like:

./keyboards
 |_ cozykeys
     |_ speedo_v2
     |_ speedo_v3

Similar to how keebio is set up. I have another keyboard I eventually need to merge the firmware for as well so this would help keep my things organized nicely. Thoughts?

@noroadsleft
Copy link
Member

noroadsleft commented Oct 17, 2020

@pcewing If the layout of the board isn't going to change in a future revision, I'd suggest something slightly different:

[-] keyboards
    [-] cozykeys
        [-] speedo
            [+] keymaps
            [+] v2
            [+] v3
        [+] bloomer

If the layout of the board doesn't change, then setting the directories up this way makes the keymaps revision-agnostic – the Planck does this, for example – so anyone who may have the V2 and wants to upgrade can use their existing V2 keymap and compile it with make cozykeys/speedo/v3:keymap

@pcewing
Copy link
Contributor Author

pcewing commented Oct 17, 2020

That depends what you mean by layout. From v2 -> v3 the pin mappings changed due to using a more modern MCU on the PCB and coming up with a schematic that makes more sense. The key locations also changed somewhat; however, the number of keys is identical and ideally a v2 keymap would be fine on v3 and vice versa.

I don't expect anymore changes in the number of keys or where they are placed; however, I could see the pin mappings changing if I ever use a different MCU on a future version.

(For the bloomer, v2 and v3 are actually very different but I'll address that when I eventually get a PR set up for those.)

@pcewing
Copy link
Contributor Author

pcewing commented Oct 17, 2020

@noroadsleft I looked at how the Planck and iris are set up and it seems like anything in config.h and <keyboard>.h can differ per version. If that's the case, then I completely agree with your suggestion because the keymaps should work in either case.

I'll get the PR updated with that change, thanks for the suggestion!

@pcewing
Copy link
Contributor Author

pcewing commented Oct 18, 2020

Hey @noroadsleft, after I started implementing this, I noticed the info.json has to be shared by all versions in ./keyboards/cozykeys/speedo; however, the layout is slightly different between v2 and v3:

I've seen cases where other keyboards have multiple layouts in their info.json, for example: https://github.com/qmk/qmk_firmware/blob/master/keyboards/choc_taro/info.json

Would it make sense in the speedo's info.json to do something like:

{
    ...
    "layouts": {
        "LAYOUT_v3": {
            "layout": [
                ...
            ]
        },
        "LAYOUT_v2": {
            "layout": [
                ...
            ]
        }
    }
}

I think the downside is that in keymap.c users would have to use LAYOUT_v2 / LAYOUT_v3 macros which sort of defeats the whole purpose of sharing keymaps between the two versions. What would you suggest?

Sorry for all the questions, just trying to figure out the right way to go about this.

@noroadsleft
Copy link
Member

You can actually do an info.json file for each revision independently. The Clueboard codebase actually does a vendor-level info.json in keyboards/clueboard/ and then each board gets an info.json that's specific to that board. The keyboard-level files inherit properties that are set at levels above. So you could do:

[-] keyboards
    [-] cozykeys
        [-] speedo
            [+] v2     <--- the existing codebase
                [+] keymaps
                    info.json
            [+] v3     <--- the codebase for v3.0
                [+] keymaps
                    info.json
        [+] bloomer

This does however make it so that keymaps are specific to either v2 or v3, but in this case I think that would be unavoidable.

@pcewing
Copy link
Contributor Author

pcewing commented Oct 23, 2020

Yea, I think that makes the most sense. Technically speaking, a keymap could work between v2 and v3 but I think it just needlessly complicates things. After looking at the ErgoDash, it also does what you just described having a separate directory for mini and rev1, each with it's own info.json and keymaps.

That's the direction I'm going to go. Have had a busy week but should get that done and the PR updated over the weekend. :)

@pcewing
Copy link
Contributor Author

pcewing commented Oct 24, 2020

I've restored the files for the v2 and gave them the same cleanup treatment as
the new ones for the v3. I also updated the folder structure so now everything
is under:

keyboards
|_  cozykeys
    |_  speedo
        |_  v2
        |_  v3

I retested building and flashing and also tested that the info.json files
load properly in the QMK configurator.

@pcewing pcewing requested review from fauxpark and removed request for a team October 24, 2020 03:37
keyboards/cozykeys/speedo/readme.md Outdated Show resolved Hide resolved
@fauxpark fauxpark requested a review from a team October 24, 2020 05:43
@drashna drashna added the breaking_change Changes that need to wait for a version increment label Oct 28, 2020
@drashna
Copy link
Member

drashna commented Oct 28, 2020

This moves around the folder location for the keyboard, and should go through the breaking changes process, and be retargeted to develop.

@pcewing pcewing changed the base branch from master to develop October 29, 2020 01:59
@pcewing
Copy link
Contributor Author

pcewing commented Oct 29, 2020

@drashna I've re-targeted the PR to the develop branch and added a ChangeLog section to the PR description. Let me know if there is anything else I need to do to address the breaking change process.

I see that the develop branch is closing to new PRs on October 31 and I'd love to get this merged before then if possible so the firmware for the new version is available when the next set of breaking changes are merged to master. Thanks!

@drashna drashna merged commit 92ca6b9 into qmk:develop Oct 29, 2020
@drashna
Copy link
Member

drashna commented Oct 29, 2020

Thanks, and not a problem!

noroadsleft pushed a commit that referenced this pull request Oct 30, 2020
* Update the Speedo firmware for v3.0

* Cleanup recommendations from the PR checklist

* Address PR feedback

* Update build instructions in readme

* Restructure folders and restore v2 firmware

* Clean up layouts in info.json

* Remove unnecessary files

* Address more PR feedback
noroadsleft added a commit that referenced this pull request Nov 28, 2020
* Branch point for 2020 November 28 Breaking Change                                                

* Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183)                                           

* Add support for soft serial to ATmega32U2 (#10204)                                               

* Change MIDI velocity implementation to allow direct control of velocity value (#9940)            

* Add ability to build a subset of all keyboards based on platform.                                

* Actually use eeprom_driver_init().                                                               

* Make bootloader_jump weak for ChibiOS. (#10417)                                                  

* Joystick 16-bit support (#10439)                                                                 

* Per-encoder resolutions (#10259)                                                                 

* Share button state from mousekey to pointing_device (#10179)                                     

* Add hotfix for chibios keyboards not wake (#10088)                                               

* Add advanced/efficient RGB Matrix Indicators (#8564)                                             

* Naming change.                                                                                   

* Support for STM32 GPIOF,G,H,I,J,K (#10206)                                                       

* Add milc as a dependency and remove the installed milc (#10563)                                  

* ChibiOS upgrade: early init conversions (#10214)                                                 

* ChibiOS upgrade: configuration file migrator (#9952)                                             

* Haptic and solenoid cleanup (#9700)                                                              

* XD75 cleanup (#10524)                                                                            

* OLED display update interval support (#10388)                                                    

* Add definition based on currently-selected serial driver. (#10716)                               

* New feature: Retro Tapping per key (#10622)                                                      

* Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638)             

* Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530)

* Rescale both ChibiOS and AVR backlighting.                                                       

* Reduce Helix keyboard build variation (#8669)                                                    

* Minor change to behavior allowing display updates to continue between task ticks (#10750)        

* Some GPIO manipulations in matrix.c change to atomic. (#10491)                                   

* qmk cformat (#10767)                                                                             

* [Keyboard] Update the Speedo firmware for v3.0 (#10657)                                          

* Maartenwut/Maarten namechange to evyd13/Evy (#10274)                                             

* [quantum] combine repeated lines of code (#10837)                                                

* Add step sequencer feature (#9703)                                                               

* aeboards/ext65 refactor (#10820)                                                                 

* Refactor xelus/dawn60 for Rev2 later (#10584)                                                    

* add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824)                                 

* [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549)                                    

* update chibios os usb for the otg driver (#8893)                                                 

* Remove HD44780 References, Part 4 (#10735)                                                       

* [Keyboard] Add Valor FRL TKL (+refactor) (#10512)                                                

* Fix cursor position bug in oled_write_raw functions (#10800)                                     

* Fixup version.h writing when using SKIP_VERSION=yes (#10972)                                     

* Allow for certain code in the codebase assuming length of string. (#10974)                       

* Add AT90USB support for serial.c (#10706)                                                        

* Auto shift: support repeats and early registration (#9826)                                       

* Rename ledmatrix.h to match .c file (#7949)                                                      

* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231)                                        

* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840)                                        

* Merge point for 2020 Nov 28 Breaking Change
xgnxs pushed a commit to xgnxs/qmk_firmware that referenced this pull request Jan 9, 2021
* Branch point for 2020 November 28 Breaking Change                                                

* Remove matrix_col_t to allow MATRIX_ROWS > 32 (qmk#10183)                                           

* Add support for soft serial to ATmega32U2 (qmk#10204)                                               

* Change MIDI velocity implementation to allow direct control of velocity value (qmk#9940)            

* Add ability to build a subset of all keyboards based on platform.                                

* Actually use eeprom_driver_init().                                                               

* Make bootloader_jump weak for ChibiOS. (qmk#10417)                                                  

* Joystick 16-bit support (qmk#10439)                                                                 

* Per-encoder resolutions (qmk#10259)                                                                 

* Share button state from mousekey to pointing_device (qmk#10179)                                     

* Add hotfix for chibios keyboards not wake (qmk#10088)                                               

* Add advanced/efficient RGB Matrix Indicators (qmk#8564)                                             

* Naming change.                                                                                   

* Support for STM32 GPIOF,G,H,I,J,K (qmk#10206)                                                       

* Add milc as a dependency and remove the installed milc (qmk#10563)                                  

* ChibiOS upgrade: early init conversions (qmk#10214)                                                 

* ChibiOS upgrade: configuration file migrator (qmk#9952)                                             

* Haptic and solenoid cleanup (qmk#9700)                                                              

* XD75 cleanup (qmk#10524)                                                                            

* OLED display update interval support (qmk#10388)                                                    

* Add definition based on currently-selected serial driver. (qmk#10716)                               

* New feature: Retro Tapping per key (qmk#10622)                                                      

* Allow for modification of output RGB values when using rgblight/rgb_matrix. (qmk#10638)             

* Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (qmk#10530)

* Rescale both ChibiOS and AVR backlighting.                                                       

* Reduce Helix keyboard build variation (qmk#8669)                                                    

* Minor change to behavior allowing display updates to continue between task ticks (qmk#10750)        

* Some GPIO manipulations in matrix.c change to atomic. (qmk#10491)                                   

* qmk cformat (qmk#10767)                                                                             

* [Keyboard] Update the Speedo firmware for v3.0 (qmk#10657)                                          

* Maartenwut/Maarten namechange to evyd13/Evy (qmk#10274)                                             

* [quantum] combine repeated lines of code (qmk#10837)                                                

* Add step sequencer feature (qmk#9703)                                                               

* aeboards/ext65 refactor (qmk#10820)                                                                 

* Refactor xelus/dawn60 for Rev2 later (qmk#10584)                                                    

* add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (qmk#10824)                                 

* [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (qmk#10549)                                    

* update chibios os usb for the otg driver (qmk#8893)                                                 

* Remove HD44780 References, Part 4 (qmk#10735)                                                       

* [Keyboard] Add Valor FRL TKL (+refactor) (qmk#10512)                                                

* Fix cursor position bug in oled_write_raw functions (qmk#10800)                                     

* Fixup version.h writing when using SKIP_VERSION=yes (qmk#10972)                                     

* Allow for certain code in the codebase assuming length of string. (qmk#10974)                       

* Add AT90USB support for serial.c (qmk#10706)                                                        

* Auto shift: support repeats and early registration (qmk#9826)                                       

* Rename ledmatrix.h to match .c file (qmk#7949)                                                      

* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (qmk#10231)                                        

* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (qmk#10840)                                        

* Merge point for 2020 Nov 28 Breaking Change
drashna pushed a commit to zsa/qmk_firmware that referenced this pull request Jan 13, 2021
* Branch point for 2020 November 28 Breaking Change

* Remove matrix_col_t to allow MATRIX_ROWS > 32 (qmk#10183)

* Add support for soft serial to ATmega32U2 (qmk#10204)

* Change MIDI velocity implementation to allow direct control of velocity value (qmk#9940)

* Add ability to build a subset of all keyboards based on platform.

* Actually use eeprom_driver_init().

* Make bootloader_jump weak for ChibiOS. (qmk#10417)

* Joystick 16-bit support (qmk#10439)

* Per-encoder resolutions (qmk#10259)

* Share button state from mousekey to pointing_device (qmk#10179)

* Add hotfix for chibios keyboards not wake (qmk#10088)

* Add advanced/efficient RGB Matrix Indicators (qmk#8564)

* Naming change.

* Support for STM32 GPIOF,G,H,I,J,K (qmk#10206)

* Add milc as a dependency and remove the installed milc (qmk#10563)

* ChibiOS upgrade: early init conversions (qmk#10214)

* ChibiOS upgrade: configuration file migrator (qmk#9952)

* Haptic and solenoid cleanup (qmk#9700)

* XD75 cleanup (qmk#10524)

* OLED display update interval support (qmk#10388)

* Add definition based on currently-selected serial driver. (qmk#10716)

* New feature: Retro Tapping per key (qmk#10622)

* Allow for modification of output RGB values when using rgblight/rgb_matrix. (qmk#10638)

* Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (qmk#10530)

* Rescale both ChibiOS and AVR backlighting.

* Reduce Helix keyboard build variation (qmk#8669)

* Minor change to behavior allowing display updates to continue between task ticks (qmk#10750)

* Some GPIO manipulations in matrix.c change to atomic. (qmk#10491)

* qmk cformat (qmk#10767)

* [Keyboard] Update the Speedo firmware for v3.0 (qmk#10657)

* Maartenwut/Maarten namechange to evyd13/Evy (qmk#10274)

* [quantum] combine repeated lines of code (qmk#10837)

* Add step sequencer feature (qmk#9703)

* aeboards/ext65 refactor (qmk#10820)

* Refactor xelus/dawn60 for Rev2 later (qmk#10584)

* add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (qmk#10824)

* [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (qmk#10549)

* update chibios os usb for the otg driver (qmk#8893)

* Remove HD44780 References, Part 4 (qmk#10735)

* [Keyboard] Add Valor FRL TKL (+refactor) (qmk#10512)

* Fix cursor position bug in oled_write_raw functions (qmk#10800)

* Fixup version.h writing when using SKIP_VERSION=yes (qmk#10972)

* Allow for certain code in the codebase assuming length of string. (qmk#10974)

* Add AT90USB support for serial.c (qmk#10706)

* Auto shift: support repeats and early registration (qmk#9826)

* Rename ledmatrix.h to match .c file (qmk#7949)

* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (qmk#10231)

* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (qmk#10840)

* Merge point for 2020 Nov 28 Breaking Change
BorisTestov pushed a commit to BorisTestov/qmk_firmware that referenced this pull request May 23, 2024
* Branch point for 2020 November 28 Breaking Change                                                

* Remove matrix_col_t to allow MATRIX_ROWS > 32 (qmk#10183)                                           

* Add support for soft serial to ATmega32U2 (qmk#10204)                                               

* Change MIDI velocity implementation to allow direct control of velocity value (qmk#9940)            

* Add ability to build a subset of all keyboards based on platform.                                

* Actually use eeprom_driver_init().                                                               

* Make bootloader_jump weak for ChibiOS. (qmk#10417)                                                  

* Joystick 16-bit support (qmk#10439)                                                                 

* Per-encoder resolutions (qmk#10259)                                                                 

* Share button state from mousekey to pointing_device (qmk#10179)                                     

* Add hotfix for chibios keyboards not wake (qmk#10088)                                               

* Add advanced/efficient RGB Matrix Indicators (qmk#8564)                                             

* Naming change.                                                                                   

* Support for STM32 GPIOF,G,H,I,J,K (qmk#10206)                                                       

* Add milc as a dependency and remove the installed milc (qmk#10563)                                  

* ChibiOS upgrade: early init conversions (qmk#10214)                                                 

* ChibiOS upgrade: configuration file migrator (qmk#9952)                                             

* Haptic and solenoid cleanup (qmk#9700)                                                              

* XD75 cleanup (qmk#10524)                                                                            

* OLED display update interval support (qmk#10388)                                                    

* Add definition based on currently-selected serial driver. (qmk#10716)                               

* New feature: Retro Tapping per key (qmk#10622)                                                      

* Allow for modification of output RGB values when using rgblight/rgb_matrix. (qmk#10638)             

* Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (qmk#10530)

* Rescale both ChibiOS and AVR backlighting.                                                       

* Reduce Helix keyboard build variation (qmk#8669)                                                    

* Minor change to behavior allowing display updates to continue between task ticks (qmk#10750)        

* Some GPIO manipulations in matrix.c change to atomic. (qmk#10491)                                   

* qmk cformat (qmk#10767)                                                                             

* [Keyboard] Update the Speedo firmware for v3.0 (qmk#10657)                                          

* Maartenwut/Maarten namechange to evyd13/Evy (qmk#10274)                                             

* [quantum] combine repeated lines of code (qmk#10837)                                                

* Add step sequencer feature (qmk#9703)                                                               

* aeboards/ext65 refactor (qmk#10820)                                                                 

* Refactor xelus/dawn60 for Rev2 later (qmk#10584)                                                    

* add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (qmk#10824)                                 

* [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (qmk#10549)                                    

* update chibios os usb for the otg driver (qmk#8893)                                                 

* Remove HD44780 References, Part 4 (qmk#10735)                                                       

* [Keyboard] Add Valor FRL TKL (+refactor) (qmk#10512)                                                

* Fix cursor position bug in oled_write_raw functions (qmk#10800)                                     

* Fixup version.h writing when using SKIP_VERSION=yes (qmk#10972)                                     

* Allow for certain code in the codebase assuming length of string. (qmk#10974)                       

* Add AT90USB support for serial.c (qmk#10706)                                                        

* Auto shift: support repeats and early registration (qmk#9826)                                       

* Rename ledmatrix.h to match .c file (qmk#7949)                                                      

* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (qmk#10231)                                        

* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (qmk#10840)                                        

* Merge point for 2020 Nov 28 Breaking Change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking_change Changes that need to wait for a version increment keyboard keymap
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants