This commit is contained in:
2025-02-23 22:41:07 +03:00
parent a9974aab04
commit 4fcb5af94b
5 changed files with 117 additions and 71 deletions

View File

@@ -118,7 +118,7 @@ static void parse_encbuf(uint8_t databuf[ENC_DATALEN], struct timeval *tv){
// try to read 1 byte from encoder; return -1 if nothing to read or -2 if device seems to be disconnected
static int getencbyte(){
if(encfd < 0) return -1;
uint8_t byte;
uint8_t byte = 0;
fd_set rfds;
struct timeval tv;
do{