diff --git a/include/motors_movement/drivecontroller.h b/include/motors_movement/drivecontroller.h index eff642d..d3793e2 100644 --- a/include/motors_movement/drivecontroller.h +++ b/include/motors_movement/drivecontroller.h @@ -18,6 +18,12 @@ #define UNLOCK_THRESH 800 +#define MAX_VEL 310 +#define MAX_VEL_EIGTH 248 +#define MAX_VEL_HALF 155 +#define MAX_VEL_3QUARTERS 232 +#define MAX_VEL_QUARTER 78 + class DriveController{ public: diff --git a/src/strategy_roles/striker.cpp b/src/strategy_roles/striker.cpp index d7f0f51..3f0d6f3 100644 --- a/src/strategy_roles/striker.cpp +++ b/src/strategy_roles/striker.cpp @@ -58,7 +58,7 @@ void Striker::striker() dir = dir + 360; //se sto nel quadrante negativo ricappotto else dir = dir; - drive->prepareDrive(dir, 100, 0); + drive->prepareDrive(dir, MAX_VEL_EIGTH, 0); } void Striker::storcimentoPorta() diff --git a/src/system/positions/positionsys_camera.cpp b/src/system/positions/positionsys_camera.cpp index 253cb6a..d4892fc 100644 --- a/src/system/positions/positionsys_camera.cpp +++ b/src/system/positions/positionsys_camera.cpp @@ -118,7 +118,7 @@ void PositionSysCamera::CameraPID(){ dir = (dir+360) % 360; int dist = sqrt(Outputx*Outputx + Outputy*Outputy); - int speed = map(dist*DIST_MULT, 0, MAX_DIST, 0, 350); + int speed = map(dist*DIST_MULT, 0, MAX_DIST, 0, MAX_VEL); drive->prepareDrive(dir, speed, 0);