Fixed a bug in LeftMotorAngular velocity calculation
This commit is contained in:
parent
6a03848435
commit
3a680f84c8
|
@ -68,7 +68,7 @@ void motors() {
|
||||||
if (balancingOn) {
|
if (balancingOn) {
|
||||||
|
|
||||||
//Calculate wheel angular velocity
|
//Calculate wheel angular velocity
|
||||||
motor_ang_vel[0][0] = encoderReaderAngVel(m1Raw, m1RawLast, motor_ang_vel[1][0], PULSES_PER_TURN, WHEEL_DIAMETER, dT_s, filter_gain);
|
motor_ang_vel[0][0] = encoderReaderAngVel(m1Raw, m1RawLast, motor_ang_vel[0][0], PULSES_PER_TURN, WHEEL_DIAMETER, dT_s, filter_gain);
|
||||||
motor_ang_vel[1][0] = encoderReaderAngVel(m2Raw, m2RawLast, motor_ang_vel[1][0], PULSES_PER_TURN, WHEEL_DIAMETER, dT_s, filter_gain);
|
motor_ang_vel[1][0] = encoderReaderAngVel(m2Raw, m2RawLast, motor_ang_vel[1][0], PULSES_PER_TURN, WHEEL_DIAMETER, dT_s, filter_gain);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue