Skip to content

Commit a248ae0

Browse files
Merge pull request #186 from runger1101001/BLDCmotor_change
BLDCMotor: make setPhaseVoltage public
2 parents 7e65e51 + 8d110e3 commit a248ae0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/BLDCMotor.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,7 @@ class BLDCMotor: public FOCMotor
7070
float Ua, Ub, Uc;//!< Current phase voltages Ua,Ub and Uc set to motor
7171
float Ualpha, Ubeta; //!< Phase voltages U alpha and U beta used for inverse Park and Clarke transform
7272

73-
74-
private:
75-
// FOC methods
76-
/**
73+
/**
7774
* Method using FOC to set Uq to the motor at the optimal angle
7875
* Heart of the FOC algorithm
7976
*
@@ -82,6 +79,10 @@ class BLDCMotor: public FOCMotor
8279
* @param angle_el current electrical angle of the motor
8380
*/
8481
void setPhaseVoltage(float Uq, float Ud, float angle_el);
82+
83+
private:
84+
// FOC methods
85+
8586
/** Sensor alignment to electrical 0 angle of the motor */
8687
int alignSensor();
8788
/** Current sense and motor phase alignment */

0 commit comments

Comments
 (0)