From 0b3e6df1eba28da0a982b825d4735fa628e0da59 Mon Sep 17 00:00:00 2001 From: Adam Long Date: Wed, 18 May 2016 14:01:03 +0000 Subject: [PATCH] added debugging --- Commands/Drivetrain/Drive.cpp | 1 + Makefile | 2 +- Subsystems/Drivetrain.cpp | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Commands/Drivetrain/Drive.cpp b/Commands/Drivetrain/Drive.cpp index 98a48e0..a1752ec 100644 --- a/Commands/Drivetrain/Drive.cpp +++ b/Commands/Drivetrain/Drive.cpp @@ -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(){ diff --git a/Makefile b/Makefile index 8ff9eda..ae504f0 100644 --- a/Makefile +++ b/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 diff --git a/Subsystems/Drivetrain.cpp b/Subsystems/Drivetrain.cpp index 2968f7a..4b64c28 100644 --- a/Subsystems/Drivetrain.cpp +++ b/Subsystems/Drivetrain.cpp @@ -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));