From 27b2b418fce3217dcb8c4d97f6a97b953358841a Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 2 Feb 2016 09:39:51 -0500 Subject: [PATCH] Moved drive code back into the TankDrive class. --- .gitignore | 1 + .metadata/.log | 125 + .../.projects/DriveBase/.markers.snap | Bin 6429 -> 7954 bytes .../.projects/DriveBase/.syncinfo.snap | Bin 64 -> 112 bytes .../RemoteSystemsTempFiles/.markers.snap | Bin 64 -> 112 bytes .../RemoteSystemsTempFiles/.syncinfo.snap | Bin 64 -> 112 bytes .../.root/.markers.snap | Bin 656 -> 1296 bytes .../.safetable/org.eclipse.core.resources | Bin 2993 -> 4382 bytes .../org.eclipse.core.resources/2.snap | Bin 24043 -> 24595 bytes .../org.eclipse.e4.workbench/workbench.xmi | 3839 +++++++++-------- .metadata/version.ini | 2 +- DriveBase/src/Robot.cpp | 38 +- DriveBase/src/TankDrive.h | 38 +- 13 files changed, 2120 insertions(+), 1923 deletions(-) diff --git a/.gitignore b/.gitignore index 573b601..a2d6622 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .metadata DriveBase/.settings DriveBase/sysProps.xml +.metadata diff --git a/.metadata/.log b/.metadata/.log index ce9eb72..d185b11 100644 --- a/.metadata/.log +++ b/.metadata/.log @@ -2424,3 +2424,128 @@ java.io.IOException: Cannot run program "arm-frc-linux-gnueabi-g++": Launching f at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:287) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) +!SESSION 2016-02-02 09:26:52.353 ----------------------------------------------- +eclipse.buildId=4.5.1.M20150904-0015 +java.version=1.8.0_66 +java.vendor=Oracle Corporation +BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US +Framework arguments: -product org.eclipse.epp.package.cpp.product +Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.cpp.product + +!ENTRY org.eclipse.core.resources 2 10035 2016-02-02 09:26:58.155 +!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes. + +!ENTRY org.eclipse.cdt.core 4 0 2016-02-02 09:27:04.242 +!MESSAGE Error: Cannot run program "arm-frc-linux-gnueabi-gcc": Launching failed +!STACK 0 +java.io.IOException: Cannot run program "arm-frc-linux-gnueabi-gcc": Launching failed + at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:349) + at org.eclipse.cdt.utils.spawner.Spawner.(Spawner.java:91) + at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:91) + at org.eclipse.cdt.core.CommandLauncher.execute(CommandLauncher.java:194) + at org.eclipse.cdt.internal.core.BuildRunnerHelper.build(BuildRunnerHelper.java:263) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runProgramForLanguage(AbstractBuiltinSpecsDetector.java:759) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForLanguage(AbstractBuiltinSpecsDetector.java:689) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForEachLanguage(AbstractBuiltinSpecsDetector.java:562) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector$1.runInWorkspace(AbstractBuiltinSpecsDetector.java:496) + at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) + +!ENTRY org.eclipse.cdt.core 4 0 2016-02-02 09:27:04.336 +!MESSAGE Error: Cannot run program "arm-frc-linux-gnueabi-g++": Launching failed +!STACK 0 +java.io.IOException: Cannot run program "arm-frc-linux-gnueabi-g++": Launching failed + at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:349) + at org.eclipse.cdt.utils.spawner.Spawner.(Spawner.java:91) + at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:91) + at org.eclipse.cdt.core.CommandLauncher.execute(CommandLauncher.java:194) + at org.eclipse.cdt.internal.core.BuildRunnerHelper.build(BuildRunnerHelper.java:263) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runProgramForLanguage(AbstractBuiltinSpecsDetector.java:759) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForLanguage(AbstractBuiltinSpecsDetector.java:689) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForEachLanguage(AbstractBuiltinSpecsDetector.java:562) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector$1.runInWorkspace(AbstractBuiltinSpecsDetector.java:496) + at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) + +!ENTRY org.eclipse.cdt.core 4 0 2016-02-02 09:27:04.424 +!MESSAGE Error: Cannot run program "gcc": Launching failed +!STACK 0 +java.io.IOException: Cannot run program "gcc": Launching failed + at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:349) + at org.eclipse.cdt.utils.spawner.Spawner.(Spawner.java:91) + at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:91) + at org.eclipse.cdt.core.CommandLauncher.execute(CommandLauncher.java:194) + at org.eclipse.cdt.internal.core.BuildRunnerHelper.build(BuildRunnerHelper.java:263) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runProgramForLanguage(AbstractBuiltinSpecsDetector.java:759) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForLanguage(AbstractBuiltinSpecsDetector.java:689) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForEachLanguage(AbstractBuiltinSpecsDetector.java:562) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector$1.runInWorkspace(AbstractBuiltinSpecsDetector.java:496) + at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) + +!ENTRY org.eclipse.cdt.core 4 0 2016-02-02 09:27:04.465 +!MESSAGE Error: Cannot run program "g++": Launching failed +!STACK 0 +java.io.IOException: Cannot run program "g++": Launching failed + at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:349) + at org.eclipse.cdt.utils.spawner.Spawner.(Spawner.java:91) + at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:91) + at org.eclipse.cdt.core.CommandLauncher.execute(CommandLauncher.java:194) + at org.eclipse.cdt.internal.core.BuildRunnerHelper.build(BuildRunnerHelper.java:263) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runProgramForLanguage(AbstractBuiltinSpecsDetector.java:759) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForLanguage(AbstractBuiltinSpecsDetector.java:689) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForEachLanguage(AbstractBuiltinSpecsDetector.java:562) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector$1.runInWorkspace(AbstractBuiltinSpecsDetector.java:496) + at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) + +!ENTRY org.eclipse.cdt.core 4 0 2016-02-02 09:27:04.507 +!MESSAGE Error: Cannot run program "gcc": Launching failed +!STACK 0 +java.io.IOException: Cannot run program "gcc": Launching failed + at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:349) + at org.eclipse.cdt.utils.spawner.Spawner.(Spawner.java:91) + at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:91) + at org.eclipse.cdt.core.CommandLauncher.execute(CommandLauncher.java:194) + at org.eclipse.cdt.internal.core.BuildRunnerHelper.build(BuildRunnerHelper.java:263) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runProgramForLanguage(AbstractBuiltinSpecsDetector.java:759) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForLanguage(AbstractBuiltinSpecsDetector.java:689) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForEachLanguage(AbstractBuiltinSpecsDetector.java:562) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector$1.runInWorkspace(AbstractBuiltinSpecsDetector.java:496) + at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) + +!ENTRY org.eclipse.cdt.core 4 0 2016-02-02 09:27:04.583 +!MESSAGE Error: Cannot run program "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl": Launching failed +!STACK 0 +java.io.IOException: Cannot run program "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl": Launching failed + at org.eclipse.cdt.utils.spawner.Spawner.exec(Spawner.java:349) + at org.eclipse.cdt.utils.spawner.Spawner.(Spawner.java:91) + at org.eclipse.cdt.utils.spawner.ProcessFactory.exec(ProcessFactory.java:91) + at org.eclipse.cdt.core.CommandLauncher.execute(CommandLauncher.java:194) + at org.eclipse.cdt.internal.core.BuildRunnerHelper.build(BuildRunnerHelper.java:263) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runProgramForLanguage(AbstractBuiltinSpecsDetector.java:759) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForLanguage(AbstractBuiltinSpecsDetector.java:689) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.runForEachLanguage(AbstractBuiltinSpecsDetector.java:562) + at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector$1.runInWorkspace(AbstractBuiltinSpecsDetector.java:496) + at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) + +!ENTRY org.eclipse.egit.ui 2 0 2016-02-02 09:27:04.901 +!MESSAGE Warning: The environment variable HOME is not set. The following directory will be used to store the Git +user global configuration and to define the default location to store repositories: 'C:\Users\Jason'. If this is +not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and +EGit might behave differently since they see different configuration options. +This warning can be switched off on the Team > Git > Confirmations and Warnings preference page. + +!ENTRY edu.wpi.first.wpilib.plugins.core 1 0 2016-02-02 09:27:06.129 +!MESSAGE Installing tools if necessary + +!ENTRY edu.wpi.first.wpilib.plugins.core 1 0 2016-02-02 09:27:06.149 +!MESSAGE Installedtools + +!ENTRY edu.wpi.first.wpilib.plugins.core 1 0 2016-02-02 09:27:06.192 +!MESSAGE Installing cpp if necessary + +!ENTRY edu.wpi.first.wpilib.plugins.core 1 0 2016-02-02 09:27:06.225 +!MESSAGE Installedcpp diff --git a/.metadata/.plugins/org.eclipse.core.resources/.projects/DriveBase/.markers.snap b/.metadata/.plugins/org.eclipse.core.resources/.projects/DriveBase/.markers.snap index 3d25905aa3ce8d5341e16535162dc178d7cf51c5..5fcbf5eebf92efe7aaaadd38d12b46e3754f63ee 100644 GIT binary patch delta 126 zcmbPhG|6s*tmNdA5+M@>q#2iN)QMo^S(Iof$N&LLH&0-c1&atnMOI9nz&Lwy2y+fd znK)E%C0H<>Wep2Zuy^uJ373fitg;gNE=8GTsZNQ-srto5$@)S0N%C>WWMTCuG z-~m$1Q1(BD$%?TO;`3H`Km-_{0ckb}n_YTxK&+17E2vT!bqbFyi;_6sK-Gb4VS%#$ zgKQC(0Ls3Dh=8qOhp^dYuvx<>g4G&9uxA!!Z8`%r8e|Oz)X+SzHJXdESiV3-K)&IE Zu-V@+9EkY+S$PkGh*aR`p6cD@#{gX?Jm~-c delta 9 QcmbPyfbsQi#tpAy0T` - + activeSchemeId:org.eclipse.ui.defaultAcceleratorConfiguration ModelMigrationProcessor.001 - + @@ -12,9 +12,9 @@ topLevel shellMaximized - - - + + + persp.actionSet:org.eclipse.mylyn.doc.actionSet persp.actionSet:org.eclipse.mylyn.tasks.ui.navigation @@ -71,2499 +71,2622 @@ persp.viewSC:org.eclipse.mylyn.tasks.ui.views.tasks persp.newWizSC:org.eclipse.mylyn.tasks.ui.wizards.new.repository.task persp.actionSet:edu.wpi.first.wpilib.plugins.core.actionSet - - - - - - + + + + + + - - - - - - - + + + + + + + - - - - - + + + + + - - - - + + + + - + View categoryTag:Help - + View categoryTag:General activeOnClose - + ViewMenu menuContribution:menu - + - + View categoryTag:Help - - + + org.eclipse.e4.primaryDataStack EditorStack active - noFocus - - + + Editor org.eclipse.cdt.ui.editor.CEditor removeOnHide active - + menuContribution:popup popup:#CEditorContext popup:org.eclipse.cdt.ui.editor.CEditor.EditorContext popup:#AbstractTextEditorContext - + menuContribution:popup popup:#CEditorRulerContext popup:org.eclipse.cdt.ui.editor.CEditor.RulerContext popup:#AbstractTextEditorRulerContext - + + menuContribution:popup + popup:#OverviewRulerContext + + + menuContribution:popup + popup:#CEditorContext + popup:org.eclipse.cdt.ui.editor.CEditor.EditorContext + popup:#AbstractTextEditorContext + + + menuContribution:popup + popup:#CEditorRulerContext + popup:org.eclipse.cdt.ui.editor.CEditor.RulerContext + popup:#AbstractTextEditorRulerContext + + menuContribution:popup popup:#OverviewRulerContext - - + + Editor org.eclipse.cdt.ui.editor.CEditor removeOnHide - + menuContribution:popup popup:#CEditorContext popup:org.eclipse.cdt.ui.editor.CEditor.EditorContext popup:#AbstractTextEditorContext - + menuContribution:popup popup:#CEditorRulerContext popup:org.eclipse.cdt.ui.editor.CEditor.RulerContext popup:#AbstractTextEditorRulerContext - + + menuContribution:popup + popup:#OverviewRulerContext + + + menuContribution:popup + popup:#CEditorContext + popup:org.eclipse.cdt.ui.editor.CEditor.EditorContext + popup:#AbstractTextEditorContext + + + menuContribution:popup + popup:#CEditorRulerContext + popup:org.eclipse.cdt.ui.editor.CEditor.RulerContext + popup:#AbstractTextEditorRulerContext + + menuContribution:popup popup:#OverviewRulerContext - + View categoryTag:General - + ViewMenu menuContribution:menu - + menuContribution:popup popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu - + + menuContribution:popup + popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu + + - + View categoryTag:C/C++ - + View categoryTag:General - + View categoryTag:General - - + + View categoryTag:General - + ViewMenu menuContribution:menu - + menuContribution:popup popup:org.eclipse.ui.views.ProblemView popup:org.eclipse.ui.ide.MarkersView - + + menuContribution:popup + popup:org.eclipse.ui.views.ProblemView + popup:org.eclipse.ui.ide.MarkersView + + - + View categoryTag:General - + View categoryTag:General highlighted - + ViewMenu menuContribution:menu - + menuContribution:popup popup:org.eclipse.cdt.ui.CDTGlobalBuildConsole - + menuContribution:popup popup:org.eclipse.cdt.ui.CDTBuildConsole - + - + View categoryTag:General - + View categoryTag:General - + ViewMenu menuContribution:menu - + menuContribution:popup popup:#TranslationUnitOutlinerContext - + menuContribution:popup popup:#TranslationUnitOutlinerContext - + + menuContribution:popup + popup:#TranslationUnitOutlinerContext + + + menuContribution:popup + popup:#TranslationUnitOutlinerContext + + - + View categoryTag:Make - + View categoryTag:Mylyn - - + + toolbarSeparator - + - + Draggable - + Opaque - + Opaque - + Opaque - + Opaque - + Opaque - + Opaque - + Opaque - - + + Opaque - + Opaque - + Opaque - + Opaque - + Opaque - + Opaque - + Opaque - + toolbarSeparator - + - + Draggable - + Opaque - + Opaque - + Opaque - + Opaque - + + Opaque + + + Opaque + + + Opaque + + + Opaque + + + Opaque + + Opaque - + Draggable - + Opaque - + Opaque - + Opaque - + Opaque - + + Opaque + + + Opaque + + + Opaque + + + Opaque + + + Opaque + + Opaque - + Draggable - + Opaque - + Opaque - + Opaque - + Opaque - + + Opaque + + + Opaque + + + Opaque + + + Opaque + + + Opaque + + Opaque - + Draggable - + Opaque - + Opaque - + Opaque - + + Opaque + + + Opaque + + + Opaque + + + Opaque + + Opaque - + Draggable - + Opaque - + Opaque - + Opaque - + Opaque - + Opaque - + + Opaque + + + Opaque + + + Opaque + + + Opaque + + + Opaque + + + Opaque + + Opaque - + toolbarSeparator - + - + Draggable - + Opaque - + Opaque - + Opaque - + Opaque - + Opaque - - + + Opaque - + Opaque - + Opaque - + Draggable - + toolbarSeparator - + - + toolbarSeparator - + - + Draggable - + Opaque - + Opaque - + stretch SHOW_RESTORE_MENU - + Draggable HIDEABLE SHOW_RESTORE_MENU - - + + stretch - + Draggable - + Draggable - - + + TrimStack - + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - + + + - - + + - + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + - - - + + + - - - + + + - - + + - - - + + + - - - - - - - - - - + + + + + + + + + + - - - - + + + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - + + - - - - - - - - + + + + + + + + - - - - - - + + + + + + - - - - + + + + - - + + platform:win32 - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - + + - - - - - - + + + + + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Editor - + View categoryTag:C/C++ - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Make - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:C/C++ - + View categoryTag:General - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Debug - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Git - + View categoryTag:Help - + View categoryTag:Charts - + View categoryTag:Profiling - + View categoryTag:Profiling - + View categoryTag:Profiling - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Mylyn - + View categoryTag:Oomph - + View categoryTag:Connections - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:Remote Systems - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Team - + View categoryTag:Team - + View categoryTag:LTTng - + View categoryTag:LTTng - + View categoryTag:LTTng - + View categoryTag:LTTng - + View categoryTag:LTTng - + View categoryTag:LTTng - + View categoryTag:LTTng - + View categoryTag:Tracing - + View categoryTag:Tracing - + View categoryTag:Tracing - + View categoryTag:Tracing - + View categoryTag:Tracing - + View categoryTag:Tracing - + View categoryTag:Tracing - + View categoryTag:Tracing - + View categoryTag:Tracing - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Help - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:General - + View categoryTag:Ant - + View categoryTag:Debug - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java Browsing - + View categoryTag:Java - + View categoryTag:Java - + View categoryTag:Java - - - - + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + - - + + - - - - - + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - + + + - - - - + + + + - - + + - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.metadata/version.ini b/.metadata/version.ini index 2a10ac5..680e7e7 100644 --- a/.metadata/version.ini +++ b/.metadata/version.ini @@ -1,3 +1,3 @@ -#Thu Jan 28 11:18:13 EST 2016 +#Tue Feb 02 09:26:57 EST 2016 org.eclipse.core.runtime=2 org.eclipse.platform=4.5.1.v20150904-0015 diff --git a/DriveBase/src/Robot.cpp b/DriveBase/src/Robot.cpp index 1845216..8433803 100644 --- a/DriveBase/src/Robot.cpp +++ b/DriveBase/src/Robot.cpp @@ -14,8 +14,7 @@ class Robot : public IterativeRobot { CANTalon l2_drive; CANTalon shooter1; CANTalon shooter2; - RobotDrive drivetrain1; - RobotDrive drivetrain2; + TankDrive drive; Joystick rstick, lstick; @@ -31,21 +30,11 @@ public: l2_drive(4), shooter1(10), shooter2(11), - drivetrain1(l1_drive, r1_drive), - drivetrain2(l2_drive, r2_drive), + drive(&l1_drive, &l2_drive, &r1_drive, &r2_drive), rstick(0), lstick(1) { - printf("Initializing Robot..."); - printf("Initializing TankDrive"); - //drive = new TankDrive(&l1_drive, &l2_drive, &r1_drive, &r2_drive); - printf("Ready!"); - //l1_drive.SetInverted(true); - //l2_drive.SetInverted(true); - //l1_drive.Set(0, 0); - //l2_drive.Set(0, 0); - //r1_drive.Set(0, 1); - //r2_drive.Set(0, 1); + } void DisabledInit() @@ -60,7 +49,6 @@ public: void TeleopInit() { - printf("Starting Teleop mode"); r1_drive.Enable(); r2_drive.Enable(); l1_drive.Enable(); @@ -72,34 +60,16 @@ public: void TeleopPeriodic() { - printf("Teleop Periodic Start."); - float speed = lstick.GetY() * ((1.0 - (lstick.GetThrottle()))/2.0); - float rot = lstick.GetX(); - - drivetrain1.ArcadeDrive(speed, rot, false); - drivetrain2.ArcadeDrive(speed, rot, false); + drive.Drive(&lstick); float power = (1.0 - rstick.GetThrottle()) / 2.0; shooter1.Set(power); shooter2.Set(power); - printf("~Teleop Periodic End."); } - /** - * Runs the motor from the output of a Joystick. - * - void OperatorControl() { - while (IsOperatorControl() && IsEnabled()) { - // Do Drive. - std::cerr << "In Operator Control"; - drive->Drive(&m_stick); - Wait(kUpdatePeriod); // Wait a bit so that the loop doesn't lock everything up. - } - }*/ - //TankDrive *drive; }; START_ROBOT_CLASS(Robot) diff --git a/DriveBase/src/TankDrive.h b/DriveBase/src/TankDrive.h index 395a842..ee68790 100644 --- a/DriveBase/src/TankDrive.h +++ b/DriveBase/src/TankDrive.h @@ -13,17 +13,14 @@ #endif // DEADZONE_RADIUS #include "WPILib.h" -#include class TankDrive { public: TankDrive(CANTalon *l1, CANTalon *l2, CANTalon* r1, CANTalon *r2) { - this->l1 = l1; - this->l2 = l2; - this->r1 = r1; - this->r2 = r2; + dt1 = RobotDrive(l1, r1); + dt2 = RobotDrive(l2, r2); } virtual ~TankDrive() { delete l1; delete l2; delete r1; delete r2; } @@ -31,7 +28,7 @@ public: { float x = js->GetX(), y = js->GetY(), - th = js->GetThrottle(); + th = ((1.0 - (js.GetThrottle()))/2.0); // set deadzone if(x > -DEADZONE_RADIUS && x < DEADZONE_RADIUS) @@ -43,33 +40,14 @@ public: y = 0; } - float left=0, right=0; - - if(x == 0) - { - left = th * y; - right = left; - } - else if(x < 0) - { - right = th; - left = th * cos(x); - } - else - { - right = th * cos(x); - left = th; - } - - l1->Set(left); - l2->Set(left); - r1->Set(right); - r2->Set(right); + float speed = y * th; + float rot = y; + dt1.ArcadeDrive(speed, rot, false); + dt2.ArcadeDrive(speed, rot, false); } private: - - CANTalon *l1, *l2, *r1, *r2; + RobotDrive dt1, dt2; }; #endif /* SRC_TANKDRIVE_H_ */