-
-
Notifications
You must be signed in to change notification settings - Fork 39.6k
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
VIA Encoder Map Support #17734
VIA Encoder Map Support #17734
Conversation
hey @wilba - is the
|
Lesson Learned: When porting existing code to this functionality on an existing KB one will need to clear the dynamic memory portion on the KB. How depends on what type of kb one has:
|
This actually happens only on the STM32F4x1 chips, and only when not using the When using the When using most other STM32 chips, the EEPROM backing store is located at the end of internal flash and is preserved when flashing the firwmare. However, even though the EEPROM backing store may be preserved in some cases, VIA also checks the magic number which is derived from the firmware build date; therefore, if you flash a firmware which was built on a different day than the previously flashed version, the dynamic keymap will still be reset to default. But rebuilding the firmware multiple times during the same day won't trigger that reset — in that case you would need to perform EEPROM reset manually. And if you are using Bootmagic to enter the bootloader, that would reset the EEPROM too. |
@vinorodrigues I got the message and looked at the code again to see if I could explain your symptoms but was too slow to assist, sorry. Glad you got it sorted. |
@sigprof If you can think of a neat way of increasing the granularity of the firmware timestamp in the magic number, let me know 😃 |
As per the-via/app#26 this change adds VIA support for the encoder map functionality that is already in QMK.
The current version of VIA (i.e. what is live now at https://usevia.app/#/) now supports this minor change to the protocol, to get and set the encoder map.
This change has no impact on existing firmware and VIA functionality. VIA works as usual for firmware built before this change, and these new commands will only be called by VIA if the keyboard definition includes the encoders and the firmware reports the correct protocol version. This allows keyboard maintainers to update at their discretion.
How to implement
ENCODER_ENABLE = yes
to rules.mkENCODER_MAP_ENABLE = yes
to keymaps/via/rules.mkkeymaps/via/keymap.c
Types of Changes
Checklist