From 711769cb50fed87c48211960ed7a141643232145 Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Tue, 8 Aug 2017 11:42:35 -0700 Subject: [PATCH] Add some temporary code to ensure that only the default keymap is applied --- right/src/config_parser/parse_keymap.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/right/src/config_parser/parse_keymap.c b/right/src/config_parser/parse_keymap.c index 455ba26..27695cd 100644 --- a/right/src/config_parser/parse_keymap.c +++ b/right/src/config_parser/parse_keymap.c @@ -185,21 +185,28 @@ parser_error_t ParseKeymap(config_buffer_t *buffer) {; const char *name = readString(buffer, &nameLen); const char *description = readString(buffer, &descriptionLen); uint16_t layerCount = readCompactLength(buffer); + bool temp; (void)name; (void)description; if (layerCount != LAYER_COUNT) { return ParserError_InvalidLayerCount; } + temp = ParserRunDry; + if (!isDefault) { + ParserRunDry = true; + } if (!ParserRunDry) { LedDisplay_SetText(abbreviationLen, abbreviation); } for (uint16_t layerIdx = 0; layerIdx < layerCount; layerIdx++) { errorCode = parseLayer(buffer, layerIdx); if (errorCode != ParserError_Success) { + ParserRunDry = temp; return errorCode; } } + ParserRunDry = temp; return ParserError_Success; }