Fix incorrect `pgm_read_byte()` calls in DynamicMacros

DynamicMacros reads sequences from EEPROM, not PROGMEM, so it needs to call
`Runtime.storage().read()` instead.  The code was copied from Macros, but a
couple of spots were missed.

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1138/head
Michael Richters 3 years ago
parent dd44da41e4
commit 42b81bae96

@ -176,7 +176,7 @@ void DynamicMacros::play(uint8_t macro_id) {
case MACRO_ACTION_STEP_TAP_SEQUENCE: { case MACRO_ACTION_STEP_TAP_SEQUENCE: {
while (true) { while (true) {
key.setFlags(0); key.setFlags(0);
key.setKeyCode(pgm_read_byte(pos++)); key.setKeyCode(Runtime.storage().read(pos++));
if (key == Key_NoKey) if (key == Key_NoKey)
break; break;
tap(key); tap(key);
@ -187,7 +187,7 @@ void DynamicMacros::play(uint8_t macro_id) {
case MACRO_ACTION_STEP_TAP_CODE_SEQUENCE: { case MACRO_ACTION_STEP_TAP_CODE_SEQUENCE: {
while (true) { while (true) {
key.setFlags(0); key.setFlags(0);
key.setKeyCode(pgm_read_byte(pos++)); key.setKeyCode(Runtime.storage().read(pos++));
if (key.getKeyCode() == 0) if (key.getKeyCode() == 0)
break; break;
tap(key); tap(key);

Loading…
Cancel
Save