From 8d110e3b7c998cba69350dbfe70f267c86ca9ced Mon Sep 17 00:00:00 2001 From: Richard Unger Date: Wed, 25 May 2022 23:49:48 +0200 Subject: [PATCH] make setPhaseVoltage public --- src/BLDCMotor.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/BLDCMotor.h b/src/BLDCMotor.h index 65bacb8d..4c87be67 100644 --- a/src/BLDCMotor.h +++ b/src/BLDCMotor.h @@ -70,10 +70,7 @@ class BLDCMotor: public FOCMotor float Ua, Ub, Uc;//!< Current phase voltages Ua,Ub and Uc set to motor float Ualpha, Ubeta; //!< Phase voltages U alpha and U beta used for inverse Park and Clarke transform - - private: - // FOC methods - /** + /** * Method using FOC to set Uq to the motor at the optimal angle * Heart of the FOC algorithm * @@ -82,6 +79,10 @@ class BLDCMotor: public FOCMotor * @param angle_el current electrical angle of the motor */ void setPhaseVoltage(float Uq, float Ud, float angle_el); + + private: + // FOC methods + /** Sensor alignment to electrical 0 angle of the motor */ int alignSensor(); /** Current sense and motor phase alignment */