start fixing of this shit

This commit is contained in:
2024-08-15 16:50:06 +03:00
parent eaf137b5b6
commit 018f0d4b33
15 changed files with 140 additions and 130 deletions

View File

@@ -78,18 +78,19 @@ TRUE_INLINE void recalcARR(int i){
}
// update stepper's settings
void update_stepper(uint8_t i){
if(i >= MOTORSNO) return;
int update_stepper(uint8_t i){
if(i >= MOTORSNO) return FALSE;
accdecsteps[i] = (the_conf.maxspd[i] * the_conf.maxspd[i]) / the_conf.accel[i] / 2;
ustepsshift[i] = MSB(the_conf.microsteps[i]);
ESW_reaction[i] = the_conf.ESW_reaction[i];
switch(the_conf.motflags[i].drvtype){
case DRVTYPE_UART:
pdnuart_init(i);
return pdnuart_init(i);
break;
default:
break;
}
return TRUE;
}
// run this function after each steppers parameters changing