Change references to BLDCDriver to FOCDriver in current sense base class
change setPwm function in FOCDriver to accept 3 args, with a default value for the 3rd Change stepper driver classes to use 3 arg setPwm, ignoring 3rd arg. created InlineCurrentSenseSync class in lib/currentsense. fixed timer bug in calibrate encoder, in main defined a label for serialusb, to make it easier to swap out.
This commit is contained in:
@@ -86,7 +86,7 @@ int StepperDriver2PWM::init() {
|
||||
|
||||
|
||||
// Set voltage to the pwm pin
|
||||
void StepperDriver2PWM::setPwm(float Ua, float Ub) {
|
||||
void StepperDriver2PWM::setPwm(float Ua, float Ub, float Uc) {
|
||||
float duty_cycle1(0.0f),duty_cycle2(0.0f);
|
||||
// limit the voltage in driver
|
||||
Ua = _constrain(Ua, -voltage_limit, voltage_limit);
|
||||
@@ -104,4 +104,4 @@ void StepperDriver2PWM::setPwm(float Ua, float Ub) {
|
||||
|
||||
// write to hardware
|
||||
_writeDutyCycle2PWM(duty_cycle1, duty_cycle2, params);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user