Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
gbr1 committed Feb 26, 2024
1 parent b424851 commit bdac052
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Arduino_AlvikCarrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ void Arduino_AlvikCarrier::updateKinematics(){
if (kinematics_movement==MOVEMENT_ROTATE){
rotate_pid->update(kinematics->getTheta());
drive(0, round(rotate_pid->getControlOutput()/10.0)*10);
if (abs(rotate_pid->getError())<ROTATE_THREASHOLD){
if (abs(rotate_pid->getError())<ROTATE_THRESHOLD){
kinematics_achieved=true;
disableKinematicsMovement();
drive(0,0);
Expand All @@ -704,7 +704,7 @@ void Arduino_AlvikCarrier::updateKinematics(){
if (kinematics_movement==MOVEMENT_MOVE){
move_pid->update((kinematics->getTravel()-previous_travel)*move_direction);
drive(round(move_pid->getControlOutput()/10.0)*10, 0);
if (abs(move_pid->getError())<MOVE_THREADSHOLD){
if (abs(move_pid->getError())<MOVE_THRESHOLD){
kinematics_achieved=true;
disableKinematicsMovement();
drive(0,0);
Expand Down
4 changes: 2 additions & 2 deletions src/definitions/robot_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ const float MOTOR_RATIO = MOTOR_CPR*MOTOR_GEAR_RATIO;
#define ROTATE_KD_DEFAULT 0.001
#define ROTATE_CONTROL_PERIOD 0.02
#define ROTATE_MAX_SPEED 45.0
#define ROTATE_THREASHOLD 1
#define ROTATE_THRESHOLD 1

#define MOVE_KP_DEFAULT 5.0
#define MOVE_KI_DEFAULT 0.0
#define MOVE_KD_DEFAULT 0.001
#define MOVE_CONTROL_PERIOD 0.02
#define MOVE_MAX_SPEED 45.0
#define MOVE_THREADSHOLD 3
#define MOVE_THRESHOLD 3

#define MOVEMENT_DISABLED 0
#define MOVEMENT_ROTATE 1
Expand Down

0 comments on commit bdac052

Please sign in to comment.