File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -81,11 +81,17 @@ class BLDCMotor
81
81
int pole_pairs;
82
82
83
83
// state variables
84
+ // current elelctrical angle
84
85
float elctric_angle;
85
- float shaft_velocity;
86
+ // current motor angle
86
87
float shaft_angle;
88
+ // current motor velocity
89
+ float shaft_velocity;
90
+ // current target velocity
87
91
float shaft_velocity_sp;
92
+ // current target angle
88
93
float shaft_angle_sp;
94
+ // current voltage u_q set
89
95
float voltage_q;
90
96
91
97
// Power supply woltage
Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ void setup() {
28
28
void loop () {
29
29
// display the angle and the angular velocity to the terminal
30
30
Serial.print (encoder.getAngle ());
31
- Serial.print (" \t " )
32
- Serial.ptntln (encoder.getVelocity ());
31
+ Serial.print (" \t " );
32
+ Serial.println (encoder.getVelocity ());
33
33
}
You can’t perform that action at this time.
0 commit comments