fix programm

This commit is contained in:
2024-09-22 23:02:30 +03:00
parent 9b94fd12d6
commit 1564f38ff3
2 changed files with 10 additions and 6 deletions

View File

@ -65,7 +65,7 @@ void UART3_SaveProgram(uint8_t *dataPtr, uint8_t len) {
prog.header.countRepeat = dataPtr[2];
prog.header.options = dataPtr[3];
if (dataPtr[4] != 0xFF && dataPtr[5]) {
if (dataPtr[4] != 0xFF && dataPtr[5] != 0xFF) {
for (uint8_t i = 0; i < prog.header.shotCount; i++) {
uint8_t pos = 4 + i * sizeof(ProgramShot);
prog.shots[i].id = dataPtr[pos + 0];