mirror of
https://github.com/team2059/Dent
synced 2024-12-18 20:52:29 -05:00
added debugging
This commit is contained in:
parent
927f6c0b87
commit
0b3e6df1eb
@ -10,6 +10,7 @@ void Drive::Execute(){
|
||||
x = DentRobot::oi->GetLeftStick()->GetRawAxis(0);
|
||||
y = -DentRobot::oi->GetLeftStick()->GetRawAxis(1);
|
||||
z = DentRobot::oi->GetLeftStick()->GetRawAxis(2);
|
||||
printf("Driving: %f,%f,%f",x,y,z);
|
||||
DentRobot::drivetrain->DriveMecanum(x, y, z);
|
||||
}
|
||||
bool Drive::IsFinished(){
|
||||
|
2
Makefile
2
Makefile
@ -1,4 +1,4 @@
|
||||
REMOTEIP=10.20.59.2
|
||||
REMOTEIP=10.20.59.26
|
||||
CC=arm-frc-linux-gnueabi-g++
|
||||
CFLAGS=-std=c++11 -O0 -g3 -Wall -c -fmessage-length=0
|
||||
LDFLAGS=-Wl,-rpath,/opt/GenICam_v2_3/bin/Linux_armv7-a
|
||||
|
@ -13,6 +13,9 @@ void Drivetrain::InitDefaultCommand(){
|
||||
SetDefaultCommand(new Drive());
|
||||
}
|
||||
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));
|
||||
rightRear->Set(y+(x+z));
|
||||
leftFront->Set(-y+(x+z));
|
||||
|
Loading…
Reference in New Issue
Block a user