This commit is contained in:
bwisn 2021-11-13 23:11:45 +01:00
parent 78bd57f464
commit a2b7d34fda

View File

@ -1,18 +1,18 @@
/* Copyright 2021 OpenAnnePro community /* Copyright 2021 OpenAnnePro community
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or * the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version. * (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
@ -79,7 +79,7 @@ void annepro2LedMaskSetRow(uint8_t row) {
uint8_t payload[NUM_COLUMN * sizeof(annepro2Led_t) + 1]; uint8_t payload[NUM_COLUMN * sizeof(annepro2Led_t) + 1];
payload[0] = row; payload[0] = row;
memcpy(payload + 1, &ledMask[ROWCOL2IDX(row, 0)], sizeof(*ledMask) * NUM_COLUMN); memcpy(payload + 1, &ledMask[ROWCOL2IDX(row, 0)], sizeof(*ledMask) * NUM_COLUMN);
protoTx(CMD_LED_MASK_SET_KEY, payload, sizeof(payload), 1); protoTx(CMD_LED_MASK_SET_ROW, payload, sizeof(payload), 1);
} }
/* Synchronize all rows */ /* Synchronize all rows */