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 e5e607c commit fa0c1f7Copy full SHA for fa0c1f7
src/BLDCMotor.cpp
@@ -138,7 +138,7 @@ int BLDCMotor::alignSensor() {
138
// set sensor to zero
139
sensor->initRelativeZero();
140
_delay(500);
141
- setPhaseVoltage(0,0);
+ setPhaseVoltage(0,angle);
142
_delay(200);
143
144
// find the index if available
src/MagneticSensorAnalog.cpp
@@ -70,8 +70,9 @@ float MagneticSensorAnalog::getVelocity(){
70
// set current angle as zero angle
71
// return the angle [rad] difference
72
float MagneticSensorAnalog::initRelativeZero(){
73
+
74
float angle_offset = -getAngle();
- zero_offset = getRawCount();
75
+ zero_offset = 0;
76
77
// angle tracking variables
78
full_rotation_offset = 0;
0 commit comments