Verify a new configuration before applying it
This commit is contained in:
@@ -3,8 +3,11 @@
|
||||
static uint8_t hardwareConfig[HARDWARE_CONFIG_SIZE];
|
||||
config_buffer_t HardwareConfigBuffer = {hardwareConfig};
|
||||
|
||||
static uint8_t userConfig[USER_CONFIG_SIZE];
|
||||
config_buffer_t UserConfigBuffer = {userConfig};
|
||||
static uint8_t userConfig1[USER_CONFIG_SIZE];
|
||||
static uint8_t userConfig2[USER_CONFIG_SIZE];
|
||||
|
||||
config_buffer_t UserConfigBuffer = { userConfig1 };
|
||||
config_buffer_t NewUserConfigBuffer = { userConfig2 };
|
||||
|
||||
uint8_t readUInt8(config_buffer_t *buffer) {
|
||||
return buffer->buffer[buffer->offset++];
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
extern config_buffer_t HardwareConfigBuffer;
|
||||
extern config_buffer_t UserConfigBuffer;
|
||||
extern config_buffer_t NewUserConfigBuffer;
|
||||
|
||||
// Functions:
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ parser_error_t ParseKeymap(config_buffer_t *buffer) {;
|
||||
if (layerCount != LAYER_COUNT) {
|
||||
return ParserError_InvalidLayerCount;
|
||||
}
|
||||
isDryRun = !isDefault;
|
||||
isDryRun = buffer == &NewUserConfigBuffer || !isDefault;
|
||||
if (!isDryRun) {
|
||||
LedDisplay_SetText(abbreviationLen, abbreviation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user