add servo-emulation @ stepper motors

This commit is contained in:
Edward Emelianov
2021-11-17 00:08:02 +03:00
parent 4b50e95838
commit d0ecad3877
8 changed files with 119 additions and 81 deletions

View File

@@ -53,7 +53,7 @@ static errcodes buzzerparser(uint8_t par, int32_t *val){
static errcodes adcparser(uint8_t par, int32_t *val){
uint8_t n = PARBASE(par);
if(n > NUMBER_OF_ADC_CHANNELS) return ERR_BADPAR;
if(n > NUMBER_OF_ADC_CHANNELS-1) return ERR_BADPAR;
*val = (int32_t) getADCval(n);
return ERR_OK;
}