mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-05-07 13:26:56 +03:00
fixed stupid bug
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user