diff --git a/F0:F030,F042,F072/TSYS_controller/main.c b/F0:F030,F042,F072/TSYS_controller/main.c index 65296fd..1a007ad 100644 --- a/F0:F030,F042,F072/TSYS_controller/main.c +++ b/F0:F030,F042,F072/TSYS_controller/main.c @@ -133,7 +133,7 @@ int main(void){ #endif cmd_parser(txt, 0); } - if(lastTprint - Tms > 249){ // run `sendbuf` each 250ms + if(Tms - lastTprint > 249){ // run `sendbuf` each 250ms sendbuf(); } } diff --git a/F0:F030,F042,F072/TSYS_controller/proto.c b/F0:F030,F042,F072/TSYS_controller/proto.c index fdfb04c..eebffa6 100644 --- a/F0:F030,F042,F072/TSYS_controller/proto.c +++ b/F0:F030,F042,F072/TSYS_controller/proto.c @@ -77,9 +77,12 @@ void sendbuf(){ }else if(s != LINE_BUSY) break; #ifdef EBUG if(DMA1->ISR & DMA_ISR_TCIF2) USB_sendstr("DMA rdy\n"); - USB_sendstr(" sendbuf: line busy\n"); + USB_sendstr(" sendbuf(): line busy\n"); #endif } +#ifdef EBUG + USB_sendstr(" sent or not\n"); +#endif bptr = buff; blen = 0; lastTprint = Tms; @@ -90,6 +93,9 @@ void addtobuf(const char *txt){ IWDG->KR = IWDG_REFRESH; int l = strlen(txt); if(l > UARTBUFSZ){ +#ifdef EBUG + USB_sendstr("l>UARTBUFSZ -> sendbuf\n"); +#endif sendbuf(); // send prevoius data in buffer if(cmdsource == SRC_USB) USB_sendstr(txt); else for(int i = 0; i < WAITFOR; ++i){ @@ -106,6 +112,9 @@ void addtobuf(const char *txt){ } }else{ if(blen+l > UARTBUFSZ){ +#ifdef EBUG + USB_sendstr("blen+l>UARTBUFSZ -> sendbuf\n"); +#endif sendbuf(); } strcpy(bptr, txt); @@ -118,6 +127,9 @@ void addtobuf(const char *txt){ void bufputchar(char ch){ if(blen > UARTBUFSZ-1){ +#ifdef EBUG + USB_sendstr("bufputchar() -> sendbuf\n"); +#endif sendbuf(); } *bptr++ = ch; diff --git a/F0:F030,F042,F072/TSYS_controller/tsys01.bin b/F0:F030,F042,F072/TSYS_controller/tsys01.bin index b6c1242..9dea7b4 100755 Binary files a/F0:F030,F042,F072/TSYS_controller/tsys01.bin and b/F0:F030,F042,F072/TSYS_controller/tsys01.bin differ diff --git a/F0:F030,F042,F072/TSYS_controller/usart.h b/F0:F030,F042,F072/TSYS_controller/usart.h index 82de9cb..fdd840a 100644 --- a/F0:F030,F042,F072/TSYS_controller/usart.h +++ b/F0:F030,F042,F072/TSYS_controller/usart.h @@ -23,7 +23,7 @@ #define __USART_H__ // output buffers size -#define UARTBUFSZ (512) +#define UARTBUFSZ (1535) // input buffer size #define UARTINBUFSZ (64) // timeout between data bytes diff --git a/F0:F030,F042,F072/TSYS_controller/version.inc b/F0:F030,F042,F072/TSYS_controller/version.inc index a2db9fe..986b7c8 100644 --- a/F0:F030,F042,F072/TSYS_controller/version.inc +++ b/F0:F030,F042,F072/TSYS_controller/version.inc @@ -1,3 +1,3 @@ -#define BUILD_NUMBER "130" -#define BUILD_DATE "2023-09-29" -#define BUILDNO 130 +#define BUILD_NUMBER "139" +#define BUILD_DATE "2023-10-02" +#define BUILDNO 139