experimenting with y axis
parent
f62bb9751f
commit
372e6ac02c
|
@ -55,7 +55,8 @@
|
||||||
#define SOUTH_CENTER 8
|
#define SOUTH_CENTER 8
|
||||||
#define SOUTH_EAST 9
|
#define SOUTH_EAST 9
|
||||||
|
|
||||||
#define CAMERA_CENTER 3
|
#define CAMERA_CENTER_X 3
|
||||||
|
#define CAMERA_CENTER_Y 1
|
||||||
|
|
||||||
class PositionSysZone : public PositionSystem{
|
class PositionSysZone : public PositionSystem{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -373,16 +373,15 @@ void PositionSysZone::testLogicZone(){
|
||||||
|
|
||||||
|
|
||||||
void PositionSysZone::goCenter() {
|
void PositionSysZone::goCenter() {
|
||||||
/* if((camera->true_yb + camera->true_yy) >= 3 && (camera->true_yb + camera->true_yy) <= -3) {
|
if((camera->true_yb + camera->true_yy) >= -CAMERA_CENTER_Y) drive->prepareDrive(180, 75, 0);
|
||||||
//dx o sx
|
else if ((camera->true_yb + camera->true_yy) <= CAMERA_CENTER_Y) drive->prepareDrive(0, 75, 0);
|
||||||
if((camera->true_yb + camera->true_yy) < 0) drive->prepareDrive(0, 200, 0);
|
|
||||||
else if ((camera->true_yb + camera->true_yy) > 0) drive->prepareDrive(270, 200, 0);
|
|
||||||
} */
|
|
||||||
|
|
||||||
if(camera->true_xb < -CAMERA_CENTER || camera->true_xy < -CAMERA_CENTER) drive->prepareDrive(90, 75, 0);
|
|
||||||
else if(camera->true_xb > CAMERA_CENTER || camera->true_xy > CAMERA_CENTER) drive->prepareDrive(270, 75, 0);
|
|
||||||
else drive->prepareDrive(0, 0, 0);
|
else drive->prepareDrive(0, 0, 0);
|
||||||
/* if (zoneIndex == 8)
|
/* if(camera->true_xb < -CAMERA_CENTER_X || camera->true_xy < -CAMERA_CENTER_X) drive->prepareDrive(90, 75, 0);
|
||||||
|
else if(camera->true_xb > CAMERA_CENTER_X || camera->true_xy > CAMERA_CENTER_X) drive->prepareDrive(270, 75, 0);
|
||||||
|
else drive->prepareDrive(0, 0, 0); */
|
||||||
|
/*
|
||||||
|
PREVIOUS
|
||||||
|
if (zoneIndex == 8)
|
||||||
drive->prepareDrive(330, GOCENTER_VEL);
|
drive->prepareDrive(330, GOCENTER_VEL);
|
||||||
if (zoneIndex == 7)
|
if (zoneIndex == 7)
|
||||||
drive->prepareDrive(0, GOCENTER_VEL);
|
drive->prepareDrive(0, GOCENTER_VEL);
|
||||||
|
|
Loading…
Reference in New Issue