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

feat: adding separate settings for automatic saving of the selected endpoint / ext_power state #2308

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Timoyoungster
Copy link
Contributor

Hello,

it's my first pull request so I hope I did everything right :)

This adds two new config values for en-/disabling the automatic saving of the selected endpoint / ext_power state. (#1599)

Per default both are set to y to keep the default behaviour the same.

I tested it on my own keyboard and as far as I can tell it works, but I'd be grateful if also other people could test it for their boards.

@Timoyoungster Timoyoungster requested a review from a team as a code owner May 23, 2024 14:38
@caksoylar caksoylar added the core Core functionality/behavior of ZMK label May 23, 2024
they are already only defined if SETTINGS is defined
@hyx0329
Copy link
Contributor

hyx0329 commented Jun 22, 2024

Hi, it looks the automatic saving is disabled, but the loading of those values are not disabled(if they exist due to an old firmware and not erased). It can be a feature XD, something disables automatic saving but allows manual saving.

Quick notes for anyone interested:

  • search read_cb(cb_arg, &preferred_transport for transport(USB/BT) loading code
  • search read_cb(cb_arg, &active_profile for BT profile loading code

My current approach is just commenting out the related code(so they are disabled) and that leads to a hacky but satisfying result :)

@Timoyoungster
Copy link
Contributor Author

My primary reason for creating this PR was that I wanted to save write cycles to the eeprom's, since I sometimes switch a lot between bluetooth and usb when I'm working on my PC and laptop simultaneously.

Due to this regular switching I didn't really consider the default values and assumed that it would be set somewhere in the building/flashing process.

But if it's desired I could either add a config value for the defaults and disable the loading code or - as you mentioned - add a behavior to manually save the defaults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core functionality/behavior of ZMK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants