mirror of
https://github.com/synthetos/g2.git
synced 2026-02-06 11:11:57 +08:00
Minor cleanup with enable and step polarity
This commit is contained in:
@@ -1050,7 +1050,7 @@ stat_t st_set_sp(nvObj_t *nv) // set motor step polarity
|
||||
uint8_t motor = _get_motor(nv->index);
|
||||
if (motor > MOTORS) { return STAT_INPUT_VALUE_RANGE_ERROR; };
|
||||
|
||||
Motors[motor]->setStepPolarity((int)nv->value);
|
||||
Motors[motor]->setStepPolarity((ioMode)nv->value);
|
||||
return (STAT_OK);
|
||||
}
|
||||
|
||||
@@ -1148,7 +1148,7 @@ static const char fmt_0mi[] = "[%s%s] m%s microsteps%16d [1,2,4,8,16,32]\n";
|
||||
static const char fmt_0su[] = "[%s%s] m%s steps per unit %17.5f steps per%s\n";
|
||||
static const char fmt_0po[] = "[%s%s] m%s polarity%18d [0=normal,1=reverse]\n";
|
||||
static const char fmt_0ep[] = "[%s%s] m%s enable polarity%11d [0=active HIGH,1=active LOW]\n";
|
||||
static const char fmt_0ps[] = "[%s%s] m%s step polarity%13d [0=active HIGH,1=active LOW]\n";
|
||||
static const char fmt_0sp[] = "[%s%s] m%s step polarity%13d [0=active HIGH,1=active LOW]\n";
|
||||
static const char fmt_0pm[] = "[%s%s] m%s power management%10d [0=disabled,1=always on,2=in cycle,3=when moving]\n";
|
||||
static const char fmt_0pl[] = "[%s%s] m%s motor power level%13.3f [0.000=minimum, 1.000=maximum]\n";
|
||||
static const char fmt_pwr[] = "[%s%s] Motor %c power level:%12.3f\n";
|
||||
@@ -1188,7 +1188,7 @@ void st_print_mi(nvObj_t *nv) { _print_motor_int(nv, fmt_0mi);}
|
||||
void st_print_su(nvObj_t *nv) { _print_motor_flt_units(nv, fmt_0su, cm_get_units_mode(MODEL));}
|
||||
void st_print_po(nvObj_t *nv) { _print_motor_int(nv, fmt_0po);}
|
||||
void st_print_ep(nvObj_t *nv) { _print_motor_int(nv, fmt_0ep);}
|
||||
void st_print_ps(nvObj_t *nv) { _print_motor_int(nv, fmt_0ps);}
|
||||
void st_print_sp(nvObj_t *nv) { _print_motor_int(nv, fmt_0sp);}
|
||||
void st_print_pm(nvObj_t *nv) { _print_motor_int(nv, fmt_0pm);}
|
||||
void st_print_pl(nvObj_t *nv) { _print_motor_flt(nv, fmt_0pl);}
|
||||
void st_print_pwr(nvObj_t *nv){ _print_motor_pwr(nv, fmt_pwr);}
|
||||
|
||||
Reference in New Issue
Block a user