2
0
mirror of https://github.com/team2059/Dent synced 2024-12-18 20:52:29 -05:00

added debugging

This commit is contained in:
Adam Long 2016-05-18 14:01:03 +00:00
parent 927f6c0b87
commit 0b3e6df1eb
3 changed files with 5 additions and 1 deletions

View File

@ -10,6 +10,7 @@ void Drive::Execute(){
x = DentRobot::oi->GetLeftStick()->GetRawAxis(0); x = DentRobot::oi->GetLeftStick()->GetRawAxis(0);
y = -DentRobot::oi->GetLeftStick()->GetRawAxis(1); y = -DentRobot::oi->GetLeftStick()->GetRawAxis(1);
z = DentRobot::oi->GetLeftStick()->GetRawAxis(2); z = DentRobot::oi->GetLeftStick()->GetRawAxis(2);
printf("Driving: %f,%f,%f",x,y,z);
DentRobot::drivetrain->DriveMecanum(x, y, z); DentRobot::drivetrain->DriveMecanum(x, y, z);
} }
bool Drive::IsFinished(){ bool Drive::IsFinished(){

View File

@ -1,4 +1,4 @@
REMOTEIP=10.20.59.2 REMOTEIP=10.20.59.26
CC=arm-frc-linux-gnueabi-g++ CC=arm-frc-linux-gnueabi-g++
CFLAGS=-std=c++11 -O0 -g3 -Wall -c -fmessage-length=0 CFLAGS=-std=c++11 -O0 -g3 -Wall -c -fmessage-length=0
LDFLAGS=-Wl,-rpath,/opt/GenICam_v2_3/bin/Linux_armv7-a LDFLAGS=-Wl,-rpath,/opt/GenICam_v2_3/bin/Linux_armv7-a

View File

@ -13,6 +13,9 @@ void Drivetrain::InitDefaultCommand(){
SetDefaultCommand(new Drive()); SetDefaultCommand(new Drive());
} }
void Drivetrain::DriveMecanum(double x, double y, double z){ void Drivetrain::DriveMecanum(double x, double y, double z){
printf("Driving: %f,%f,%f",x,y,z);
printf("Right: %f",(y+(x+z)));
printf("Left: %f",(-y+(x+z)));
rightFront->Set(y+(x+z)); rightFront->Set(y+(x+z));
rightRear->Set(y+(x+z)); rightRear->Set(y+(x+z));
leftFront->Set(-y+(x+z)); leftFront->Set(-y+(x+z));