-
Notifications
You must be signed in to change notification settings - Fork 259
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
fallback keymap #1304
base: master
Are you sure you want to change the base?
fallback keymap #1304
Conversation
Make `EEPROMSettings` fall back to a usable key map if it detects a possibly incompatible EEPROM layout. This forces `keymap.onlyCustom 0` and `settings.defaultLayer 0`, but does not write them to EEPROM. A new `settings.acceptInvalid` Focus command may be used to accept the current settings as valid, updating the checksum. Signed-off-by: Taylor Yu <[email protected]>
This should probably not get merged until Chrysalis gets modified to do something reasonable when it encounters a keyboard in the fallback state. At least #1217 should be fixed. Also, Chrysalis should do display a useful warning if it finds invalid settings. (It should check for mismatched CRCs in |
Adapt previous to fit on the Atreus example sketch. Notably, this makes `EEPROMKeymap::max_layers()` private so that it can be inlined. Therefore, sketches like the `EEPROM-Keymap-Programmer` example sketch that used that method needed to be adjusted. That method seemed obsolete anyway, because it doesn't do some error checking that `EEPROMKeymap::setup()` does. Also, it removes the `settings.acceptInvalid` command, replacing it with an optional argument to `settings.valid?`. Unfortunately, this means that Chrysalis has no direct way to detect the presence of this capability. Signed-off-by: Taylor Yu <[email protected]>
OK, this unfortunately breaks the keymap toggle magic combo on the Model 100, because it unconditionally resets the keymap to |
Signed-off-by: Taylor Yu <[email protected]>
This now exactly fits into flash on the Atreus. I had to remove the redundant |
Make
EEPROMSettings
fall back to a usable key map if it detects a possibly incompatible EEPROM layout. This forceskeymap.onlyCustom 0
andsettings.defaultLayer 0
, but does not write them to EEPROM.A new
settings.acceptInvalid
Focus command may be used to accept the current settings as valid, updating the checksum.