Skip to content

Commit

Permalink
revert sleep changes in main.c
Browse files Browse the repository at this point in the history
  • Loading branch information
laamaa committed May 4, 2021
1 parent d772315 commit 1c273f7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.o
*.exe
m8c
.vscode
font.c
build/
8 changes: 5 additions & 3 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ int main(int argc, char *argv[]) {
// read serial port
size_t bytes_read = sp_nonblocking_read(port, serial_buf, serial_read_size);
if (bytes_read < 0) {
SDL_LogCritical(SDL_LOG_CATEGORY_ERROR, "Error %zu reading serial. \n",
bytes_read);
SDL_LogCritical(SDL_LOG_CATEGORY_ERROR, "Error %d reading serial. \n",
(int)bytes_read);
run = 0;
}
if (bytes_read > 0) {
Expand All @@ -105,10 +105,12 @@ int main(int argc, char *argv[]) {
SDL_LogError(SDL_LOG_CATEGORY_ERROR, "SLIP error %d\n", n);
}
}
usleep(10);
} else {
render_screen();
usleep(100);
}
usleep(100);

}

// exit, clean up
Expand Down

0 comments on commit 1c273f7

Please sign in to comment.