some bugs fixed, but found new (e.g. ADC always give 4095)

This commit is contained in:
Edward Emelianov
2023-02-21 23:01:43 +03:00
parent ab5f7bc87b
commit 1a8345d4f0
14 changed files with 161 additions and 70 deletions

View File

@@ -110,7 +110,7 @@ errcodes setmotpos(uint8_t i, int32_t position){
if(state[i] != STP_RELAX) return ERR_CANTRUN;
if(position > (int32_t)the_conf.maxsteps[i] || position < -(int32_t)the_conf.maxsteps[i])
return ERR_BADVAL; // too big position or zero
if(position == stppos[i]) return ERR_OK;
stppos[i] = position;
return ERR_OK;
}