Skip to content

Commit 58fb7fb

Browse files
Fix bug: fix response to switch state get command by VIA
1 parent 9cc2103 commit 58fb7fb

File tree

1 file changed

+10
-4
lines changed
  • tmk_core/protocol/nrf

1 file changed

+10
-4
lines changed

tmk_core/protocol/nrf/via.c

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,20 @@ void bmp_via_receive_cb(uint8_t *data, uint8_t length) {
188188
for (uint8_t row = 0; row < config->matrix.rows;
189189
row++) {
190190
matrix_row_t value = matrix_get_row(row);
191+
191192
if (config->matrix.cols > 24) {
192193
command_data[i++] = (value >> 24) & 0xFF;
193-
} else if (config->matrix.cols > 16) {
194+
}
195+
196+
if (config->matrix.cols > 16) {
194197
command_data[i++] = (value >> 16) & 0xFF;
195-
} else if (config->matrix.cols > 8) {
198+
}
199+
200+
if (config->matrix.cols > 8) {
196201
command_data[i++] = (value >> 8) & 0xFF;
197-
} else
198-
command_data[i++] = value & 0xFF;
202+
}
203+
204+
command_data[i++] = value & 0xFF;
199205
}
200206
}
201207
break;

0 commit comments

Comments
 (0)