We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27189ec commit 79af273Copy full SHA for 79af273
src/motors/HybridStepperMotor/HybridStepperMotor.cpp
@@ -295,6 +295,10 @@ void HybridStepperMotor::loopFOC()
295
void HybridStepperMotor::move(float new_target)
296
{
297
298
+ // set internal target variable
299
+ if (_isset(new_target))
300
+ target = new_target;
301
+
302
// downsampling (optional)
303
if (motion_cnt++ < motion_downsample)
304
return;
@@ -315,9 +319,6 @@ void HybridStepperMotor::move(float new_target)
315
319
if (!enabled)
316
320
317
321
318
- // set internal target variable
- if (_isset(new_target))
- target = new_target;
322
323
// calculate the back-emf voltage if KV_rating available U_bemf = vel*(1/KV)
324
if (_isset(KV_rating))
0 commit comments