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 <code@argon.blue>
|
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 <code@argon.blue>
|
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 <code@argon.blue>
|
This now exactly fits into flash on the Atreus. I had to remove the redundant |
Make
EEPROMSettingsfall back to a usable key map if it detects a possibly incompatible EEPROM layout. This forceskeymap.onlyCustom 0andsettings.defaultLayer 0, but does not write them to EEPROM.A new
settings.acceptInvalidFocus command may be used to accept the current settings as valid, updating the checksum.