Update Marlin_main.cpp
This commit is contained in:
parent
556b87edec
commit
a14d7545a5
|
|
@ -7553,16 +7553,15 @@ Sigma_Exit:
|
||||||
uint16_t res = tmc2130_get_res(i);
|
uint16_t res = tmc2130_get_res(i);
|
||||||
tmc2130_set_res(i, res_new);
|
tmc2130_set_res(i, res_new);
|
||||||
cs.axis_ustep_resolution[i] = res_new;
|
cs.axis_ustep_resolution[i] = res_new;
|
||||||
uint16_t fac;
|
|
||||||
if (res_new > res)
|
if (res_new > res)
|
||||||
{
|
{
|
||||||
fac = (res_new / res);
|
uint16_t fac = (res_new / res);
|
||||||
cs.axis_steps_per_unit[i] *= fac;
|
cs.axis_steps_per_unit[i] *= fac;
|
||||||
position[i] *= fac;
|
position[i] *= fac;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fac = (res / res_new);
|
uint16_t fac = (res / res_new);
|
||||||
cs.axis_steps_per_unit[i] /= fac;
|
cs.axis_steps_per_unit[i] /= fac;
|
||||||
position[i] /= fac;
|
position[i] /= fac;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue