Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
ability to skip cmd of write batch
Browse files Browse the repository at this point in the history
  • Loading branch information
vad7 committed Mar 2, 2023
1 parent 2f9d859 commit 3c96191
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nrf24batch.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ void display_remove_asterisk(char *fsp, uint8_t vx)
if(p2) { // remove '*' or '*n'
int pos = p2 - fsp;
if((pos -= vx) < 0) pos = 0;
memmove(screen_buf + pos, screen_buf + pos + (*(p2 + 1) == ':' ? 1 : 2), FONT_5x7_SCREEN_WIDTH + 1);
memmove(screen_buf + pos, screen_buf + pos + (*(p2 + 1) == ':' ? 1 : 2), FONT_5x7_SCREEN_WIDTH + 1 + 2);
}
}

Expand Down Expand Up @@ -1002,8 +1002,8 @@ static void render_callback(Canvas* const canvas, void* ctx) {
canvas_draw_line(canvas, n, y, n, y - 1);
}
}
strncpy(screen_buf, p + vx, FONT_5x7_SCREEN_WIDTH);
screen_buf[FONT_5x7_SCREEN_WIDTH] = '\0';
strncpy(screen_buf, p + vx, FONT_5x7_SCREEN_WIDTH + 2);
screen_buf[FONT_5x7_SCREEN_WIDTH + 2] = '\0';
display_remove_asterisk(p, vx);
canvas_draw_str(canvas, 6, y, screen_buf);
}
Expand Down

0 comments on commit 3c96191

Please sign in to comment.