diff --git a/right/src/config_parser/parse_config.c b/right/src/config_parser/parse_config.c index 5457931..7b871a5 100644 --- a/right/src/config_parser/parse_config.c +++ b/right/src/config_parser/parse_config.c @@ -41,7 +41,7 @@ parser_error_t ParseConfig(config_buffer_t *buffer) if (macroCount > MAX_MACRO_NUM) { return ParserError_InvalidMacroCount; } - for (uint16_t macroIdx = 0; macroIdx < macroCount; macroIdx++) { + for (uint8_t macroIdx = 0; macroIdx < macroCount; macroIdx++) { errorCode = ParseMacro(buffer, macroIdx); if (errorCode != ParserError_Success) { return errorCode; diff --git a/right/src/config_parser/parse_macro.c b/right/src/config_parser/parse_macro.c index 5f8dcaf..0b2bf1e 100644 --- a/right/src/config_parser/parse_macro.c +++ b/right/src/config_parser/parse_macro.c @@ -87,7 +87,7 @@ parser_error_t parseMacroAction(config_buffer_t *buffer) { return ParserError_InvalidSerializedMacroActionType; } -parser_error_t ParseMacro(config_buffer_t *buffer, uint16_t macroIdx) { +parser_error_t ParseMacro(config_buffer_t *buffer, uint8_t macroIdx) { uint16_t offset = buffer->offset; parser_error_t errorCode; uint16_t nameLen; diff --git a/right/src/config_parser/parse_macro.h b/right/src/config_parser/parse_macro.h index f2f504c..3f99a1f 100644 --- a/right/src/config_parser/parse_macro.h +++ b/right/src/config_parser/parse_macro.h @@ -20,6 +20,6 @@ // Functions: - parser_error_t ParseMacro(config_buffer_t *buffer, uint16_t macroIdx); + parser_error_t ParseMacro(config_buffer_t *buffer, uint8_t macroIdx); #endif diff --git a/right/src/key_action.h b/right/src/key_action.h index 9346215..cb5a439 100644 --- a/right/src/key_action.h +++ b/right/src/key_action.h @@ -92,7 +92,7 @@ uint8_t keymapId; } __attribute__ ((packed)) switchKeymap; struct { - uint16_t macroId; + uint8_t macroId; } __attribute__ ((packed)) playMacro; struct { test_action_t testAction; diff --git a/right/src/macros.h b/right/src/macros.h index 652091d..fd1c08f 100644 --- a/right/src/macros.h +++ b/right/src/macros.h @@ -7,7 +7,7 @@ // Macros: - #define MAX_MACRO_NUM 1024 + #define MAX_MACRO_NUM 255 // Typedefs: