fixed stupid bug

This commit is contained in:
2026-03-25 15:08:51 +03:00
parent 8e591d73bd
commit 0e9c7361b9
19 changed files with 583 additions and 306 deletions

View File

@@ -49,13 +49,11 @@ int main(void){
uint32_t SPIctr = Tms;
while(1){
IWDG->KR = IWDG_REFRESH;
int l = USB_receivestr(inbuff, 255);
if(l > 0){
parse_cmd(inbuff); // call it even for NULL (if `flood` is running)
if(Tms - SPIctr > CANONPROC_INTERVAL){ // not more than once per 10ms
SPIctr = Tms;
canon_proc();
}
if(Tms - SPIctr > CANONPROC_INTERVAL){ // not more than once per 10ms
SPIctr = Tms;
canon_proc();
}
int l = USB_receivestr(inbuff, 255);
if(l > 0) parse_cmd(inbuff); // call it even for NULL (if `flood` is running)
}
}