commented thrash

This commit is contained in:
Edward Emelianov 2025-02-12 14:56:23 +03:00
parent c06c89003a
commit f656b64eec
2 changed files with 8 additions and 3 deletions

View File

@ -0,0 +1,5 @@
Check all code:
1) No "free" messages should be, only answers to requests!
2) gotozN should return "OK" or error, not "gotozN=0"!

View File

@ -329,8 +329,8 @@ static void chkstepper(int i){
// check DIAGN only for UART/SPI // check DIAGN only for UART/SPI
if(the_conf.motflags[i].drvtype == DRVTYPE_UART || the_conf.motflags[i].drvtype == DRVTYPE_SPI){ if(the_conf.motflags[i].drvtype == DRVTYPE_UART || the_conf.motflags[i].drvtype == DRVTYPE_SPI){
if(motdiagn(i) && state[i] != STP_ERR){ // error occured - DIAGN is low if(motdiagn(i) && state[i] != STP_ERR){ // error occured - DIAGN is low
DBG("Oldstate: "); USB_putbyte('0' + state[i]); newline(); //DBG("Oldstate: "); USB_putbyte('0' + state[i]); newline();
char Nm = '0'+i; /*char Nm = '0'+i;
USB_sendstr(STR_STATE); USB_putbyte(Nm); USB_sendstr("=6\n"); USB_sendstr(STR_STATE); USB_putbyte(Nm); USB_sendstr("=6\n");
switch(the_conf.motflags[i].drvtype){ switch(the_conf.motflags[i].drvtype){
case DRVTYPE_UART: case DRVTYPE_UART:
@ -346,7 +346,7 @@ static void chkstepper(int i){
break; break;
default: default:
break; break;
} }*/
emstopmotor(i); emstopmotor(i);
state[i] = STP_ERR; state[i] = STP_ERR;
return; return;