Merge pull request #51 from UltimateHackingKeyboard/led-display

Add code to drive the LED display
This commit is contained in:
László Monda
2017-07-14 23:18:28 +02:00
committed by GitHub
15 changed files with 132 additions and 29 deletions

View File

@@ -1,6 +1,7 @@
#include "config/parse_keymap.h"
#include "key_action.h"
#include "current_keymap.h"
#include "led_display.h"
static bool isDryRun;
@@ -180,13 +181,15 @@ parser_error_t ParseKeymap(serialized_buffer_t *buffer) {;
const char *description = readString(buffer, &descriptionLen);
uint16_t layerCount = readCompactLength(buffer);
(void)abbreviation;
(void)name;
(void)description;
if (layerCount != LAYER_COUNT) {
return ParserError_InvalidLayerCount;
}
isDryRun = !isDefault;
if (!isDryRun) {
LedDisplay_SetText(abbreviationLen, abbreviation);
}
for (uint16_t layerIdx = 0; layerIdx < layerCount; layerIdx++) {
errorCode = parseLayer(buffer, layerIdx);
if (errorCode != ParserError_Success) {