Robot Drive?
This commit is contained in:
parent
8c9803a35b
commit
41aa90f7e2
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.metadata
|
@ -2354,3 +2354,73 @@ 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.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:287)
|
||||||
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
|
at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
|
||||||
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
||||||
|
|
||||||
|
!ENTRY org.eclipse.cdt.core 4 0 2016-01-28 14:01:55.714
|
||||||
|
!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.<init>(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.managedbuilder.internal.buildmodel.CommandBuilder.build(CommandBuilder.java:105)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.buildmodel.StepBuilder.build(StepBuilder.java:94)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.buildmodel.DescriptionBuilder$BuildStepVisitor.visit(DescriptionBuilder.java:92)
|
||||||
|
at org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager.doAccept(BuildDescriptionManager.java:151)
|
||||||
|
at org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager.doAccept(BuildDescriptionManager.java:159)
|
||||||
|
at org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager.doAccept(BuildDescriptionManager.java:133)
|
||||||
|
at org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager.accept(BuildDescriptionManager.java:127)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.buildmodel.DescriptionBuilder.build(DescriptionBuilder.java:160)
|
||||||
|
at org.eclipse.cdt.managedbuilder.core.InternalBuildRunner.invokeBuild(InternalBuildRunner.java:128)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:753)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:510)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:459)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
|
||||||
|
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)
|
||||||
|
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)
|
||||||
|
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:486)
|
||||||
|
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:405)
|
||||||
|
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)
|
||||||
|
|
||||||
|
!ENTRY org.eclipse.cdt.core 4 0 2016-01-28 14:06:33.761
|
||||||
|
!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.<init>(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.managedbuilder.internal.buildmodel.CommandBuilder.build(CommandBuilder.java:105)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.buildmodel.StepBuilder.build(StepBuilder.java:94)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.buildmodel.DescriptionBuilder$BuildStepVisitor.visit(DescriptionBuilder.java:92)
|
||||||
|
at org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager.doAccept(BuildDescriptionManager.java:151)
|
||||||
|
at org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager.doAccept(BuildDescriptionManager.java:159)
|
||||||
|
at org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager.doAccept(BuildDescriptionManager.java:133)
|
||||||
|
at org.eclipse.cdt.managedbuilder.buildmodel.BuildDescriptionManager.accept(BuildDescriptionManager.java:127)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.buildmodel.DescriptionBuilder.build(DescriptionBuilder.java:160)
|
||||||
|
at org.eclipse.cdt.managedbuilder.core.InternalBuildRunner.invokeBuild(InternalBuildRunner.java:128)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:753)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:510)
|
||||||
|
at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:459)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
|
||||||
|
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:205)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:245)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:300)
|
||||||
|
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:303)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:359)
|
||||||
|
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:382)
|
||||||
|
at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:486)
|
||||||
|
at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:405)
|
||||||
|
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)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
#Thu Jan 28 11:35:21 EST 2016
|
#Thu Jan 28 14:06:33 EST 2016
|
||||||
Debug/FRCUserProgram=1
|
Debug/FRCUserProgram=1
|
||||||
Debug/src/Robot.o=1
|
Debug/src/Robot.o=1
|
||||||
src/TankDrive.h=1
|
src/TankDrive.h=1
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
11:35:21 **** Incremental Build of configuration Debug for project DriveBase ****
|
14:06:33 **** Incremental Build of configuration Debug for project DriveBase ****
|
||||||
Info: Internal Builder is used for build
|
Info: Internal Builder is used for build
|
||||||
arm-frc-linux-gnueabi-g++ -std=c++1y "-IC:\\Users\\Jason/wpilib/cpp/current/include" "-ID:\\Dropbox\\Public\\FRC\\2016\\FRC2016\\DriveBase\\src" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Robot.o" "..\\src\\Robot.cpp"
|
arm-frc-linux-gnueabi-g++ -std=c++1y "-IC:\\Users\\Jason/wpilib/cpp/current/include" "-ID:\\Dropbox\\Public\\FRC\\2016\\FRC2016\\DriveBase\\src" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Robot.o" "..\\src\\Robot.cpp"
|
||||||
Cannot run program "arm-frc-linux-gnueabi-g++": Launching failed
|
Cannot run program "arm-frc-linux-gnueabi-g++": Launching failed
|
||||||
@ -7,5 +7,5 @@ Error: Program "arm-frc-linux-gnueabi-g++" not found in PATH
|
|||||||
PATH=[\usr\local\bin;C:/Program Files (x86)/Java/jre1.8.0_66/bin/client;C:/Program Files (x86)/Java/jre1.8.0_66/bin;C:/Program Files (x86)/Java/jre1.8.0_66/lib/i386;C:\Python27\;C:\Python34\;C:\Python34\Scripts;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Windows Live\Shared;C:\WINDOWS\system32]
|
PATH=[\usr\local\bin;C:/Program Files (x86)/Java/jre1.8.0_66/bin/client;C:/Program Files (x86)/Java/jre1.8.0_66/bin;C:/Program Files (x86)/Java/jre1.8.0_66/lib/i386;C:\Python27\;C:\Python34\;C:\Python34\Scripts;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Windows Live\Shared;C:\WINDOWS\system32]
|
||||||
|
|
||||||
|
|
||||||
11:35:21 Build Finished (took 38ms)
|
14:06:33 Build Finished (took 37ms)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
11:35:21 **** Incremental Build of configuration Debug for project DriveBase ****
|
14:06:33 **** Incremental Build of configuration Debug for project DriveBase ****
|
||||||
Info: Internal Builder is used for build
|
Info: Internal Builder is used for build
|
||||||
arm-frc-linux-gnueabi-g++ -std=c++1y "-IC:\\Users\\Jason/wpilib/cpp/current/include" "-ID:\\Dropbox\\Public\\FRC\\2016\\FRC2016\\DriveBase\\src" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Robot.o" "..\\src\\Robot.cpp"
|
arm-frc-linux-gnueabi-g++ -std=c++1y "-IC:\\Users\\Jason/wpilib/cpp/current/include" "-ID:\\Dropbox\\Public\\FRC\\2016\\FRC2016\\DriveBase\\src" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\Robot.o" "..\\src\\Robot.cpp"
|
||||||
Cannot run program "arm-frc-linux-gnueabi-g++": Launching failed
|
Cannot run program "arm-frc-linux-gnueabi-g++": Launching failed
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,7 @@
|
|||||||
*/
|
*/
|
||||||
class Robot : public SampleRobot {
|
class Robot : public SampleRobot {
|
||||||
CANTalon r1_drive, r2_drive, l1_drive, l2_drive;
|
CANTalon r1_drive, r2_drive, l1_drive, l2_drive;
|
||||||
|
TankDrive drive;
|
||||||
|
|
||||||
Joystick m_stick;
|
Joystick m_stick;
|
||||||
|
|
||||||
@ -22,6 +23,7 @@ public:
|
|||||||
r2_drive(1)), // interface to change the device number on the talons.
|
r2_drive(1)), // interface to change the device number on the talons.
|
||||||
l1_drive(2),
|
l1_drive(2),
|
||||||
l2_drive(3),
|
l2_drive(3),
|
||||||
|
drive(new CANTalon[] {&r1_drive,&r2_drive}, new CANTalon[] {&l1_drive, &l2_drive}),
|
||||||
m_stick(0)
|
m_stick(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -31,6 +33,7 @@ public:
|
|||||||
void OperatorControl() {
|
void OperatorControl() {
|
||||||
while (IsOperatorControl() && IsEnabled()) {
|
while (IsOperatorControl() && IsEnabled()) {
|
||||||
// Do Drive.
|
// Do Drive.
|
||||||
|
drive.Drive(&m_stick);
|
||||||
Wait(kUpdatePeriod); // Wait a bit so that the loop doesn't lock everything up.
|
Wait(kUpdatePeriod); // Wait a bit so that the loop doesn't lock everything up.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#endif // DEADZONE_RADIUS
|
#endif // DEADZONE_RADIUS
|
||||||
|
|
||||||
#include "WPILib.h"
|
#include "WPILib.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
class TankDrive {
|
class TankDrive {
|
||||||
|
|
||||||
@ -47,9 +48,15 @@ public:
|
|||||||
left = th * y;
|
left = th * y;
|
||||||
right = left;
|
right = left;
|
||||||
}
|
}
|
||||||
|
else if(x < 0)
|
||||||
|
{
|
||||||
|
right = th;
|
||||||
|
left = th * cos(x);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
right = th * cos(x);
|
||||||
|
left = th;
|
||||||
}
|
}
|
||||||
|
|
||||||
Left[0]->Set(left);
|
Left[0]->Set(left);
|
||||||
|
Reference in New Issue
Block a user