Skip to content

Commit

Permalink
Initialize Ualpha and Ubeta
Browse files Browse the repository at this point in the history
  • Loading branch information
Candas1 committed Oct 30, 2023
1 parent 655c099 commit bfa492c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/StepperMotor.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ class StepperMotor: public FOCMotor
*/
void move(float target = NOT_SET) override;

float Ualpha,Ubeta; //!< Phase voltages U alpha and U beta used for inverse Park and Clarke transform

/**
* Method using FOC to set Uq to the motor at the optimal angle
* Heart of the FOC algorithm
Expand Down
4 changes: 4 additions & 0 deletions src/common/base_classes/FOCMotor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ FOCMotor::FOCMotor()

// voltage bemf
voltage_bemf = 0;

// Initialize phase voltages U alpha and U beta used for inverse Park and Clarke transform
Ualpha = 0;
Ubeta = 0;

//monitor_port
monitor_port = nullptr;
Expand Down

0 comments on commit bfa492c

Please sign in to comment.