Firmware/FFBoard/UserExtensions/Src/TMC4671.cpp
/*
 * Sets a torque in positive or negative direction
 * For ADC linearity reasons under 25000 is recommended
 */
Sets a torque in positive or negative direction
For ADC linearity reasons under 25000 is recommended
Sets a torque in positive or negative direction For ADC linearity reasons under 25000 is recommended
void TMC4671::turn(int16_t power){
	if(!(this->motorReady() && active))
		return;
	int32_t flux = 0;
	flux = idleFlux-clip<int32_t,int16_t>(abs(power),0,maxOffsetFlux);
	if(feedforward){
		setFluxTorque(flux, power/2);
		setFluxTorqueFF(0, power/2);
	}else{
		setFluxTorque(flux, power);
	}
}
void TMC4671 :: turn ( int16_t power ) { if ( ! ( this -> motorReady ( ) && active ) ) return ; int32_t flux = 0 ; flux = idleFlux - clip < int32_t , int16_t > ( abs ( power ) , 0 , maxOffsetFlux ) ; if ( feedforward ) { setFluxTorque ( flux , power / 2 ) ; setFluxTorqueFF ( 0 , power / 2 ) ; } else { setFluxTorque ( flux , power ) ; } }
Sets a torque in positive or negative direction
 For ADC linearity reasons under 25000 is recommended
Sets a torque in positive or negative direction For ADC linearity reasons under 25000 is recommended
// Flux offset for field weakening //if(this->conf.motconf.motor_type == MotorType::STEPPER){ //}