Browse Source

修改moveToEnd行为

master
zhaohe 8 months ago
parent
commit
6a1cbb0c87
  1. 4
      tmcdriver/tmc51x0/tmc51x0.cpp

4
tmcdriver/tmc51x0/tmc51x0.cpp

@ -32,7 +32,7 @@ static const uint8_t tmc5130_defaultRegisterAccess[TMC5130_REGISTER_COUNT] = {
#define TMC5160_GLOBAL_SCALER_MASK 0xFF
#define TMC5160_GLOBAL_SCALER_SHIFT 0
/***********************************************************************************************************************
* å·¥å·ï¿½? *
* å·¥å·ï¿?? *
***********************************************************************************************************************/
#define FIELD_SET(data, mask, shift, value) (data = (((data) & (~(mask))) | (((value) << (shift)) & (mask))))
@ -243,7 +243,7 @@ void TMC51X0::moveToEnd(int32_t direction, uint32_t velocityMax) {
// @WARNING:
// the motor will stop running(1000RPM) for about 10 minutes
// If you really need to use this feature, reset XACTUAL every 30s
setXACTUAL(0);
// setXACTUAL(0);
if (direction >= 0) {
writeInt(TMC5130_RAMPMODE, TMC5130_MODE_POSITION);
writeInt(TMC5130_VMAX, to_motor_vel(velocityMax));

Loading…
Cancel
Save