5#include "../foc_utils.h"
6#include "../time_utils.h"
71 virtual int driverAlign(
float align_voltage,
bool modulation_centered =
false);
float offset_ic
zero current C voltage value (center of the adc reading)
virtual int driverAlign(float align_voltage, bool modulation_centered=false)
PhaseCurrent_s readAverageCurrents(int N=100)
DriverType driver_type
driver type (BLDC or Stepper)
int pinC
pin C analog pin for current measurement
int alignBLDCDriver(float align_voltage, BLDCDriver *driver, bool modulation_centered)
FOCDriver * driver
driver link
int alignStepperDriver(float align_voltage, StepperDriver *driver, bool modulation_centered)
int alignHybridDriver(float align_voltage, BLDCDriver *driver, bool modulation_centered)
bool skip_align
variable signaling that the phase current direction should be verified during initFOC()
DQCurrent_s getDQCurrents(ABCurrent_s current, float angle_el)
virtual PhaseCurrent_s getPhaseCurrents()=0
int pinB
pin B analog pin for current measurement
int pinA
pin A analog pin for current measurement
virtual float getDCCurrent(float angle_el=0)
float offset_ib
zero current B voltage value (center of the adc reading)
void * params
pointer to hardware specific parameters of current sensing
ABCurrent_s getABCurrents(PhaseCurrent_s current)
float offset_ia
zero current A voltage value (center of the adc reading)
DQCurrent_s getFOCCurrents(float angle_el)
void linkDriver(FOCDriver *driver)