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
8181 int pole_pairs;
8282
8383 // state variables
84+ // current elelctrical angle
8485 float elctric_angle;
85- float shaft_velocity;
86+ // current motor angle
8687 float shaft_angle;
88+ // current motor velocity
89+ float shaft_velocity;
90+ // current target velocity
8791 float shaft_velocity_sp;
92+ // current target angle
8893 float shaft_angle_sp;
94+ // current voltage u_q set
8995 float voltage_q;
9096
9197 // Power supply woltage
Original file line number Diff line number Diff line change @@ -28,6 +28,6 @@ void setup() {
2828void loop () {
2929 // display the angle and the angular velocity to the terminal
3030 Serial.print (encoder.getAngle ());
31- Serial.print (" \t " )
32- Serial.ptntln (encoder.getVelocity ());
31+ Serial.print (" \t " );
32+ Serial.println (encoder.getVelocity ());
3333}
You can’t perform that action at this time.
0 commit comments