Skip to content

Commit 9d1ad54

Browse files
committed
bugfix
1 parent b3f463e commit 9d1ad54

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

BLDCMotor.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff 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

examples/encoder_example/encoder_example.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ void setup() {
2828
void 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
}

0 commit comments

Comments
 (0)