mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
Compare commits
96 Commits
jenkins-re
...
jenkins-re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
daee45780d | ||
|
|
8079482820 | ||
|
|
0b828eec62 | ||
|
|
49e06bd13b | ||
|
|
eca4d36a4b | ||
|
|
4d2a720f47 | ||
|
|
591e1de721 | ||
|
|
dc09233fca | ||
|
|
037d3b2fb5 | ||
|
|
a3995a202d | ||
|
|
a71f07ed67 | ||
|
|
cb81aa6fe9 | ||
|
|
ace43a6a12 | ||
|
|
a4e8d65b71 | ||
|
|
bfd88f1dab | ||
|
|
a65cb500fb | ||
|
|
f27df43b5b | ||
|
|
7e9f183cf9 | ||
|
|
2f26361398 | ||
|
|
52ecbd38ac | ||
|
|
6089722c4f | ||
|
|
244ecd23ee | ||
|
|
8aeacac302 | ||
|
|
45021c7f3d | ||
|
|
857a1abb01 | ||
|
|
c11f194cbf | ||
|
|
8b806e11e2 | ||
|
|
ba5111b994 | ||
|
|
88bf4ee567 | ||
|
|
76295a5746 | ||
|
|
90a106ccfb | ||
|
|
0fcef94904 | ||
|
|
3f38f3e84f | ||
|
|
64abdb8223 | ||
|
|
aaa7eabd03 | ||
|
|
1cef27134e | ||
|
|
aaab77cdbc | ||
|
|
7e2c68214d | ||
|
|
ad906da673 | ||
|
|
a6ea51ad02 | ||
|
|
d72ee199fe | ||
|
|
19b2d05236 | ||
|
|
26d789b89f | ||
|
|
f50b058457 | ||
|
|
39da9d67ba | ||
|
|
b6475d0503 | ||
|
|
295f212c8e | ||
|
|
fa4a39dcc6 | ||
|
|
66c653a21f | ||
|
|
340a3d492c | ||
|
|
6710ac3a2f | ||
|
|
9e62e60e6f | ||
|
|
e6c56e4446 | ||
|
|
35f1aded63 | ||
|
|
4904e1dc2c | ||
|
|
28b9c18e22 | ||
|
|
a548b14b7e | ||
|
|
323022acfd | ||
|
|
1bcdd301eb | ||
|
|
21f728c802 | ||
|
|
49d440eccc | ||
|
|
00486e2ec2 | ||
|
|
a3115dac19 | ||
|
|
1f35670a18 | ||
|
|
d1d81e5e19 | ||
|
|
a7b166e3fd | ||
|
|
6c28e09662 | ||
|
|
8199fb28d8 | ||
|
|
f2920fd77f | ||
|
|
ebd9667ba6 | ||
|
|
3f0f7931b8 | ||
|
|
cad83ed3ca | ||
|
|
62d6579428 | ||
|
|
1d7b17a2ba | ||
|
|
738859c4ea | ||
|
|
127ff0ac0a | ||
|
|
472f51fc73 | ||
|
|
0f0850ca95 | ||
|
|
ab27f795b7 | ||
|
|
b16a037759 | ||
|
|
1e812ac4d9 | ||
|
|
ecc6815f68 | ||
|
|
ca9f5a676d | ||
|
|
debf9e0ee9 | ||
|
|
15abbb36c2 | ||
|
|
d9b974300f | ||
|
|
e60baf41a9 | ||
|
|
09cb3a22cd | ||
|
|
27ecd35834 | ||
|
|
ff6d180305 | ||
|
|
410b739c23 | ||
|
|
2144b853d1 | ||
|
|
f87c517e6d | ||
|
|
77dac9bd77 | ||
|
|
56cf287b39 | ||
|
|
dc970d9a6b |
@@ -1,13 +1,17 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(All-WPILib)
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=2 -Wall -Wextra -Wno-unused-parameter -fPIC")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter -fPIC")
|
||||
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
|
||||
|
||||
file(GLOB_RECURSE NI_LIBS ni-libraries/*.so*)
|
||||
list(REMOVE_ITEM NI_LIBS ${CMAKE_CURRENT_SOURCE_DIR}/ni-libraries/libwpi.so ${CMAKE_CURRENT_SOURCE_DIR}/ni-libraries/libwpi_2015.so)
|
||||
SET(WPI_LD_LIBS ${CMAKE_CURRENT_SOURCE_DIR}/ni-libraries/libwpi.so ${CMAKE_CURRENT_SOURCE_DIR}/ni-libraries/libwpi_2015.so)
|
||||
get_filename_component(WPILIB_INCLUDES wpilibc/wpilibC++/include REALPATH)
|
||||
get_filename_component(HAL_API_INCLUDES hal/include REALPATH)
|
||||
get_filename_component(NWT_API_INCLUDES networktables/cpp/include REALPATH)
|
||||
file(GLOB_RECURSE COM_SRC_FILES wpilibc/wpilibC++/src/*.cpp)
|
||||
|
||||
add_subdirectory(hal)
|
||||
add_subdirectory(networktables/cpp)
|
||||
add_subdirectory(wpilibc)
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
INCLUDE(CMakeForceCompiler)
|
||||
set(ARM_PREFIX arm-none-linux-gnueabi)
|
||||
set(ARM_PREFIX arm-frc-linux-gnueabi)
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
CMAKE_FORCE_CXX_COMPILER(${ARM_PREFIX}-g++ GNU)
|
||||
CMAKE_FORCE_C_COMPILER(${ARM_PREFIX}-gcc GNU)
|
||||
set(CMAKE_CXX_FLAGS "-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -Wall -Wno-psabi" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "-std=c++1y -Wformat=2 -Wall -Wextra -Werror -pedantic -Wno-psabi" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g" CACHE STRING "" FORCE) # still want debugging for release?
|
||||
SET(CMAKE_FIND_ROOT_PATH $ENV{USER_HOME}/wpilib/toolchains/arm-none-linux-gnueabi-4.4.1/arm-none-linux-gnueabi/libc)
|
||||
|
||||
39
bootstrap.sh
39
bootstrap.sh
@@ -1,48 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Update the apt-get repository list
|
||||
apt --yes --force-yes install software-properties-common
|
||||
apt-add-repository --yes ppa:byteit101/frc-toolchain
|
||||
apt-get update
|
||||
|
||||
|
||||
# Download and install Java
|
||||
apt-get --yes --force-yes install default-jre
|
||||
apt-get --yes --force-yes install default-jdk
|
||||
apt-get --yes --force-yes install default-jre default-jdk maven python-pip python-setuptools g++-arm-frc-linux-gnueabi sshpass libc6-i386
|
||||
|
||||
|
||||
# Install Maven
|
||||
apt-get --yes --force-yes install maven
|
||||
|
||||
|
||||
# Install git-review
|
||||
apt-get --yes --force-yes install python-pip
|
||||
apt-get --yes --force-yes install python-setuptools
|
||||
easy_install pip
|
||||
yes | pip install git-review
|
||||
|
||||
|
||||
# Download and install the gcc linux arm-toolchains
|
||||
# Get the 32 bit c library
|
||||
apt-get --yes --force-yes install libc6-i386
|
||||
# Download the tool to unzip .zip files
|
||||
apt-get --yes --force-yes install unzip
|
||||
# The variables associated with the toolchains
|
||||
TOOL_VER="1.0.1"
|
||||
TOOL_DIR=~/../home/vagrant/wpilib/toolchains
|
||||
# Create the toolchains directory
|
||||
mkdir -p $TOOL_DIR
|
||||
# Download the toolchains to this directory
|
||||
wget -P ${TOOL_DIR}/ http://first.wpi.edu/FRC/c/maven/edu/wpi/first/wpilib/plugins/cpp/toolchains/linux/${TOOL_VER}/linux-${TOOL_VER}.zip
|
||||
# Unzip the file
|
||||
unzip -q ${TOOL_DIR}/linux-${TOOL_VER}.zip -d ${TOOL_DIR}/
|
||||
# Remove the unneeded zip file
|
||||
rm ${TOOL_DIR}/linux-${TOOL_VER}.zip
|
||||
# Change the name of the directory
|
||||
mv -f $TOOL_DIR/linux-${TOOL_VER} ${TOOL_DIR}/arm-none-linux-gnueabi-4.4.1
|
||||
chown -R vagrant $TOOL_DIR/arm-none-linux-gnueabi-4.4.1
|
||||
# Add the arm toolchains to the path variable
|
||||
echo 'PATH=$PATH:/home/vagrant/wpilib/toolchains/arm-none-linux-gnueabi-4.4.1/bin/' >> /home/vagrant/.bashrc
|
||||
|
||||
|
||||
# Install the jdk-linux-arm-vfp-sflt
|
||||
# Create the target directory for the jdk
|
||||
mkdir -p /home/vagrant/jdk-linux-arm-vfp-sflt/
|
||||
@@ -50,9 +20,6 @@ mkdir -p /home/vagrant/jdk-linux-arm-vfp-sflt/
|
||||
tar -xzf /vagrant/jdk-7u45-linux-arm-vfp-sflt.gz -C /home/vagrant/jdk-linux-arm-vfp-sflt/
|
||||
|
||||
|
||||
# Install sshpass for the test system
|
||||
apt-get --yes --force-yes install sshpass
|
||||
|
||||
# Keep this at the end of this file
|
||||
printf "\n\n"
|
||||
printf "Your virtual enviroment is now nearly set-up.\n"
|
||||
|
||||
@@ -22,7 +22,8 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.ui.navigator.resources;bundle-version="3.4.400",
|
||||
org.eclipse.ui.intro,
|
||||
org.eclipse.ui.intro.universal,
|
||||
org.eclipse.core.expressions;bundle-version="3.4.400"
|
||||
org.eclipse.core.expressions;bundle-version="3.4.400",
|
||||
org.eclipse.core.variables;bundle-version="3.2.700"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Export-Package: edu.wpi.first.wpilib.plugins.core,
|
||||
|
||||
@@ -83,5 +83,14 @@
|
||||
content="WPILib Intro/sample.xml">
|
||||
</configExtension>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.variables.valueVariables">
|
||||
<variable
|
||||
name="WPILIB"
|
||||
initialValue="${HOME}/wpilib"
|
||||
description="WPILib Path"
|
||||
>
|
||||
</variable>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
||||
@@ -105,6 +105,7 @@ public class WPILibCore extends AbstractUIPlugin {
|
||||
|
||||
public void saveGlobalProperties(Properties props) {
|
||||
try {
|
||||
props.setProperty("version", "current");
|
||||
props.store(new FileOutputStream(new File(WPILibCore.getDefault()
|
||||
.getWPILibBaseDir() + "/wpilib.properties")),
|
||||
"Don't add new properties, they will be deleted by the eclipse plugin.");
|
||||
@@ -133,7 +134,7 @@ public class WPILibCore extends AbstractUIPlugin {
|
||||
}
|
||||
|
||||
public String getDefaultVersion() {
|
||||
return "2013-test-0.4";
|
||||
return "0.2";
|
||||
}
|
||||
|
||||
public String getCurrentVersion() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package edu.wpi.first.wpilib.plugins.core.actions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.debug.core.DebugPlugin;
|
||||
@@ -33,13 +34,18 @@ public class RunOutlineViewerAction implements IWorkbenchWindowActionDelegate {
|
||||
* @see IWorkbenchWindowActionDelegate#run
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
String jarFile = WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools"+File.separator
|
||||
+WPILibCore.getDefault().getCurrentVersion()+File.separator+"OutlineViewer-with-dependencies.jar";
|
||||
String[] cmd = {"java", "-jar", jarFile};
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools");
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
@Override public boolean accept(File dir, String name) {
|
||||
return name.startsWith("OutlineViewer") && name.endsWith(".jar");
|
||||
}
|
||||
});
|
||||
if (files == null || files.length < 1) return;
|
||||
String[] cmd = {"java", "-jar", files[0].getAbsolutePath()};
|
||||
try {
|
||||
DebugPlugin.exec(cmd, new File(System.getProperty("user.home")));
|
||||
} catch (CoreException e) {
|
||||
WPILibCore.logError("Error running outline viewer.", e);
|
||||
WPILibCore.logError("Error running OutlineViewer.", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,14 +34,13 @@ public class RunRobotBuilderAction implements IWorkbenchWindowActionDelegate {
|
||||
* @see IWorkbenchWindowActionDelegate#run
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools"+File.separator
|
||||
+WPILibCore.getDefault().getCurrentVersion());
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools");
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
@Override public boolean accept(File dir, String name) {
|
||||
return name.startsWith("RobotBuilder") && name.endsWith(".jar");
|
||||
}
|
||||
});
|
||||
if (files.length < 1) return;
|
||||
if (files == null || files.length < 1) return;
|
||||
String[] cmd = {"java", "-jar", files[0].getAbsolutePath()};
|
||||
try {
|
||||
DebugPlugin.exec(cmd, new File(System.getProperty("user.home")));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package edu.wpi.first.wpilib.plugins.core.actions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.debug.core.DebugPlugin;
|
||||
@@ -33,13 +34,18 @@ public class RunSFXDashboardAction implements IWorkbenchWindowActionDelegate {
|
||||
* @see IWorkbenchWindowActionDelegate#run
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
String jarFile = WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools"+File.separator
|
||||
+WPILibCore.getDefault().getCurrentVersion()+File.separator+"sfx.jar";
|
||||
String[] cmd = {"java", "-jar", jarFile};
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools");
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
@Override public boolean accept(File dir, String name) {
|
||||
return name.startsWith("sfx") && name.endsWith(".jar");
|
||||
}
|
||||
});
|
||||
if (files == null || files.length < 1) return;
|
||||
String[] cmd = {"java", "-jar", files[0].getAbsolutePath()};
|
||||
try {
|
||||
DebugPlugin.exec(cmd, new File(System.getProperty("user.home")));
|
||||
} catch (CoreException e) {
|
||||
WPILibCore.logError("Error running SFXDashboard.", e);
|
||||
WPILibCore.logError("Error running SFX Dashboard.", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package edu.wpi.first.wpilib.plugins.core.actions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.debug.core.DebugPlugin;
|
||||
@@ -33,9 +34,14 @@ public class RunSmartDashboardAction implements IWorkbenchWindowActionDelegate {
|
||||
* @see IWorkbenchWindowActionDelegate#run
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
String jarFile = WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools"+File.separator
|
||||
+WPILibCore.getDefault().getCurrentVersion()+File.separator+"SmartDashboard.jar";
|
||||
String[] cmd = {"java", "-jar", jarFile};
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools");
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
@Override public boolean accept(File dir, String name) {
|
||||
return name.startsWith("SmartDashboard") && name.endsWith(".jar");
|
||||
}
|
||||
});
|
||||
if (files == null || files.length < 1) return;
|
||||
String[] cmd = {"java", "-jar", files[0].getAbsolutePath()};
|
||||
try {
|
||||
DebugPlugin.exec(cmd, new File(System.getProperty("user.home")));
|
||||
} catch (CoreException e) {
|
||||
|
||||
@@ -22,12 +22,12 @@ import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
|
||||
public abstract class AbstractInstaller {
|
||||
protected File installLocation;
|
||||
protected String version;
|
||||
protected String version, installedVersion;
|
||||
|
||||
public AbstractInstaller(String version) {
|
||||
this.installLocation = new File(WPILibCore.getDefault().getWPILibBaseDir()
|
||||
+ File.separator + getFeatureName() + File.separator + version);
|
||||
public AbstractInstaller(String version, String installedVersion, String path) {
|
||||
this.installLocation = new File(path);
|
||||
this.version = version;
|
||||
this.installedVersion = installedVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ public abstract class AbstractInstaller {
|
||||
WPILibCore.logInfo("Installing "+getFeatureName()+" if necessary");
|
||||
|
||||
if (!isInstalled()) {
|
||||
WPILibCore.logInfo("Install necessary");
|
||||
WPILibCore.logInfo("Install necessary for " + getFeatureName());
|
||||
try {
|
||||
install();
|
||||
} catch (InstallException e) {
|
||||
@@ -64,9 +64,9 @@ public abstract class AbstractInstaller {
|
||||
getErrorMessage(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
updateInstalledVersion(version);
|
||||
WPILibCore.logInfo("Installed");
|
||||
WPILibCore.logInfo("Installed" + getFeatureName());
|
||||
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public abstract class AbstractInstaller {
|
||||
* @return True for is there and newer, false otherwise.
|
||||
*/
|
||||
protected boolean isInstalled() {
|
||||
return installLocation.exists();
|
||||
return installLocation.exists() && !version.contains("DEVELOPMENT") && version.equals(installedVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,7 +138,7 @@ public abstract class AbstractInstaller {
|
||||
}
|
||||
|
||||
// Call 'unzip'
|
||||
final String[] cmd = {"unzip", tmpFile.getAbsolutePath(), "-d", installLocation.getAbsolutePath()};
|
||||
final String[] cmd = {"unzip" , "-o", tmpFile.getAbsolutePath(), "-d", installLocation.getAbsolutePath()};
|
||||
WPILibCore.logInfo("unzip "+tmpFile.getAbsolutePath()+" -d "+installLocation.getAbsolutePath());
|
||||
final Process unzipProcess = DebugPlugin.exec(cmd, installLocation);
|
||||
try (final InputStream is = unzipProcess.getInputStream()) {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package edu.wpi.first.wpilib.plugins.core.installer;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
@@ -11,7 +9,7 @@ import edu.wpi.first.wpilib.plugins.core.preferences.PreferenceConstants;
|
||||
public class ToolsInstaller extends AbstractInstaller {
|
||||
|
||||
public ToolsInstaller(String version) {
|
||||
super(version);
|
||||
super(version, WPILibCore.getDefault().getPreferenceStore().getString(PreferenceConstants.TOOLS_VERSION), WPILibCore.getDefault().getWPILibBaseDir() + "/tools");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -22,13 +20,8 @@ public class ToolsInstaller extends AbstractInstaller {
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCore.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_TOOLS_VERSION)) {
|
||||
WPILibCore.logInfo("Forcing library version to "+version);
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
props.setProperty("version", version);
|
||||
WPILibCore.getDefault().saveGlobalProperties(props);
|
||||
prefs.setValue(PreferenceConstants.TOOLS_VERSION, version);
|
||||
}
|
||||
prefs.setValue(PreferenceConstants.TOOLS_VERSION, version);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,8 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
|
||||
IPreferenceStore store = WPILibCore.getDefault().getPreferenceStore();
|
||||
store.setDefault(PreferenceConstants.TEAM_NUMBER,
|
||||
WPILibCore.getDefault().getProjectProperties(null).getProperty("team-number", "0"));
|
||||
store.setDefault(PreferenceConstants.TOOLS_VERSION, WPILibCore.getDefault().getDefaultVersion());
|
||||
store.setDefault(PreferenceConstants.UPDATE_TOOLS_VERSION, true);
|
||||
String val = store.getString(PreferenceConstants.TOOLS_VERSION);
|
||||
if (!store.contains(PreferenceConstants.TOOLS_VERSION) && val != null)
|
||||
store.setValue(PreferenceConstants.TOOLS_VERSION, "none");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ public class TeamNumberPage extends WizardPage {
|
||||
private void dialogChanged() {
|
||||
String teamNumber = getTeamNumber();
|
||||
if (listener != null) listener.stateChanged(null);
|
||||
if (!teamNumber.matches("^([0-9]+)$")) {
|
||||
updateStatus("Team number must be a valid integer.");
|
||||
if (!teamNumber.matches("^([1-9][0-9]*)$")) {
|
||||
updateStatus("Team number must be a valid integer without leading zeroes.");
|
||||
return;
|
||||
}
|
||||
updateStatus(null);
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
bin.includes = feature.xml
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.feature"
|
||||
label="Linux Toolchain for Robot C++ Development"
|
||||
version="0.2.0"
|
||||
provider-name="Worcester Polytechnic Institute"
|
||||
os="linux">
|
||||
|
||||
<description>
|
||||
The C++ toolchain to build Athena programs on Linux.
|
||||
</description>
|
||||
|
||||
<copyright>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
</copyright>
|
||||
|
||||
<license>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer. Redistributions in binary form must reproduce the
|
||||
* above copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution. Neither the name of the FIRST nor the
|
||||
* names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="edu.wpi.first.wpilib.plugins.cpp.feature" version="0.1.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.linux"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.feature</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
</project>
|
||||
@@ -1,12 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Linux
|
||||
Bundle-SymbolicName: edu.wpi.first.wpilib.plugins.cpp.toolchains.linux;singleton:=true
|
||||
Bundle-Version: 0.2.0
|
||||
Bundle-Activator: edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.Activator
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
edu.wpi.first.wpilib.plugins.core;bundle-version="0.1.0",
|
||||
edu.wpi.first.wpilib.plugins.cpp;bundle-version="0.1.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
@@ -1,8 +0,0 @@
|
||||
Making This Plugin Work
|
||||
=======================
|
||||
|
||||
This plugin needs a very big zip that contains the toolchain. This is
|
||||
currently hosted by Jenkins in the "Windows Toolchain Provider"
|
||||
project. This can also be created from the download from mentor
|
||||
embedded. The file should be resources/toolchain.zip and contains the
|
||||
5 main directories.
|
||||
@@ -1,7 +0,0 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
resources/,\
|
||||
plugin.xml
|
||||
src.includes = resources/
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.ui.startup">
|
||||
<startup
|
||||
class="edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.Activator">
|
||||
</startup>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.linux</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilib.plugins.cpp.toolchains</groupId>
|
||||
<artifactId>linux</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>zip</type>
|
||||
<destFileName>toolchain.zip</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
<outputDirectory>${project.build.outputDirectory}/resources</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,62 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.linux;
|
||||
|
||||
import org.eclipse.ui.IStartup;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin implements IStartup {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "edu.wpi.first.wpilib.plugins.cpp.toolchains.windows"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
private String getCurrentVersion() {
|
||||
return WPILibCPPPlugin.getDefault().getDefaultToolchainVersion();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void earlyStartup() {
|
||||
new ToolchainInstaller(getCurrentVersion()).installIfNecessary();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.linux;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
|
||||
public class ToolchainInstaller extends AbstractInstaller {
|
||||
|
||||
public ToolchainInstaller(String version) {
|
||||
super(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "toolchains";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION)) {
|
||||
System.out.println("Forcing library version to "+version);
|
||||
prefs.setValue(PreferenceConstants.TOOLCHAIN_VERSION, version);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getInstallResourceStream() {
|
||||
return ToolchainInstaller.class.getResourceAsStream("/resources/toolchain.zip");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
bin.includes = feature.xml
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.feature"
|
||||
label="Mac Toolchain for Robot C++ Development"
|
||||
version="0.2.0"
|
||||
provider-name="Worcester Polytechnic Institute"
|
||||
os="macosx">
|
||||
|
||||
<description>
|
||||
The C++ toolchain to build Athena programs on a Mac.
|
||||
</description>
|
||||
|
||||
<copyright>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
</copyright>
|
||||
|
||||
<license>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer. Redistributions in binary form must reproduce the
|
||||
* above copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution. Neither the name of the FIRST nor the
|
||||
* names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="edu.wpi.first.wpilib.plugins.cpp.feature" version="0.1.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.mac"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.feature</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
</project>
|
||||
@@ -1,12 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Windows
|
||||
Bundle-SymbolicName: edu.wpi.first.wpilib.plugins.cpp.toolchains.mac;singleton:=true
|
||||
Bundle-Version: 0.2.0
|
||||
Bundle-Activator: edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.Activator
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
edu.wpi.first.wpilib.plugins.core;bundle-version="0.1.0",
|
||||
edu.wpi.first.wpilib.plugins.cpp;bundle-version="0.1.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
@@ -1,8 +0,0 @@
|
||||
Making This Plugin Work
|
||||
=======================
|
||||
|
||||
This plugin needs a very big zip that contains the toolchain. This is
|
||||
currently hosted by Jenkins in the "Windows Toolchain Provider"
|
||||
project. This can also be created from the download from mentor
|
||||
embedded. The file should be resources/toolchain.zip and contains the
|
||||
5 main directories.
|
||||
@@ -1,7 +0,0 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
resources/,\
|
||||
plugin.xml
|
||||
src.includes = resources/
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.ui.startup">
|
||||
<startup
|
||||
class="edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.Activator">
|
||||
</startup>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.mac</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilib.plugins.cpp.toolchains</groupId>
|
||||
<artifactId>mac</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>zip</type>
|
||||
<destFileName>toolchain.zip</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
<outputDirectory>${project.build.outputDirectory}/resources</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,62 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.mac;
|
||||
|
||||
import org.eclipse.ui.IStartup;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin implements IStartup {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "edu.wpi.first.wpilib.plugins.cpp.toolchains.windows"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
private String getCurrentVersion() {
|
||||
return WPILibCPPPlugin.getDefault().getDefaultToolchainVersion();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void earlyStartup() {
|
||||
new ToolchainInstaller(getCurrentVersion()).installIfNecessary();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.mac;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
|
||||
public class ToolchainInstaller extends AbstractInstaller {
|
||||
|
||||
public ToolchainInstaller(String version) {
|
||||
super(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "toolchains";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION)) {
|
||||
System.out.println("Forcing library version to "+version);
|
||||
prefs.setValue(PreferenceConstants.TOOLCHAIN_VERSION, version);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getInstallResourceStream() {
|
||||
return ToolchainInstaller.class.getResourceAsStream("/resources/toolchain.zip");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
bin.includes = feature.xml
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature"
|
||||
label="Windows Toolchain for Robot C++ Development"
|
||||
version="0.2.0"
|
||||
provider-name="Worcester Polytechnic Institute"
|
||||
os="win32">
|
||||
|
||||
<description>
|
||||
The C++ toolchain to build Athena programs on Windows.
|
||||
</description>
|
||||
|
||||
<copyright>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
</copyright>
|
||||
|
||||
<license>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer. Redistributions in binary form must reproduce the
|
||||
* above copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution. Neither the name of the FIRST nor the
|
||||
* names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="edu.wpi.first.wpilib.plugins.cpp.feature" version="0.1.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
</project>
|
||||
@@ -1,12 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Windows
|
||||
Bundle-SymbolicName: edu.wpi.first.wpilib.plugins.cpp.toolchains.windows;singleton:=true
|
||||
Bundle-Version: 0.2.0
|
||||
Bundle-Activator: edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.Activator
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
edu.wpi.first.wpilib.plugins.core;bundle-version="0.1.0",
|
||||
edu.wpi.first.wpilib.plugins.cpp;bundle-version="0.1.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
@@ -1,8 +0,0 @@
|
||||
Making This Plugin Work
|
||||
=======================
|
||||
|
||||
This plugin needs a very big zip that contains the toolchain. This is
|
||||
currently hosted by Jenkins in the "Windows Toolchain Provider"
|
||||
project. This can also be created from the download from mentor
|
||||
embedded. The file should be resources/toolchain.zip and contains the
|
||||
5 main directories.
|
||||
@@ -1,7 +0,0 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
resources/,\
|
||||
plugin.xml
|
||||
src.includes = resources/
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.ui.startup">
|
||||
<startup
|
||||
class="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.Activator">
|
||||
</startup>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.windows</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilib.plugins.cpp.toolchains</groupId>
|
||||
<artifactId>windows</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>zip</type>
|
||||
<destFileName>toolchain.zip</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
<outputDirectory>${project.build.outputDirectory}/resources</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,62 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.windows;
|
||||
|
||||
import org.eclipse.ui.IStartup;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin implements IStartup {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "edu.wpi.first.wpilib.plugins.cpp.toolchains.windows"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
private String getCurrentVersion() {
|
||||
return WPILibCPPPlugin.getDefault().getDefaultToolchainVersion();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void earlyStartup() {
|
||||
new ToolchainInstaller(getCurrentVersion()).installIfNecessary();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.windows;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
|
||||
public class ToolchainInstaller extends AbstractInstaller {
|
||||
|
||||
public ToolchainInstaller(String version) {
|
||||
super(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "toolchains";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION)) {
|
||||
System.out.println("Forcing library version to "+version);
|
||||
prefs.setValue(PreferenceConstants.TOOLCHAIN_VERSION, version);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getInstallResourceStream() {
|
||||
return ToolchainInstaller.class.getResourceAsStream("/resources/toolchain.zip");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,7 +25,8 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.cdt.debug.ui;bundle-version="7.2.0",
|
||||
org.eclipse.cdt.launch;bundle-version="7.1.0",
|
||||
org.eclipse.cdt.launch.remote;bundle-version="2.4.0",
|
||||
org.eclipse.cdt.debug.mi.core;bundle-version="7.2.0"
|
||||
org.eclipse.cdt.debug.mi.core;bundle-version="7.2.0",
|
||||
org.eclipse.core.variables
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Export-Package: edu.wpi.first.wpilib.plugins.cpp,
|
||||
|
||||
@@ -173,15 +173,6 @@
|
||||
</enablement>
|
||||
</commonWizard>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.preferencePages">
|
||||
<page
|
||||
category="edu.wpi.first.wpilib.plugins.core.preferences.WPILibPreferencePage"
|
||||
class="edu.wpi.first.wpilib.plugins.cpp.preferences.CPPPreferencePage"
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.preferences.CPPPreferencePage"
|
||||
name="C++ Preferences">
|
||||
</page>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.runtime.preferences">
|
||||
<initializer
|
||||
|
||||
@@ -1,75 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318." name="/" resourcePath="">
|
||||
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.1222262887" name="Cross GCC" nonInternalBuilderId="cdt.managedbuild.builder.gnu.cross" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.513278893" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-none-linux-gnueabi-" valueType="string"/>
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.1104307" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" value="$toolchain/bin" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.801649698" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder autoBuildTarget="all" buildPath="${workspace_loc:/$project}/Debug" cleanBuildTarget="clean" errorParsers="" id="org.eclipse.cdt.build.core.internal.builder.2128327489" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
|
||||
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cross.c.compiler.432788947" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.154663678" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.516596133" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1224398283" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.379433867" name="Cross GCC" nonInternalBuilderId="cdt.managedbuild.builder.gnu.cross" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.541714056" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-frc-linux-gnueabi-" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.864368257" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder autoBuildTarget="all" buildPath="${workspace_loc:/$project}/Debug" cleanBuildTarget="clean" id="org.eclipse.cdt.build.core.internal.builder.1308552451" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1261239456" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.680635682" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.143320011" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1793678673" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.442358515" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.549514425" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1682909384" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1597382905" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/src""/>
|
||||
<listOptionValue builtIn="false" value=""$cpp-location/include""/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.963785380" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1505235107" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1204256582" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.969129918" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.394786621" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${WPILIB}/cpp/current/include""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.dialect.std.1060340803" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++1y" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1033680971" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1367166630" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1568604896" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.paths.1928585110" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""$cpp-location/lib""/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.362679811" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1895838080" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.libs.1363675797" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="wpi"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.1072058280" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="WPILibAthena"/>
|
||||
<listOptionValue builtIn="false" value="WPILib"/>
|
||||
<listOptionValue builtIn="false" value="HALAthena"/>
|
||||
<listOptionValue builtIn="false" value="NetworkTables"/>
|
||||
<listOptionValue builtIn="false" value="FRC_NetworkCommunication"/>
|
||||
<listOptionValue builtIn="false" value="i2c"/>
|
||||
<listOptionValue builtIn="false" value="ni_emb"/>
|
||||
<listOptionValue builtIn="false" value="NiFpgaLv"/>
|
||||
<listOptionValue builtIn="false" value="NiFpga"/>
|
||||
<listOptionValue builtIn="false" value="nirio_emb_can"/>
|
||||
<listOptionValue builtIn="false" value="NiRioSrv"/>
|
||||
<listOptionValue builtIn="false" value="ni_rtlog"/>
|
||||
<listOptionValue builtIn="false" value="RoboRIO_FRC_ChipObject"/>
|
||||
<listOptionValue builtIn="false" value="spi"/>
|
||||
<listOptionValue builtIn="false" value="visa"/>
|
||||
<listOptionValue builtIn="false" value="dl"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<option id="gnu.cpp.link.option.paths.1566479969" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${WPILIB}/cpp/current/lib""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.flags.1747959472" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-Wl,-rpath-link,$cpp-location/lib" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.other.1891020896" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-export-dynamic"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1757265359" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.132949138" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1584536431" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.tool.gnu.cross.assembler.184874228" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<option id="gnu.both.asm.option.include.paths.1131856974" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1900042568" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.412234585" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1047448065" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1542016468" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.300115601">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.300115601" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.300115601" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.300115601." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.2008160346" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.511797597" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-frc-linux-gnueabi-" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.2130959809" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/$project}/Release" id="cdt.managedbuild.builder.gnu.cross.1554116591" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.985086840" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.2030238370" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.188807954" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.884664323" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1342658383" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1371546365" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1242574722" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1782227077" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1397048702" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.716979188" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.126686576" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.886832650" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1915412749" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.671283127" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
@@ -80,79 +104,29 @@
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325" moduleId="org.eclipse.cdt.core.settings" name="Simulate">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.136041223" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.2033173825" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-none-linux-gnueabi-" valueType="string"/>
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.1246856819" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" value="$toolchain/bin" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.433467152" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/$project}/Release" id="cdt.managedbuild.builder.gnu.cross.716436070" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.2003820010" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1889430616" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1571598299" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1532409549" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.901599840" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.366961467" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.95433592" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.863062221" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.970059366" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.476884336" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.749590312" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1104120173" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1966871489" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.304828125" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318.2017904325">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318.2017904325" moduleId="org.eclipse.cdt.core.settings" name="Simulate">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318.2017904325" name="Simulate" parent="cdt.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318.2017904325." name="/" resourcePath="">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325" name="Simulate" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325." name="/" resourcePath="">
|
||||
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.base.1184188597" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1621111203" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
|
||||
<builder buildPath="${workspace_loc:/${ProjName}}/Simulate" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="cdt.managedbuild.target.gnu.builder.base.840272037" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.158466008" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cpp.compiler.base.2105416021" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.2105416021" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1645322059" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/src""/>
|
||||
<listOptionValue builtIn="false" value="$cpp-location/sim/include"/>
|
||||
<listOptionValue builtIn="false" value="${WPILIB}/cpp/current/sim/include"/>
|
||||
<listOptionValue builtIn="false" value="/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="/usr/include/gazebo-3.1"/>
|
||||
<listOptionValue builtIn="false" value="/usr/include/sdformat-2.0"/>
|
||||
@@ -161,13 +135,13 @@
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.937474733" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1758810658" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.base.2039239712" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.compiler.base.2039239712" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.base">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.2100353684" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1900634657" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1197133064" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.c.linker.base.66697269" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.base"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.tool.gnu.cpp.linker.base.2094820582" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.linker.base.2094820582" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.base">
|
||||
<option id="gnu.cpp.link.option.libs.1563598353" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="WPILib"/>
|
||||
<listOptionValue builtIn="false" value="WPILibSim"/>
|
||||
@@ -190,83 +164,40 @@
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.tool.gnu.assembler.base.2105089872" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.base.2105089872" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.254601899" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="$project.cdt.managedbuild.target.gnu.cross.exe.548740421" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
|
||||
<project id="$project.cdt.managedbuild.target.gnu.cross.exe.13534228" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.418253318;cdt.managedbuild.config.gnu.cross.exe.debug.418253318.;cdt.managedbuild.tool.gnu.cross.c.compiler.432788947;cdt.managedbuild.tool.gnu.c.compiler.input.1224398283">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.c"" command="arm-none-linux-gnueabi-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751;cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.;cdt.managedbuild.tool.gnu.cross.c.compiler.1261239456;cdt.managedbuild.tool.gnu.c.compiler.input.1793678673">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1534660163;cdt.managedbuild.config.gnu.cross.exe.release.1534660163.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.901599840;cdt.managedbuild.tool.gnu.cpp.compiler.input.863062221">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.cpp"" command="arm-none-linux-gnueabi-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.300115601;cdt.managedbuild.config.gnu.cross.exe.release.300115601.;cdt.managedbuild.tool.gnu.cross.c.compiler.985086840;cdt.managedbuild.tool.gnu.c.compiler.input.884664323">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.418253318;cdt.managedbuild.config.gnu.cross.exe.debug.418253318.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.442358515;cdt.managedbuild.tool.gnu.cpp.compiler.input.963785380">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.cpp"" command="arm-none-linux-gnueabi-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.300115601;cdt.managedbuild.config.gnu.cross.exe.release.300115601.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1342658383;cdt.managedbuild.tool.gnu.cpp.compiler.input.1782227077">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1534660163;cdt.managedbuild.config.gnu.cross.exe.release.1534660163.;cdt.managedbuild.tool.gnu.cross.c.compiler.2003820010;cdt.managedbuild.tool.gnu.c.compiler.input.1532409549">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.c"" command="arm-none-linux-gnueabi-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751;cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1505235107;cdt.managedbuild.tool.gnu.cpp.compiler.input.1033680971">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/$project"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/$project"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Simulate">
|
||||
|
||||
@@ -27,3 +27,6 @@ sim.exe=Simulate/${out}
|
||||
wpilib.sim=${wpilib}/sim
|
||||
sim.tools=${wpilib.sim}/tools
|
||||
sim.lib=${wpilib.sim}/lib
|
||||
|
||||
# Use the current C++ library by default
|
||||
cpp-version=current
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
#include "WPILib.h"
|
||||
|
||||
/**
|
||||
* This is a demo program showing the use of the RobotDrive class.
|
||||
* The SampleRobot class is the base of a robot application that will automatically call your
|
||||
* Autonomous and OperatorControl methods at the right time as controlled by the switches on
|
||||
* the driver station or the field controls.
|
||||
*
|
||||
* WARNING: While it may look like a good choice to use for your code if you're inexperienced,
|
||||
* don't. Unless you know what you are doing, complex code will be much more difficult under
|
||||
* this system. Use IterativeRobot or Command-Based instead if you're new.
|
||||
*/
|
||||
class Robot: public SampleRobot
|
||||
{
|
||||
RobotDrive myRobot; // robot drive system
|
||||
Joystick stick; // only joystick
|
||||
|
||||
public:
|
||||
Robot() :
|
||||
myRobot(0, 1), // initialize the RobotDrive to use motor controllers on ports 0 and 1
|
||||
stick(0)
|
||||
{
|
||||
myRobot.SetExpiration(0.1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the motors with arcade steering.
|
||||
*/
|
||||
void OperatorControl()
|
||||
{
|
||||
while (IsOperatorControl())
|
||||
{
|
||||
myRobot.ArcadeDrive(stick); // drive with arcade style (use right stick)
|
||||
Wait(0.005); // wait for a motor update time
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot);
|
||||
@@ -19,7 +19,7 @@ OI::OI() {
|
||||
SmartDashboard::PutData("Open Claw", new OpenClaw());
|
||||
SmartDashboard::PutData("Close Claw", new CloseClaw());
|
||||
|
||||
joy= new Joystick(1);
|
||||
joy= new Joystick(0);
|
||||
|
||||
|
||||
// Create some buttons
|
||||
|
||||
@@ -11,7 +11,7 @@ class Robot: public IterativeRobot
|
||||
public:
|
||||
Robot() :
|
||||
myRobot(0, 1), // these must be initialized in the same order
|
||||
stick(1), // as they are declared above.
|
||||
stick(0), // as they are declared above.
|
||||
lw(NULL),
|
||||
autoLoopCounter(0)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
#include "WPILib.h"
|
||||
|
||||
/**
|
||||
* This is a demo program showing how to use Mecanum control with the RobotDrive class.
|
||||
*/
|
||||
class Robot: public SampleRobot
|
||||
{
|
||||
|
||||
// Channels for the wheels
|
||||
const static int frontLeftChannel = 2;
|
||||
const static int rearLeftChannel = 3;
|
||||
const static int frontRightChannel = 1;
|
||||
const static int rearRightChannel = 0;
|
||||
|
||||
const static int joystickChannel = 0;
|
||||
|
||||
RobotDrive robotDrive; // robot drive system
|
||||
Joystick stick; // only joystick
|
||||
|
||||
public:
|
||||
Robot() :
|
||||
robotDrive(frontLeftChannel, rearLeftChannel,
|
||||
frontRightChannel, rearRightChannel), // these must be initialized in the same order
|
||||
stick(joystickChannel) // as they are declared above.
|
||||
{
|
||||
robotDrive.SetExpiration(0.1);
|
||||
robotDrive.SetInvertedMotor(RobotDrive::kFrontLeftMotor, true); // invert the left side motors
|
||||
robotDrive.SetInvertedMotor(RobotDrive::kRearLeftMotor, true); // you may need to change or remove this to match your robot
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the motors with Mecanum drive.
|
||||
*/
|
||||
void OperatorControl()
|
||||
{
|
||||
robotDrive.SetSafetyEnabled(false);
|
||||
while (IsOperatorControl())
|
||||
{
|
||||
// Use the joystick X axis for lateral movement, Y axis for forward movement, and Z axis for rotation.
|
||||
// This sample does not use field-oriented drive, so the gyro input is set to zero.
|
||||
robotDrive.MecanumDrive_Cartesian(stick.GetX(), stick.GetY(), stick.GetZ());
|
||||
|
||||
Wait(0.005); // wait 5ms to avoid hogging CPU cycles
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot);
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "Commands/SetCollectionSpeed.h"
|
||||
|
||||
OI::OI() {
|
||||
joystick = new Joystick(1);
|
||||
joystick = new Joystick(0);
|
||||
|
||||
R1 = new JoystickButton(joystick, 12);
|
||||
R1->WhenPressed(new LowGoal());
|
||||
|
||||
@@ -15,31 +15,131 @@
|
||||
<name>Simulation</name>
|
||||
<description>Examples that can be run in simulation.</description>
|
||||
</tagDescription>-->
|
||||
|
||||
<tagDescription>
|
||||
<name>Getting Started with C++</name>
|
||||
<description>Examples for getting started with FRC C++</description>
|
||||
</tagDescription>
|
||||
<example>
|
||||
<name>Getting Started</name>
|
||||
<description>An example program which demonstrates the simplest autonomous and
|
||||
teleoperated routines.</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GettingStarted/src/Robot.cpp"
|
||||
destination="src/Robot.cpp"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
|
||||
<tagDescription>
|
||||
<name>CommandBased Robot</name>
|
||||
<description>Examples for CommandBased robot programs.</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Actuators</name>
|
||||
<description>Example programs that demonstrate the use of various actuators</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Analog</name>
|
||||
<description>Examples programs that show different uses of analog inputs,
|
||||
outputs and various analog sensors</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>CAN</name>
|
||||
<description>Example programs that demonstrate the use of the CAN components in the control system</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Complete List</name>
|
||||
<description>Complete list of all sample programs across all categories</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Digital</name>
|
||||
<description>Example programs that demonstrate the sensors that use the digital I/O ports</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>I2C</name>
|
||||
<description>Example programs that demonstrate the use of I2C and various sensors that use it</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Joystick</name>
|
||||
<description>Example programs that demonstate different uses of joysticks for robot driving</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Pneumatics</name>
|
||||
<description>Example programs that demonstrate the use of the compressor and solenoids</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Robot and Motor</name>
|
||||
<description>Example programs that demonstrate driving a robot and motors including safety, servos, etc.</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>SPI</name>
|
||||
<description>Example programs that demonstrate the use of the SPI bus and sensors that connect to it</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Safety</name>
|
||||
<description>Example programs that demonstate the motor safety classes and how to use them with your programs</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Sensors</name>
|
||||
<description>Example programs that demonstrate the use of the various commonly used sensors on FRC robots</description>
|
||||
</tagDescription>
|
||||
|
||||
<example>
|
||||
<name>Arcade Drive</name>
|
||||
<description>An example program which the use of Arcade Drive with the RobotDrive class</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/ArcadeDrive/src/Robot.cpp" destination="src/Robot.cpp"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
|
||||
<example>
|
||||
<name>Mecanum Drive</name>
|
||||
<description>An example program which the use of Mecanum Drive with the RobotDrive class</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MecanumDrive/src/Robot.cpp" destination="src/Robot.cpp"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
|
||||
<example>
|
||||
<name>Getting Started</name>
|
||||
<description>An example program which demonstrates the simplest autonomous and
|
||||
teleoperated routines.</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GettingStarted/src/Robot.cpp"
|
||||
destination="src/Robot.cpp"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<name>GearsBot</name>
|
||||
<description>A fully functional example CommandBased program for
|
||||
@@ -47,6 +147,7 @@
|
||||
supports simulation.</description>
|
||||
<tags>
|
||||
<tag>CommandBased Robot</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
@@ -130,7 +231,8 @@
|
||||
<description>A fully functional example CommandBased program for FRC Team 190's 2014 robot. This code can run on your computer if it supports simulation.</description>
|
||||
<tags>
|
||||
<tag>CommandBased Robot</tag>
|
||||
</tags>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
<package>src/Commands</package>
|
||||
|
||||
@@ -18,7 +18,7 @@ class Robot: public SampleRobot
|
||||
public:
|
||||
Robot() :
|
||||
myRobot(0, 1), // these must be initialized in the same order
|
||||
stick(1) // as they are declared above.
|
||||
stick(0) // as they are declared above.
|
||||
{
|
||||
myRobot.SetExpiration(0.1);
|
||||
}
|
||||
|
||||
@@ -58,15 +58,6 @@ public class WPILibCPPPlugin extends AbstractUIPlugin implements IStartup {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public String getDefaultToolchainVersion() {
|
||||
return "arm-none-linux-gnueabi-4.4.1";
|
||||
}
|
||||
|
||||
public String getToolchain() {
|
||||
return WPILibCore.getDefault().getWPILibBaseDir()
|
||||
+ File.separator + "toolchains" + File.separator + getPreferenceStore().getString(PreferenceConstants.TOOLCHAIN_VERSION);
|
||||
}
|
||||
|
||||
public String getCurrentVersion() {
|
||||
try {
|
||||
Properties props = new AntPropertiesParser(WPILibCPPPlugin.class.getResourceAsStream("/resources/configuration.properties")).getProperties();
|
||||
@@ -82,7 +73,7 @@ public class WPILibCPPPlugin extends AbstractUIPlugin implements IStartup {
|
||||
|
||||
public String getCPPDir() {
|
||||
return WPILibCore.getDefault().getWPILibBaseDir()
|
||||
+ File.separator + "cpp" + File.separator + getPreferenceStore().getString(PreferenceConstants.LIBRARY_VERSION);
|
||||
+ File.separator + "cpp" + File.separator + "current";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.installer;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.variables.IStringVariableManager;
|
||||
import org.eclipse.core.variables.IValueVariable;
|
||||
import org.eclipse.core.variables.VariablesPlugin;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
@@ -19,28 +20,43 @@ import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
public class CPPInstaller extends AbstractInstaller {
|
||||
|
||||
public CPPInstaller(String version) {
|
||||
super(version);
|
||||
super(version,
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.LIBRARY_INSTALLED), WPILibCPPPlugin.getDefault().getCPPDir());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "cpp";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_LIBRARY_VERSION)) {
|
||||
WPILibCPPPlugin.logInfo("Forcing library version to "+version);
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
props.setProperty("cpp-version", version);
|
||||
WPILibCore.getDefault().saveGlobalProperties(props);
|
||||
prefs.setValue(PreferenceConstants.LIBRARY_VERSION, version);
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.LIBRARY_INSTALLED,
|
||||
version);
|
||||
|
||||
IStringVariableManager vm = VariablesPlugin.getDefault().getStringVariableManager();
|
||||
try
|
||||
{
|
||||
if (System.getProperty("os.name").startsWith("Windows"))
|
||||
{
|
||||
IValueVariable vv = vm.getValueVariable("HOME");
|
||||
if (vv == null)
|
||||
vm.addVariables(new IValueVariable[]{vm.newValueVariable("HOME", "user.home directory", false,System.getProperty("user.home"))});
|
||||
else
|
||||
{
|
||||
if (!System.getProperty("user.home").equals(vm.performStringSubstitution("${HOME}")))
|
||||
vv.setValue(System.getProperty("user.home"));
|
||||
}
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected InputStream getInstallResourceStream() {
|
||||
return CPPInstaller.class.getResourceAsStream("/resources/cpp.zip");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName()
|
||||
{
|
||||
return "cpp";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,12 +120,7 @@ public class DeployLaunchShortcut implements ILaunchShortcut
|
||||
ILaunchConfigurationWorkingCopy config;
|
||||
try {
|
||||
config = getRemoteDebugConfig(activeProj);
|
||||
//config.doSave(); // NOTE: For debugging
|
||||
//org.eclipse.debug.core.DebugPlugin.getDefault().getLaunchManager().addLaunch(config.launch(mode, null));
|
||||
//THIS IS MADDENING! we want to add to the recent history, but I can't seem to find a public api to do so, so lets just launch the config dialog
|
||||
//DebugUITools.openLaunchConfigurationPropertiesDialog(shell, config, "org.eclipse.cdt.launch.launchGroup");
|
||||
//config.launch(mode, new NullProgressMonitor(), false, true);
|
||||
DebugUITools.launch(config, mode);
|
||||
DebugUITools.launch(config.doSave(), mode);
|
||||
} catch (CoreException e) {
|
||||
WPILibCPPPlugin.logError("Debug attach failed.", e);
|
||||
}
|
||||
@@ -149,32 +144,27 @@ public class DeployLaunchShortcut implements ILaunchShortcut
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, false);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, "org.eclipse.rse.remotecdt.RemoteGDBDebugger");
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_REGISTER_GROUPS, "");
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "run");
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, true);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, "main");
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "remote");
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, true);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, activeProj.getName());
|
||||
Collection<Executable> exes = ExecutablesManager.getExecutablesManager().getExecutablesForProject(activeProj);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_NAME,
|
||||
exes.size() > 0 ? exes.toArray(new Executable[0])[0].getPath().makeRelativeTo(activeProj.getLocation()).toString():
|
||||
"Debug/FRCUserProgram");
|
||||
|
||||
|
||||
|
||||
config.setAttribute("org.eclipse.cdt.dsf.gdb.DEBUG_NAME", "arm-frc-linux-gnueabi-gdb");
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_PATH, "/home/admin/FRCUserProgram");
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION, remote_connection);
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET, false);
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, "2345");
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND, "gdbserver");
|
||||
|
||||
config.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, WPILibCPPPlugin.getDefault().getToolchain() + "/bin/arm-none-linux-gnueabi-gdb");
|
||||
List<String> solibs = new ArrayList<>();
|
||||
solibs.add(WPILibCPPPlugin.getDefault().getToolchain() + "/arm-non-linux-gnueabi/libc/lib");
|
||||
solibs.add(WPILibCPPPlugin.getDefault().getToolchain() + "/arm-non-linux-gnueabi/libc/usr/lib");
|
||||
solibs.add(WPILibCPPPlugin.getDefault().getCPPDir() + "/lib");
|
||||
config.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, solibs);
|
||||
config.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, true);
|
||||
config.setAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, false);
|
||||
config.doSave();
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.preferences;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
import edu.wpi.first.wpilib.plugins.core.preferences.ComboFieldEditor;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
|
||||
/**
|
||||
* This class represents a preference page that
|
||||
* is contributed to the Preferences dialog. By
|
||||
* subclassing <samp>FieldEditorPreferencePage</samp>, we
|
||||
* can use the field support built into JFace that allows
|
||||
* us to create a page that is small and knows how to
|
||||
* save, restore and apply itself.
|
||||
* <p>
|
||||
* This page is used to modify preferences only. They
|
||||
* are stored in the preference store that belongs to
|
||||
* the main plug-in class. That way, preferences can
|
||||
* be accessed directly via the preference store.
|
||||
*/
|
||||
|
||||
public class CPPPreferencePage
|
||||
extends FieldEditorPreferencePage
|
||||
implements IWorkbenchPreferencePage {
|
||||
ComboFieldEditor toolchainVersionEditor;
|
||||
BooleanFieldEditor autoUpdateToolchainEditor;
|
||||
private ComboFieldEditor wpiLibVersionEditor;
|
||||
private BooleanFieldEditor autoUpdateEditor;
|
||||
|
||||
public CPPPreferencePage() {
|
||||
super(GRID);
|
||||
setPreferenceStore(WPILibCPPPlugin.getDefault().getPreferenceStore());
|
||||
setDescription("Change workspace level settings for C++.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the field editors. Field editors are abstractions of
|
||||
* the common GUI blocks needed to manipulate various types
|
||||
* of preferences. Each field editor knows how to save and
|
||||
* restore itself.
|
||||
*/
|
||||
public void createFieldEditors() {
|
||||
wpiLibVersionEditor = new ComboFieldEditor(PreferenceConstants.LIBRARY_VERSION,
|
||||
"&Library Version:", getFieldEditorParent(), getInstalledVersions());
|
||||
addField(wpiLibVersionEditor);
|
||||
autoUpdateEditor = new BooleanFieldEditor(PreferenceConstants.UPDATE_LIBRARY_VERSION,
|
||||
"&Auto Update Library Version", getFieldEditorParent());
|
||||
addField(autoUpdateEditor);
|
||||
toolchainVersionEditor = new ComboFieldEditor(PreferenceConstants.TOOLCHAIN_VERSION,
|
||||
"&Toolchain Version:", getFieldEditorParent(), getInstalledToolchains());
|
||||
addField(toolchainVersionEditor);
|
||||
autoUpdateToolchainEditor = new BooleanFieldEditor(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION,
|
||||
"&Auto Update Toolchain Version", getFieldEditorParent());
|
||||
addField(autoUpdateToolchainEditor);
|
||||
}
|
||||
|
||||
private List<String> getInstalledVersions() {
|
||||
File[] dirs = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"cpp")
|
||||
.listFiles(new FileFilter() {
|
||||
@Override public boolean accept(File f) {
|
||||
return f.isDirectory();
|
||||
}
|
||||
});
|
||||
List<String> versions = new ArrayList<String>();
|
||||
for (File dir : dirs) {
|
||||
versions.add(dir.getName());
|
||||
}
|
||||
Collections.sort(versions);
|
||||
return versions;
|
||||
}
|
||||
|
||||
private List<String> getInstalledToolchains() {
|
||||
File[] dirs = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"toolchains")
|
||||
.listFiles(new FileFilter() {
|
||||
@Override public boolean accept(File f) {
|
||||
return f.isDirectory();
|
||||
}
|
||||
});
|
||||
List<String> versions = new ArrayList<String>();
|
||||
for (File dir : dirs) {
|
||||
versions.add(dir.getName());
|
||||
}
|
||||
Collections.sort(versions);
|
||||
return versions;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
||||
*/
|
||||
public void init(IWorkbench workbench) {
|
||||
WPILibCPPPlugin.logInfo("Preferences initialized.");
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
getPreferenceStore().setValue(PreferenceConstants.LIBRARY_VERSION,
|
||||
props.getProperty("cpp-version", WPILibCPPPlugin.getDefault().getCurrentVersion()));
|
||||
}
|
||||
|
||||
@Override public void performApply() {
|
||||
performOk();
|
||||
}
|
||||
|
||||
@Override public boolean performOk() {
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
props.setProperty("cpp-version", wpiLibVersionEditor.getChoice());
|
||||
WPILibCore.getDefault().saveGlobalProperties(props);
|
||||
return super.performOk();
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,5 @@ package edu.wpi.first.wpilib.plugins.cpp.preferences;
|
||||
* Constant definitions for plug-in preferences
|
||||
*/
|
||||
public class PreferenceConstants {
|
||||
public static final String LIBRARY_VERSION = "libraryVersionPreference";
|
||||
public static final String UPDATE_LIBRARY_VERSION = "udpateLibraryVersionPreference";
|
||||
public static final String TOOLCHAIN_VERSION = "toolchainVersionPreference";
|
||||
public static final String UPDATE_TOOLCHAIN_VERSION = "udpateToolchainVersionPreference";
|
||||
public static final String LIBRARY_INSTALLED = "libraryVersion_current";
|
||||
}
|
||||
|
||||
@@ -18,11 +18,8 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
|
||||
*/
|
||||
public void initializeDefaultPreferences() {
|
||||
IPreferenceStore store = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
store.setDefault(PreferenceConstants.LIBRARY_VERSION,
|
||||
WPILibCore.getDefault().getProjectProperties(null)
|
||||
.getProperty("cpp-version", WPILibCPPPlugin.getDefault().getCurrentVersion()));
|
||||
store.setDefault(PreferenceConstants.UPDATE_LIBRARY_VERSION, true);
|
||||
store.setDefault(PreferenceConstants.TOOLCHAIN_VERSION, WPILibCPPPlugin.getDefault().getDefaultToolchainVersion());
|
||||
store.setDefault(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION, true);
|
||||
if (!store.contains(PreferenceConstants.LIBRARY_INSTALLED))
|
||||
store.setValue(PreferenceConstants.LIBRARY_INSTALLED,
|
||||
"none");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ public class WPIRobotCPPProjectCreator implements IProjectCreator {
|
||||
public Map<String, String> getValues() {
|
||||
Map<String, String> vals = new HashMap<String, String>();
|
||||
vals.put("$project", projectName);
|
||||
vals.put("$toolchain", WPILibCPPPlugin.getDefault().getToolchain());
|
||||
vals.put("$cpp-location", WPILibCPPPlugin.getDefault().getCPPDir());
|
||||
vals.put("$world", worldName);
|
||||
return vals;
|
||||
@@ -74,9 +73,6 @@ public class WPIRobotCPPProjectCreator implements IProjectCreator {
|
||||
} catch (CoreException e) {
|
||||
WPILibCPPPlugin.logError("Error intializing FRC C++ project.", e);
|
||||
}
|
||||
|
||||
//config.getToolChain().getOptionById("cdt.managedbuild.option.gnu.cross.prefix").setValue(prefix);
|
||||
//config.getToolChain().getOptionById("cdt.managedbuild.option.gnu.cross.path").setValue(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
username="${username}"
|
||||
password="${password}"
|
||||
trust="true"
|
||||
command="tail -F -s 0 -n 0 ${deploy.log.file}"/>
|
||||
command="tail -F -n 0 ${deploy.log.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="kill-program" depends="get-target-ip" description="Kill the currently running FRC program">
|
||||
|
||||
@@ -157,15 +157,6 @@
|
||||
</enablement>
|
||||
</commonWizard>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.preferencePages">
|
||||
<page
|
||||
category="edu.wpi.first.wpilib.plugins.core.preferences.WPILibPreferencePage"
|
||||
class="edu.wpi.first.wpilib.plugins.java.preferences.JavaPreferencePage"
|
||||
id="edu.wpi.first.wpilib.plugins.java.preferences.JavaPreferencePage"
|
||||
name="Java Preferences">
|
||||
</page>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.runtime.preferences">
|
||||
<initializer
|
||||
|
||||
@@ -12,7 +12,7 @@ import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
* interface to the commands and command groups that allow control of the robot.
|
||||
*/
|
||||
public class OI {
|
||||
private Joystick joy = new Joystick(1);
|
||||
private Joystick joy = new Joystick(0);
|
||||
|
||||
public OI() {
|
||||
// Put Some buttons on the SmartDashboard
|
||||
|
||||
@@ -23,7 +23,7 @@ public class Robot extends IterativeRobot {
|
||||
*/
|
||||
public void robotInit() {
|
||||
myRobot = new RobotDrive(0,1);
|
||||
stick = new Joystick(1);
|
||||
stick = new Joystick(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
package org.usfirst.frc.team190.robot;
|
||||
|
||||
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.RobotDrive;
|
||||
import edu.wpi.first.wpilibj.RobotDrive.MotorType;
|
||||
import edu.wpi.first.wpilibj.SampleRobot;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
|
||||
/**
|
||||
* This is a demo program showing how to use Mecanum control with the RobotDrive class.
|
||||
*/
|
||||
public class Robot extends SampleRobot {
|
||||
|
||||
RobotDrive robotDrive;
|
||||
Joystick stick;
|
||||
|
||||
// Channels for the wheels
|
||||
final int frontLeftChannel = 2;
|
||||
final int rearLeftChannel = 3;
|
||||
final int frontRightChannel = 1;
|
||||
final int rearRightChannel = 0;
|
||||
|
||||
// The channel on the driver station that the joystick is connected to
|
||||
final int joystickChannel = 0;
|
||||
|
||||
public Robot() {
|
||||
robotDrive.setExpiration(0.1);
|
||||
robotDrive = new RobotDrive(frontLeftChannel, rearLeftChannel, frontRightChannel, rearRightChannel);
|
||||
robotDrive.setInvertedMotor(MotorType.kFrontLeft, true); // invert the left side motors
|
||||
robotDrive.setInvertedMotor(MotorType.kRearLeft, true); // you may need to change or remove this to match your robot
|
||||
|
||||
stick = new Joystick(joystickChannel);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs the motors with Mecanum drive.
|
||||
*/
|
||||
public void operatorControl() {
|
||||
robotDrive.setSafetyEnabled(true);
|
||||
while (isOperatorControl()) {
|
||||
|
||||
// Use the joystick X axis for lateral movement, Y axis for forward movement, and Z axis for rotation.
|
||||
// This sample does not use field-oriented drive, so the gyro input is set to zero.
|
||||
robotDrive.mecanumDrive_Cartesian(stick.getX(), stick.getY(), stick.getZ(), 0);
|
||||
|
||||
Timer.delay(0.005); // wait 5ms to avoid hogging CPU cycles
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
|
||||
package org.usfirst.frc.team190.robot;
|
||||
|
||||
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.SpeedController;
|
||||
import edu.wpi.first.wpilibj.Talon;
|
||||
import edu.wpi.first.wpilibj.SampleRobot;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
|
||||
/**
|
||||
* This sample program shows how to control a motor using a joystick. In the operator
|
||||
* control part of the program, the joystick is read and the value is written to the motor.
|
||||
*
|
||||
* Joystick analog values range from -1 to 1 and speed controller inputs also range from -1
|
||||
* to 1 making it easy to work together. The program also delays a short time in the loop
|
||||
* to allow other threads to run. This is generally a good idea, especially since the joystick
|
||||
* values are only transmitted from the Driver Station once every 20ms.
|
||||
*/
|
||||
public class Robot extends SampleRobot {
|
||||
|
||||
private SpeedController motor; // the motor to directly control with a joystick
|
||||
private Joystick stick;
|
||||
|
||||
private final double k_updatePeriod = 0.005; // update every 0.005 seconds/5 milliseconds (200Hz)
|
||||
|
||||
public Robot() {
|
||||
motor = new Talon(0); // initialize the motor as a Talon on channel 0
|
||||
stick = new Joystick(0); // initialize the joystick on port 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the motor from a joystick.
|
||||
*/
|
||||
public void operatorControl() {
|
||||
while (isOperatorControl()) {
|
||||
// Set the motor's output.
|
||||
// This takes a number from -1 (100% speed in reverse) to +1 (100% speed going forward)
|
||||
motor.set(stick.getY());
|
||||
|
||||
Timer.delay(k_updatePeriod); // wait 5ms to the next update
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ public class OI {
|
||||
public Joystick joystick;
|
||||
|
||||
public OI() {
|
||||
joystick = new Joystick(1);
|
||||
joystick = new Joystick(0);
|
||||
|
||||
new JoystickButton(joystick, 12).whenPressed(new LowGoal());
|
||||
new JoystickButton(joystick, 10).whenPressed(new Collect());
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
package $package;
|
||||
|
||||
|
||||
import edu.wpi.first.wpilibj.SampleRobot;
|
||||
import edu.wpi.first.wpilibj.RobotDrive;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
|
||||
/**
|
||||
* This is a demo program showing the use of the RobotDrive class, specifically it
|
||||
* contains the code necessary to operate a robot with tank drive.
|
||||
*
|
||||
* The VM is configured to automatically run this class, and to call the
|
||||
* functions corresponding to each mode, as described in the SampleRobot
|
||||
* documentation. If you change the name of this class or the package after
|
||||
* creating this project, you must also update the manifest file in the resource
|
||||
* directory.
|
||||
*
|
||||
* WARNING: While it may look like a good choice to use for your code if you're inexperienced,
|
||||
* don't. Unless you know what you are doing, complex code will be much more difficult under
|
||||
* this system. Use IterativeRobot or Command-Based instead if you're new.
|
||||
*/
|
||||
public class Robot extends SampleRobot {
|
||||
RobotDrive myRobot; // class that handles basic drive operations
|
||||
Joystick leftStick; // set to ID 1 in DriverStation
|
||||
Joystick rightStick; // set to ID 2 in DriverStation
|
||||
public Robot() {
|
||||
myRobot = new RobotDrive(0, 1);
|
||||
myRobot.setExpiration(0.1);
|
||||
leftStick = new Joystick(0);
|
||||
rightStick = new Joystick(1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs the motors with tank steering.
|
||||
*/
|
||||
public void operatorControl() {
|
||||
myRobot.setSafetyEnabled(true);
|
||||
while (isOperatorControl()) {
|
||||
myRobot.tankDrive(leftStick, rightStick);
|
||||
Timer.delay(0.005); // wait for a motor update time
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
121
eclipse-plugins/edu.wpi.first.wpilib.plugins.java/resources/templates/examples/examples.xml
Normal file → Executable file
121
eclipse-plugins/edu.wpi.first.wpilib.plugins.java/resources/templates/examples/examples.xml
Normal file → Executable file
@@ -19,6 +19,68 @@
|
||||
<name>Getting Started with Java</name>
|
||||
<description>Examples for getting started with FRC Java</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Actuators</name>
|
||||
<description>Example programs that demonstrate the use of various actuators</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Analog</name>
|
||||
<description>Examples programs that show different uses of analog inputs,
|
||||
outputs and various analog sensors</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>CAN</name>
|
||||
<description>Example programs that demonstrate the use of the CAN components in the control system</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Complete List</name>
|
||||
<description>Complete list of all sample programs across all categories</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Digital</name>
|
||||
<description>Example programs that demonstrate the sensors that use the digital I/O ports</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>I2C</name>
|
||||
<description>Example programs that demonstrate the use of I2C and various sensors that use it</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Joystick</name>
|
||||
<description>Example programs that demonstate different uses of joysticks for robot driving</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Pneumatics</name>
|
||||
<description>Example programs that demonstrate the use of the compressor and solenoids</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Robot and Motor</name>
|
||||
<description>Example programs that demonstrate driving a robot and motors including safety, servos, etc.</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>SPI</name>
|
||||
<description>Example programs that demonstrate the use of the SPI bus and sensors that connect to it</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Safety</name>
|
||||
<description>Example programs that demonstate the motor safety classes and how to use them with your programs</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Sensors</name>
|
||||
<description>Example programs that demonstrate the use of the various commonly used sensors on FRC robots</description>
|
||||
</tagDescription>
|
||||
|
||||
<example>
|
||||
<name>Getting Started</name>
|
||||
<description>An example program which demonstrates the simplest autonomous and
|
||||
@@ -34,6 +96,65 @@
|
||||
destination="src/$package-dir/Robot.java"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<name>Tank Drive</name>
|
||||
<description>Demonstrate the use of the RobotDrive class doing teleop driving with tank steering</description>
|
||||
<tags>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Safety</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src/$package-dir</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/TankDrive/src/org/usfirst/frc/team190/robot/Robot.java"
|
||||
destination="src/$package-dir/Robot.java"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<name>Mecanum Drive</name>
|
||||
<description>Demonstrate the use of the RobotDrive class doing teleop driving with Mecanum steering</description>
|
||||
<tags>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Safety</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src/$package-dir</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MecanumDrive/src/org/usfirst/frc/team190/robot/Robot.java"
|
||||
destination="src/$package-dir/Robot.java"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
|
||||
<example>
|
||||
<name>Motor Controller</name>
|
||||
<description>Demonstrate controlling a single motor with a joystick</description>
|
||||
<tags>
|
||||
<tag>Actuators</tag>
|
||||
<tag>Complete List</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src/$package-dir</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MotorControl/src/org/usfirst/frc/team190/robot/Robot.java"
|
||||
destination="src/$package-dir/Robot.java"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
|
||||
<tagDescription>
|
||||
<name>CommandBased Robot</name>
|
||||
<description>Examples for CommandBased robot programs.</description>
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Robot extends SampleRobot {
|
||||
public Robot() {
|
||||
myRobot = new RobotDrive(0, 1);
|
||||
myRobot.setExpiration(0.1);
|
||||
stick = new Joystick(1);
|
||||
stick = new Joystick(0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -78,12 +78,16 @@ public class WPILibJavaPlugin extends AbstractUIPlugin implements IStartup {
|
||||
return "DEVELOPMENT";
|
||||
}
|
||||
}
|
||||
public String getJavaPath() {
|
||||
return WPILibCore.getDefault().getWPILibBaseDir()
|
||||
+ File.separator + "java" + File.separator + "current";
|
||||
}
|
||||
|
||||
public Properties getProjectProperties(IProject project) {
|
||||
Properties defaults = WPILibCore.getDefault().getProjectProperties(project);
|
||||
Properties props;
|
||||
try {
|
||||
File file = new File(WPILibCore.getDefault().getWPILibBaseDir()+"/java/"+getCurrentVersion()+"/ant/build.properties");
|
||||
File file = new File(WPILibCore.getDefault().getWPILibBaseDir()+"/java/current/ant/build.properties");
|
||||
props = new AntPropertiesParser(new FileInputStream(file)).getProperties(defaults);
|
||||
} catch (Exception e) {
|
||||
WPILibJavaPlugin.logError("Error getting properties.", e);
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
package edu.wpi.first.wpilib.plugins.java.installer;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
|
||||
import edu.wpi.first.wpilib.plugins.java.WPILibJavaPlugin;
|
||||
import edu.wpi.first.wpilib.plugins.java.preferences.PreferenceConstants;
|
||||
@@ -19,7 +16,9 @@ import edu.wpi.first.wpilib.plugins.java.preferences.PreferenceConstants;
|
||||
public class JavaInstaller extends AbstractInstaller {
|
||||
|
||||
public JavaInstaller(String version) {
|
||||
super(version);
|
||||
super(version,
|
||||
WPILibJavaPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.LIBRARY_INSTALLED),
|
||||
WPILibJavaPlugin.getDefault().getJavaPath());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -30,14 +29,7 @@ public class JavaInstaller extends AbstractInstaller {
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibJavaPlugin.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_LIBRARY_VERSION)) {
|
||||
WPILibJavaPlugin.logInfo("Forcing library version to "+version);
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
props.setProperty("version", version);
|
||||
WPILibCore.getDefault().saveGlobalProperties(props);
|
||||
prefs.setValue(PreferenceConstants.LIBRARY_VERSION, version);
|
||||
}
|
||||
WPILibJavaPlugin.getDefault().updateProjects();
|
||||
prefs.setValue(PreferenceConstants.LIBRARY_INSTALLED, version);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.java.preferences;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
import edu.wpi.first.wpilib.plugins.core.preferences.ComboFieldEditor;
|
||||
import edu.wpi.first.wpilib.plugins.java.WPILibJavaPlugin;
|
||||
|
||||
/**
|
||||
* This class represents a preference page that
|
||||
* is contributed to the Preferences dialog. By
|
||||
* subclassing <samp>FieldEditorPreferencePage</samp>, we
|
||||
* can use the field support built into JFace that allows
|
||||
* us to create a page that is small and knows how to
|
||||
* save, restore and apply itself.
|
||||
* <p>
|
||||
* This page is used to modify preferences only. They
|
||||
* are stored in the preference store that belongs to
|
||||
* the main plug-in class. That way, preferences can
|
||||
* be accessed directly via the preference store.
|
||||
*/
|
||||
|
||||
public class JavaPreferencePage
|
||||
extends FieldEditorPreferencePage
|
||||
implements IWorkbenchPreferencePage {
|
||||
ComboFieldEditor wpiLibVersionEditor;
|
||||
BooleanFieldEditor autoUpdateEditor;
|
||||
|
||||
public JavaPreferencePage() {
|
||||
super(GRID);
|
||||
setPreferenceStore(WPILibJavaPlugin.getDefault().getPreferenceStore());
|
||||
setDescription("Change workspace level settings for Java.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the field editors. Field editors are abstractions of
|
||||
* the common GUI blocks needed to manipulate various types
|
||||
* of preferences. Each field editor knows how to save and
|
||||
* restore itself.
|
||||
*/
|
||||
public void createFieldEditors() {
|
||||
wpiLibVersionEditor = new ComboFieldEditor(PreferenceConstants.LIBRARY_VERSION,
|
||||
"&Library Version:", getFieldEditorParent(), getInstalledVersions());
|
||||
addField(wpiLibVersionEditor);
|
||||
autoUpdateEditor = new BooleanFieldEditor(PreferenceConstants.UPDATE_LIBRARY_VERSION,
|
||||
"&Auto Update Library Version", getFieldEditorParent());
|
||||
addField(autoUpdateEditor);
|
||||
}
|
||||
|
||||
private List<String> getInstalledVersions() {
|
||||
File[] dirs = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"java")
|
||||
.listFiles(new FileFilter() {
|
||||
@Override public boolean accept(File f) {
|
||||
return f.isDirectory();
|
||||
}
|
||||
});
|
||||
List<String> versions = new ArrayList<String>();
|
||||
for (File dir : dirs) {
|
||||
versions.add(dir.getName());
|
||||
}
|
||||
Collections.sort(versions);
|
||||
return versions;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
||||
*/
|
||||
public void init(IWorkbench workbench) {
|
||||
WPILibJavaPlugin.logInfo("Preferences initialized.");
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
getPreferenceStore().setValue(PreferenceConstants.LIBRARY_VERSION,
|
||||
props.getProperty("version", WPILibJavaPlugin.getDefault().getCurrentVersion()));
|
||||
}
|
||||
|
||||
@Override public void performApply() {
|
||||
performOk();
|
||||
}
|
||||
|
||||
@Override public boolean performOk() {
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
props.setProperty("version", wpiLibVersionEditor.getChoice());
|
||||
WPILibCore.getDefault().saveGlobalProperties(props);
|
||||
WPILibJavaPlugin.getDefault().updateProjects();
|
||||
return super.performOk();
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,5 @@ package edu.wpi.first.wpilib.plugins.java.preferences;
|
||||
* Constant definitions for plug-in preferences
|
||||
*/
|
||||
public class PreferenceConstants {
|
||||
public static final String LIBRARY_VERSION = "libraryVersionPreference";
|
||||
public static final String UPDATE_LIBRARY_VERSION = "udpateLibraryVersionPreference";
|
||||
public static final String LIBRARY_INSTALLED = "libraryVersion_current";
|
||||
}
|
||||
|
||||
@@ -18,9 +18,7 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
|
||||
*/
|
||||
public void initializeDefaultPreferences() {
|
||||
IPreferenceStore store = WPILibJavaPlugin.getDefault().getPreferenceStore();
|
||||
store.setDefault(PreferenceConstants.LIBRARY_VERSION,
|
||||
WPILibCore.getDefault().getProjectProperties(null)
|
||||
.getProperty("version", WPILibJavaPlugin.getDefault().getCurrentVersion()));
|
||||
store.setDefault(PreferenceConstants.UPDATE_LIBRARY_VERSION, true);
|
||||
if (!store.contains(PreferenceConstants.LIBRARY_INSTALLED))
|
||||
store.setValue(PreferenceConstants.LIBRARY_INSTALLED, "none");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,11 @@ password=
|
||||
deploy.dir=/home/admin
|
||||
deploy.kill.command=. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r
|
||||
deploy.log.file=/var/local/natinst/log/FRC_UserProgram.log
|
||||
deploy.log.command=tail -F -s 0 -n 0 ${deploy.log.file}
|
||||
deploy.log.command=tail -F -n 0 ${deploy.log.file}
|
||||
debug.flag.dir=/tmp/
|
||||
debug.flag.command=chown lvuser:ni ${debug.flag.dir}frcdebug
|
||||
command.dir=/home/lvuser/
|
||||
version=current
|
||||
|
||||
# Libraries to use
|
||||
wpilib=${user.home}/wpilib/java/${version}
|
||||
|
||||
@@ -92,6 +92,11 @@
|
||||
<scp file="${wpilib.ant.dir}/robotDebugCommand" todir="${username}@${target}:${command.dir}" password="${password}" trust="true"/>
|
||||
<!-- The frcdebug file is used as a flag for /usr/local/frc/bin/frcRunRobot.sh to run the robot program in debug mode -->
|
||||
<scp file="${wpilib.ant.dir}/frcdebug" todir="${username}@${target}:${debug.flag.dir}" password="${password}" trust="true"/>
|
||||
<sshexec host="${target}"
|
||||
username="${username}"
|
||||
password="${password}"
|
||||
trust="true"
|
||||
command="${debug.flag.command}"/>
|
||||
|
||||
<echo>[athena-deploy] Starting Debug program.</echo>
|
||||
<sshexec host="${target}"
|
||||
|
||||
@@ -6,19 +6,9 @@
|
||||
<feature url="features/edu.wpi.first.wpilib.plugins.java.feature_0.1.0.qualifier.jar" id="edu.wpi.first.wpilib.plugins.java.feature" version="0.1.0.qualifier">
|
||||
<category name="edu.wpi.first.wpilib.plugins"/>
|
||||
</feature>
|
||||
<feature url="features/edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.feature_0.2.0.qualifier.jar" id="edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.feature" version="0.2.0">
|
||||
<category name="edu.wpi.first.wpilib.plugins.cpp.toolchains"/>
|
||||
</feature>
|
||||
<feature url="features/edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.feature_0.2.0.jar" id="edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.feature" version="0.2.0">
|
||||
<category name="edu.wpi.first.wpilib.plugins.cpp.toolchains"/>
|
||||
</feature>
|
||||
<feature url="features/edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature_0.2.0.jar" id="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature" version="0.2.0">
|
||||
<category name="edu.wpi.first.wpilib.plugins.cpp.toolchains"/>
|
||||
</feature>
|
||||
<category-def name="edu.wpi.first.wpilib.plugins" label="WPILib Robot Development">
|
||||
<description>
|
||||
Core WPILib Robot Development Tools.
|
||||
</description>
|
||||
</category-def>
|
||||
<category-def name="edu.wpi.first.wpilib.plugins.cpp.toolchains" label="C++ Toolchains"/>
|
||||
</site>
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
<module>edu.wpi.first.wpilib.plugins.core.feature</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.cpp</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.cpp.feature</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.cpp.toolchains.linux</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.feature</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.cpp.toolchains.mac</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.feature</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.cpp.toolchains.windows</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.java</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.java.feature</module>
|
||||
<module>edu.wpi.first.wpilib.plugins.updatesite</module>
|
||||
@@ -32,7 +26,7 @@
|
||||
<repository>
|
||||
<id>juno</id>
|
||||
<layout>p2</layout>
|
||||
<url>http://download.eclipse.org/releases/juno</url>
|
||||
<url>http://download.eclipse.org/releases/luna</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>FRC Binaries</id>
|
||||
|
||||
@@ -6,8 +6,12 @@ include_directories(lib/Athena lib/Athena/FRC_FPGA_ChipObject include)
|
||||
add_library(HALAthena STATIC ${SRC_FILES})
|
||||
target_link_libraries(HALAthena ${NI_LIBS})
|
||||
INSTALL(TARGETS HALAthena ARCHIVE DESTINATION lib COMPONENT lib)
|
||||
INSTALL(FILES ${NI_LIBS} DESTINATION lib COMPONENT ni_lib)
|
||||
INSTALL(FILES ${NI_LIBS} ${WPI_LD_LIBS} DESTINATION lib COMPONENT ni_lib)
|
||||
INSTALL(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT headers)
|
||||
|
||||
add_library(HALAthena_shared SHARED ${SRC_FILES})
|
||||
target_link_libraries(HALAthena_shared ${NI_LIBS})
|
||||
INSTALL(TARGETS HALAthena_shared LIBRARY DESTINATION lib COMPONENT lib)
|
||||
# lib/ c m gcc_s ld-linux
|
||||
# usr/lib
|
||||
# FRC_NetworkCommunication FRC_FPGA_ChipObject RoboRIO_FRC_ChipObject
|
||||
|
||||
@@ -24,6 +24,7 @@ extern "C"
|
||||
bool allocatePWMChannel(void* digital_port_pointer, int32_t *status);
|
||||
void freePWMChannel(void* digital_port_pointer, int32_t *status);
|
||||
unsigned short getPWM(void* digital_port_pointer, int32_t *status);
|
||||
void latchPWMZero(void* digital_port_pointer, int32_t *status);
|
||||
void setPWMPeriodScale(void* digital_port_pointer, uint32_t squelchMask, int32_t *status);
|
||||
void* allocatePWM(int32_t *status);
|
||||
void freePWM(void* pwmGenerator, int32_t *status);
|
||||
@@ -62,8 +63,6 @@ extern "C"
|
||||
void setCounterPulseLengthMode(void* counter_pointer, double threshold, int32_t *status);
|
||||
int32_t getCounterSamplesToAverage(void* counter_pointer, int32_t *status);
|
||||
void setCounterSamplesToAverage(void* counter_pointer, int samplesToAverage, int32_t *status);
|
||||
void startCounter(void* counter_pointer, int32_t *status);
|
||||
void stopCounter(void* counter_pointer, int32_t *status);
|
||||
void resetCounter(void* counter_pointer, int32_t *status);
|
||||
int32_t getCounter(void* counter_pointer, int32_t *status);
|
||||
double getCounterPeriod(void* counter_pointer, int32_t *status);
|
||||
@@ -77,8 +76,6 @@ extern "C"
|
||||
uint8_t port_b_module, uint32_t port_b_pin, bool port_b_analog_trigger,
|
||||
bool reverseDirection, int32_t *index, int32_t *status); // TODO: fix routing
|
||||
void freeEncoder(void* encoder_pointer, int32_t *status);
|
||||
void startEncoder(void* encoder_pointer, int32_t *status);
|
||||
void stopEncoder(void* encoder_pointer, int32_t *status);
|
||||
void resetEncoder(void* encoder_pointer, int32_t *status);
|
||||
int32_t getEncoder(void* encoder_pointer, int32_t *status); // Raw value
|
||||
double getEncoderPeriod(void* encoder_pointer, int32_t *status);
|
||||
|
||||
@@ -16,10 +16,11 @@ extern "C"
|
||||
void* initializeInterrupts(uint32_t interruptIndex, bool watcher, int32_t *status);
|
||||
void cleanInterrupts(void* interrupt_pointer, int32_t *status);
|
||||
|
||||
void waitForInterrupt(void* interrupt_pointer, double timeout, int32_t *status);
|
||||
uint32_t waitForInterrupt(void* interrupt_pointer, double timeout, bool ignorePrevious, int32_t *status);
|
||||
void enableInterrupts(void* interrupt_pointer, int32_t *status);
|
||||
void disableInterrupts(void* interrupt_pointer, int32_t *status);
|
||||
double readInterruptTimestamp(void* interrupt_pointer, int32_t *status);
|
||||
double readRisingTimestamp(void* interrupt_pointer, int32_t *status);
|
||||
double readFallingTimestamp(void* interrupt_pointer, int32_t *status);
|
||||
void requestInterrupts(void* interrupt_pointer, uint8_t routing_module, uint32_t routing_pin,
|
||||
bool routing_analog_trigger, int32_t *status);
|
||||
void attachInterruptHandler(void* interrupt_pointer, InterruptHandlerFunction handler,
|
||||
|
||||
@@ -4,11 +4,14 @@
|
||||
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
#pragma once
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wpedantic"
|
||||
#pragma GCC diagnostic ignored "-Wignored-qualifiers"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "FRC_FPGA_ChipObject/RoboRIO_FRC_ChipObject_Aliases.h"
|
||||
#include "FRC_FPGA_ChipObject/tDMAChannelDescriptor.h"
|
||||
#include "FRC_FPGA_ChipObject/tDMAManager.h"
|
||||
#include "FRC_FPGA_ChipObject/tInterruptManager.h"
|
||||
#include "FRC_FPGA_ChipObject/tSystem.h"
|
||||
@@ -37,3 +40,4 @@
|
||||
// FIXME: these should not be here!
|
||||
using namespace nFPGA;
|
||||
using namespace nRoboRIO_FPGANamespace;
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
@@ -217,6 +217,12 @@ unsigned short getPWM(void* digital_port_pointer, int32_t *status) {
|
||||
}
|
||||
}
|
||||
|
||||
void latchPWMZero(void* digital_port_pointer, int32_t *status) {
|
||||
DigitalPort* port = (DigitalPort*) digital_port_pointer;
|
||||
pwmSystem->writeZeroLatch(port->port.pin, true, status);
|
||||
pwmSystem->writeZeroLatch(port->port.pin, false, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set how how often the PWM signal is squelched, thus scaling the period.
|
||||
*
|
||||
@@ -677,14 +683,11 @@ void setCounterUpSourceEdge(void* counter_pointer, bool risingEdge, bool falling
|
||||
*/
|
||||
void clearCounterUpSource(void* counter_pointer, int32_t *status) {
|
||||
Counter* counter = (Counter*) counter_pointer;
|
||||
bool state = counter->counter->readConfig_Enable(status);
|
||||
counter->counter->writeConfig_Enable(false, status);
|
||||
counter->counter->writeConfig_UpFallingEdge(false, status);
|
||||
counter->counter->writeConfig_UpRisingEdge(false, status);
|
||||
// Index 0 of digital is always 0.
|
||||
counter->counter->writeConfig_UpSource_Channel(0, status);
|
||||
counter->counter->writeConfig_UpSource_AnalogTrigger(false, status);
|
||||
counter->counter->writeConfig_Enable(state, status);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -732,14 +735,11 @@ void setCounterDownSourceEdge(void* counter_pointer, bool risingEdge, bool falli
|
||||
*/
|
||||
void clearCounterDownSource(void* counter_pointer, int32_t *status) {
|
||||
Counter* counter = (Counter*) counter_pointer;
|
||||
bool state = counter->counter->readConfig_Enable(status);
|
||||
counter->counter->writeConfig_Enable(false, status);
|
||||
counter->counter->writeConfig_DownFallingEdge(false, status);
|
||||
counter->counter->writeConfig_DownRisingEdge(false, status);
|
||||
// Index 0 of digital is always 0.
|
||||
counter->counter->writeConfig_DownSource_Channel(0, status);
|
||||
counter->counter->writeConfig_DownSource_AnalogTrigger(false, status);
|
||||
counter->counter->writeConfig_Enable(state, status);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -808,25 +808,6 @@ void setCounterSamplesToAverage(void* counter_pointer, int samplesToAverage, int
|
||||
counter->counter->writeTimerConfig_AverageSize(samplesToAverage, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the Counter counting.
|
||||
* This enables the counter and it starts accumulating counts from the associated
|
||||
* input channel. The counter value is not reset on starting, and still has the previous value.
|
||||
*/
|
||||
void startCounter(void* counter_pointer, int32_t *status) {
|
||||
Counter* counter = (Counter*) counter_pointer;
|
||||
counter->counter->writeConfig_Enable(1, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop the Counter.
|
||||
* Stops the counting but doesn't effect the current value.
|
||||
*/
|
||||
void stopCounter(void* counter_pointer, int32_t *status) {
|
||||
Counter* counter = (Counter*) counter_pointer;
|
||||
counter->counter->writeConfig_Enable(0, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the Counter to zero.
|
||||
* Set the counter value to zero. This doesn't effect the running state of the counter, just sets
|
||||
@@ -987,23 +968,6 @@ void freeEncoder(void* encoder_pointer, int32_t *status) {
|
||||
delete encoder->encoder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start the Encoder.
|
||||
* Starts counting pulses on the Encoder device.
|
||||
*/
|
||||
void startEncoder(void* encoder_pointer, int32_t *status) {
|
||||
Encoder* encoder = (Encoder*) encoder_pointer;
|
||||
encoder->encoder->writeConfig_Enable(1, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stops counting pulses on the Encoder device. The value is not changed.
|
||||
*/
|
||||
void stopEncoder(void* encoder_pointer, int32_t *status) {
|
||||
Encoder* encoder = (Encoder*) encoder_pointer;
|
||||
encoder->encoder->writeConfig_Enable(0, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the Encoder distance to zero.
|
||||
* Resets the current count to zero on the encoder.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#ifndef __FRC_FPGA_ChipObject_Aliases_h__
|
||||
#define __FRC_FPGA_ChipObject_Aliases_h__
|
||||
|
||||
#define nInvariantFPGANamespace nFRC_C0EF_1_1_0
|
||||
#define nRuntimeFPGANamespace nFRC_2012_1_6_4
|
||||
#define nInvariantFPGANamespace nFRC_C0EF_1_1_0
|
||||
|
||||
#endif // __FRC_FPGA_ChipObject_Aliases_h__
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
#ifndef __RoboRIO_FRC_ChipObject_Aliases_h__
|
||||
#define __RoboRIO_FRC_ChipObject_Aliases_h__
|
||||
|
||||
#define nRoboRIO_FPGANamespace nFRC_2015_1_0_7
|
||||
#define nRoboRIO_FPGANamespace nFRC_2015_1_0_9
|
||||
|
||||
#endif // __RoboRIO_FRC_ChipObject_Aliases_h__
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,15 +1,15 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2015_1_0_7_nInterfaceGlobals_h__
|
||||
#define __nFRC_2015_1_0_7_nInterfaceGlobals_h__
|
||||
#ifndef __nFRC_2015_1_0_9_nInterfaceGlobals_h__
|
||||
#define __nFRC_2015_1_0_9_nInterfaceGlobals_h__
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2015_1_0_7
|
||||
namespace nFRC_2015_1_0_9
|
||||
{
|
||||
extern unsigned int g_currentTargetClass;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2015_1_0_7_nInterfaceGlobals_h__
|
||||
#endif // __nFRC_2015_1_0_9_nInterfaceGlobals_h__
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2015_1_0_7_AI_h__
|
||||
#define __nFRC_2015_1_0_7_AI_h__
|
||||
#ifndef __nFRC_2015_1_0_9_AI_h__
|
||||
#define __nFRC_2015_1_0_9_AI_h__
|
||||
|
||||
#include "tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2015_1_0_7
|
||||
namespace nFRC_2015_1_0_9
|
||||
{
|
||||
|
||||
class tAI
|
||||
@@ -140,4 +140,4 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2015_1_0_7_AI_h__
|
||||
#endif // __nFRC_2015_1_0_9_AI_h__
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2015_1_0_7_AO_h__
|
||||
#define __nFRC_2015_1_0_7_AO_h__
|
||||
#ifndef __nFRC_2015_1_0_9_AO_h__
|
||||
#define __nFRC_2015_1_0_9_AO_h__
|
||||
|
||||
#include "tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2015_1_0_7
|
||||
namespace nFRC_2015_1_0_9
|
||||
{
|
||||
|
||||
class tAO
|
||||
@@ -47,4 +47,4 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2015_1_0_7_AO_h__
|
||||
#endif // __nFRC_2015_1_0_9_AO_h__
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2015_1_0_7_Accel_h__
|
||||
#define __nFRC_2015_1_0_7_Accel_h__
|
||||
#ifndef __nFRC_2015_1_0_9_Accel_h__
|
||||
#define __nFRC_2015_1_0_9_Accel_h__
|
||||
|
||||
#include "tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2015_1_0_7
|
||||
namespace nFRC_2015_1_0_9
|
||||
{
|
||||
|
||||
class tAccel
|
||||
@@ -99,4 +99,4 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2015_1_0_7_Accel_h__
|
||||
#endif // __nFRC_2015_1_0_9_Accel_h__
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2015_1_0_7_Accumulator_h__
|
||||
#define __nFRC_2015_1_0_7_Accumulator_h__
|
||||
#ifndef __nFRC_2015_1_0_9_Accumulator_h__
|
||||
#define __nFRC_2015_1_0_9_Accumulator_h__
|
||||
|
||||
#include "tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2015_1_0_7
|
||||
namespace nFRC_2015_1_0_9
|
||||
{
|
||||
|
||||
class tAccumulator
|
||||
@@ -84,4 +84,4 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2015_1_0_7_Accumulator_h__
|
||||
#endif // __nFRC_2015_1_0_9_Accumulator_h__
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2015_1_0_7_Alarm_h__
|
||||
#define __nFRC_2015_1_0_7_Alarm_h__
|
||||
#ifndef __nFRC_2015_1_0_9_Alarm_h__
|
||||
#define __nFRC_2015_1_0_9_Alarm_h__
|
||||
|
||||
#include "tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2015_1_0_7
|
||||
namespace nFRC_2015_1_0_9
|
||||
{
|
||||
|
||||
class tAlarm
|
||||
@@ -54,4 +54,4 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2015_1_0_7_Alarm_h__
|
||||
#endif // __nFRC_2015_1_0_9_Alarm_h__
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2015_1_0_7_AnalogTrigger_h__
|
||||
#define __nFRC_2015_1_0_7_AnalogTrigger_h__
|
||||
#ifndef __nFRC_2015_1_0_9_AnalogTrigger_h__
|
||||
#define __nFRC_2015_1_0_9_AnalogTrigger_h__
|
||||
|
||||
#include "tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2015_1_0_7
|
||||
namespace nFRC_2015_1_0_9
|
||||
{
|
||||
|
||||
class tAnalogTrigger
|
||||
@@ -126,4 +126,4 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2015_1_0_7_AnalogTrigger_h__
|
||||
#endif // __nFRC_2015_1_0_9_AnalogTrigger_h__
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
// Copyright (c) National Instruments 2008. All Rights Reserved.
|
||||
// Do Not Edit... this file is generated!
|
||||
|
||||
#ifndef __nFRC_2015_1_0_7_BIST_h__
|
||||
#define __nFRC_2015_1_0_7_BIST_h__
|
||||
#ifndef __nFRC_2015_1_0_9_BIST_h__
|
||||
#define __nFRC_2015_1_0_9_BIST_h__
|
||||
|
||||
#include "tSystemInterface.h"
|
||||
|
||||
namespace nFPGA
|
||||
{
|
||||
namespace nFRC_2015_1_0_7
|
||||
namespace nFRC_2015_1_0_9
|
||||
{
|
||||
|
||||
class tBIST
|
||||
@@ -87,4 +87,4 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
#endif // __nFRC_2015_1_0_7_BIST_h__
|
||||
#endif // __nFRC_2015_1_0_9_BIST_h__
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user