mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
Compare commits
51 Commits
jenkins-st
...
jenkins-re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
@@ -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,12 +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(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 /usr/arm-frc-linux-gnueabi)
|
||||
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"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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 "4.4.1-csery-gcc";
|
||||
}
|
||||
|
||||
/*
|
||||
* (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,34 +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,
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.TOOLCHAIN_INSTALLED), WPILibCPPPlugin.getDefault().getToolchain());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "toolchains";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.TOOLCHAIN_INSTALLED,
|
||||
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 "4.4.1-csery-gcc";
|
||||
}
|
||||
|
||||
/*
|
||||
* (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,34 +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,
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.TOOLCHAIN_INSTALLED),
|
||||
WPILibCPPPlugin.getDefault().getToolchain());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "toolchains";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.TOOLCHAIN_INSTALLED,
|
||||
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.3.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.3.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.3.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.3.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 "4.4.1-csery-gcc";
|
||||
}
|
||||
|
||||
/*
|
||||
* (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,34 +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,
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.TOOLCHAIN_INSTALLED), WPILibCPPPlugin.getDefault().getToolchain());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "toolchains";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.TOOLCHAIN_INSTALLED,
|
||||
version);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getInstallResourceStream() {
|
||||
return ToolchainInstaller.class.getResourceAsStream("/resources/toolchain.zip");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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=""$cpp-location/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">
|
||||
<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.paths.1566479969" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""$cpp-location/lib""/>
|
||||
</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>
|
||||
<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,76 +104,26 @@
|
||||
</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"/>
|
||||
@@ -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">
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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,113 @@
|
||||
<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>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 +129,7 @@
|
||||
supports simulation.</description>
|
||||
<tags>
|
||||
<tag>CommandBased Robot</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
@@ -130,7 +213,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,11 +58,6 @@ public class WPILibCPPPlugin extends AbstractUIPlugin implements IStartup {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public String getToolchain() {
|
||||
return WPILibCore.getDefault().getWPILibBaseDir()
|
||||
+ File.separator + "toolchains" + File.separator + "current";
|
||||
}
|
||||
|
||||
public String getCurrentVersion() {
|
||||
try {
|
||||
Properties props = new AntPropertiesParser(WPILibCPPPlugin.class.getResourceAsStream("/resources/configuration.properties")).getProperties();
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,5 +5,4 @@ package edu.wpi.first.wpilib.plugins.cpp.preferences;
|
||||
*/
|
||||
public class PreferenceConstants {
|
||||
public static final String LIBRARY_INSTALLED = "libraryVersion_current";
|
||||
public static final String TOOLCHAIN_INSTALLED = "toolchainVersion_current";
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,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
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
102
eclipse-plugins/edu.wpi.first.wpilib.plugins.java/resources/templates/examples/examples.xml
Normal file → Executable file
102
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,46 @@
|
||||
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>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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,6 +6,7 @@ deploy.kill.command=. /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKill
|
||||
deploy.log.file=/var/local/natinst/log/FRC_UserProgram.log
|
||||
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
|
||||
|
||||
|
||||
@@ -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.3.0.jar" id="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature" version="0.3.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>
|
||||
|
||||
@@ -6,7 +6,7 @@ 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)
|
||||
# lib/ c m gcc_s ld-linux
|
||||
# usr/lib
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
/* 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>
|
||||
@@ -37,3 +39,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(1 << port->port.pin, true, status);
|
||||
pwmSystem->writeZeroLatch(1 << port->port.pin, false, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set how how often the PWM signal is squelched, thus scaling the period.
|
||||
*
|
||||
|
||||
@@ -90,7 +90,7 @@ private:
|
||||
uint32_t periodMs;
|
||||
txJob_t() : arbId(0),periodMs(0)
|
||||
{
|
||||
for(int i=0;i<sizeof(toSend);++i)
|
||||
for(unsigned i=0;i<sizeof(toSend);++i)
|
||||
toSend[i] = 0;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -19,17 +19,11 @@ class EntryCache;
|
||||
#include "networktables/NetworkTableListenerAdapter.h"
|
||||
#include "tables/IRemoteConnectionListener.h"
|
||||
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
class NetworkTableKeyCache: public StringCache{
|
||||
private:
|
||||
const std::string path;
|
||||
|
||||
public:
|
||||
public:
|
||||
NetworkTableKeyCache(std::string path);
|
||||
~NetworkTableKeyCache();
|
||||
|
||||
@@ -39,19 +33,19 @@ public:
|
||||
|
||||
class EntryCache {
|
||||
private:
|
||||
map<std::string, NetworkTableEntry*> cache;
|
||||
std::map<std::string, NetworkTableEntry*> cache;
|
||||
std::string& path;
|
||||
public:
|
||||
EntryCache(std::string& path);
|
||||
~EntryCache();
|
||||
|
||||
|
||||
NetworkTableEntry* Get(std::string& key);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class NetworkTable : public ITable, IRemote {
|
||||
|
||||
|
||||
private:
|
||||
static DefaultThreadManager threadManager;
|
||||
static NetworkTableProvider* staticProvider;
|
||||
@@ -62,37 +56,37 @@ private:
|
||||
static int port;
|
||||
static std::string ipAddress;
|
||||
static NTReentrantSemaphore STATIC_LOCK;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::string path;
|
||||
EntryCache entryCache;
|
||||
NetworkTableKeyCache absoluteKeyCache;
|
||||
NetworkTableProvider& provider;
|
||||
NetworkTableNode& node;
|
||||
NTReentrantSemaphore LOCK;
|
||||
|
||||
|
||||
map<IRemoteConnectionListener*, NetworkTableConnectionListenerAdapter*> connectionListenerMap;
|
||||
multimap<ITableListener*, ITableListener*> listenerMap;
|
||||
|
||||
|
||||
|
||||
std::map<IRemoteConnectionListener*, NetworkTableConnectionListenerAdapter*> connectionListenerMap;
|
||||
std::multimap<ITableListener*, ITableListener*> listenerMap;
|
||||
|
||||
static void CheckInit();
|
||||
|
||||
|
||||
NetworkTableEntry* GetEntry(std::string key);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
static const char PATH_SEPARATOR_CHAR;
|
||||
/**
|
||||
* The path separator for sub-tables and keys
|
||||
*
|
||||
*
|
||||
*/
|
||||
static const std::string PATH_SEPARATOR;
|
||||
/**
|
||||
* The default port that network tables operates on
|
||||
*/
|
||||
static const int DEFAULT_PORT;
|
||||
|
||||
|
||||
/**
|
||||
* @throws IOException
|
||||
*/
|
||||
@@ -104,19 +98,19 @@ public:
|
||||
* This must be called before getTable
|
||||
*/
|
||||
static void SetTableProvider(NetworkTableProvider* provider);
|
||||
|
||||
|
||||
/**
|
||||
* set that network tables should be a client
|
||||
* This must be called before initalize or GetTable
|
||||
*/
|
||||
static void SetClientMode();
|
||||
|
||||
|
||||
/**
|
||||
* set that network tables should be a server
|
||||
* This must be called before initalize or GetTable
|
||||
*/
|
||||
static void SetServerMode();
|
||||
|
||||
|
||||
/**
|
||||
* set the team the robot is configured for (this will set the ip address that network tables will connect to in client mode)
|
||||
* This must be called before initalize or GetTable
|
||||
@@ -130,47 +124,47 @@ public:
|
||||
/**
|
||||
* Gets the table with the specified key. If the table does not exist, a new table will be created.<br>
|
||||
* This will automatically initialize network tables if it has not been already
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @return the network table requested
|
||||
*/
|
||||
static NetworkTable* GetTable(std::string key);
|
||||
|
||||
|
||||
|
||||
NetworkTable(std::string path, NetworkTableProvider& provider);
|
||||
virtual ~NetworkTable();
|
||||
|
||||
|
||||
bool IsConnected();
|
||||
|
||||
bool IsServer();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void AddConnectionListener(IRemoteConnectionListener* listener, bool immediateNotify);
|
||||
|
||||
void RemoveConnectionListener(IRemoteConnectionListener* listener);
|
||||
|
||||
|
||||
|
||||
void AddTableListener(ITableListener* listener);
|
||||
|
||||
|
||||
|
||||
void AddTableListener(ITableListener* listener, bool immediateNotify);
|
||||
void AddTableListener(std::string key, ITableListener* listener, bool immediateNotify);
|
||||
void AddSubTableListener(ITableListener* listener);
|
||||
|
||||
void RemoveTableListener(ITableListener* listener);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns the table at the specified key. If there is no table at the
|
||||
* specified key, it will create a new table
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @return the networktable to be returned
|
||||
@@ -180,19 +174,19 @@ public:
|
||||
|
||||
/**
|
||||
* Checks the table and tells if it contains the specified key
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key to be checked
|
||||
*/
|
||||
bool ContainsKey(std::string key);
|
||||
|
||||
|
||||
bool ContainsSubTable(std::string key);
|
||||
|
||||
/**
|
||||
* Maps the specified key to the specified value in this table. The key can
|
||||
* not be null. The value can be retrieved by calling the get method with a
|
||||
* key that is equal to the original key.
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key
|
||||
* @param value
|
||||
@@ -202,7 +196,7 @@ public:
|
||||
|
||||
/**
|
||||
* Returns the key that the name maps to.
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @return the key
|
||||
@@ -214,7 +208,7 @@ public:
|
||||
/**
|
||||
* Returns the key that the name maps to. If the key is null, it will return
|
||||
* the default value
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @param defaultValue
|
||||
@@ -227,7 +221,7 @@ public:
|
||||
* Maps the specified key to the specified value in this table. The key can
|
||||
* not be null. The value can be retrieved by calling the get method with a
|
||||
* key that is equal to the original key.
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key
|
||||
* @param value
|
||||
@@ -237,7 +231,7 @@ public:
|
||||
|
||||
/**
|
||||
* Returns the key that the name maps to.
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @return the key
|
||||
@@ -249,7 +243,7 @@ public:
|
||||
/**
|
||||
* Returns the key that the name maps to. If the key is null, it will return
|
||||
* the default value
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @param defaultValue
|
||||
@@ -262,7 +256,7 @@ public:
|
||||
* Maps the specified key to the specified value in this table. The key can
|
||||
* not be null. The value can be retrieved by calling the get method with a
|
||||
* key that is equal to the original key.
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key
|
||||
* @param value
|
||||
@@ -272,7 +266,7 @@ public:
|
||||
|
||||
/**
|
||||
* Returns the key that the name maps to.
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @return the key
|
||||
@@ -284,7 +278,7 @@ public:
|
||||
/**
|
||||
* Returns the key that the name maps to. If the key is null, it will return
|
||||
* the default value
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @param defaultValue
|
||||
@@ -292,28 +286,28 @@ public:
|
||||
* @return the key
|
||||
*/
|
||||
bool GetBoolean(std::string key, bool defaultValue);
|
||||
|
||||
|
||||
|
||||
void PutValue(std::string key, NetworkTableEntryType* type, EntryValue value);
|
||||
|
||||
|
||||
|
||||
void RetrieveValue(std::string key, ComplexData& externalValue);
|
||||
|
||||
|
||||
/**
|
||||
* Maps the specified key to the specified value in this table. The key can
|
||||
* not be null. The value can be retrieved by calling the get method with a
|
||||
* key that is equal to the original key.
|
||||
*
|
||||
*
|
||||
* @param key the key name
|
||||
* @param value the value to be put
|
||||
*/
|
||||
void PutValue(std::string key, ComplexData& value);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the key that the name maps to.
|
||||
* NOTE: If the value is a double, it will return a Double object,
|
||||
* not a primitive. To get the primitive, use GetDouble
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @return the key
|
||||
@@ -321,13 +315,13 @@ public:
|
||||
* if the specified key is null
|
||||
*/
|
||||
EntryValue GetValue(std::string key);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the key that the name maps to. If the key is null, it will return
|
||||
* the default value
|
||||
* NOTE: If the value is a double, it will return a Double object,
|
||||
* not a primitive. To get the primitive, use GetDouble
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* the key name
|
||||
* @param defaultValue
|
||||
|
||||
@@ -10,22 +10,20 @@ class NetworkTableProvider;
|
||||
#include "networktables2/NetworkTableNode.h"
|
||||
#include "networktables/NetworkTable.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class NetworkTableProvider : public ITableProvider
|
||||
{
|
||||
private:
|
||||
NetworkTableNode& node;
|
||||
map<std::string, NetworkTable*> tables;
|
||||
std::map<std::string, NetworkTable*> tables;
|
||||
|
||||
/**
|
||||
* Create a new NetworkTableProvider for a given NetworkTableNode
|
||||
* @param node the node that handles the actual network table
|
||||
* @param node the node that handles the actual network table
|
||||
*/
|
||||
public:
|
||||
NetworkTableProvider(NetworkTableNode& node);
|
||||
virtual ~NetworkTableProvider();
|
||||
|
||||
|
||||
ITable* GetRootTable();
|
||||
|
||||
ITable* GetTable(std::string key);
|
||||
|
||||
@@ -18,19 +18,17 @@ class NetworkTableSubListenerAdapter;
|
||||
#include "networktables/NetworkTable.h"
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
class NetworkTableSubListenerAdapter : public ITableListener{
|
||||
private:
|
||||
std::string& prefix;
|
||||
NetworkTable* targetSource;
|
||||
ITableListener* targetListener;
|
||||
set<std::string> notifiedTables;
|
||||
std::set<std::string> notifiedTables;
|
||||
|
||||
public:
|
||||
NetworkTableSubListenerAdapter(std::string& prefix, NetworkTable* targetSource, ITableListener* targetListener);
|
||||
virtual ~NetworkTableSubListenerAdapter();
|
||||
void ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew);
|
||||
void ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -4,19 +4,17 @@
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* A simple cache that allows for caching the mapping of one string to another calculated one
|
||||
*
|
||||
*
|
||||
* @author Mitchell
|
||||
*
|
||||
*/
|
||||
class StringCache {
|
||||
private:
|
||||
map<std::string, std::string> cache;
|
||||
std::map<std::string, std::string> cache;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param input
|
||||
* @return the value for a given input
|
||||
@@ -24,10 +22,10 @@ private:
|
||||
public:
|
||||
StringCache();
|
||||
virtual ~StringCache();
|
||||
|
||||
|
||||
|
||||
|
||||
std::string& Get(const std::string& input);
|
||||
|
||||
|
||||
/**
|
||||
* Will only be called if a value has not already been calculated
|
||||
* @param input
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "networktables/NetworkTableListenerAdapter.h"
|
||||
#include "networktables/NetworkTableSubListenerAdapter.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
const char NetworkTable::PATH_SEPARATOR_CHAR = '/';
|
||||
const std::string NetworkTable::PATH_SEPARATOR("/");
|
||||
@@ -53,7 +54,7 @@ void NetworkTable::Initialize() {
|
||||
printf("[NT] ...NetworkTable::Initialize().\n");
|
||||
}
|
||||
|
||||
void NetworkTable::Shutdown()
|
||||
void NetworkTable::Shutdown()
|
||||
{
|
||||
if (staticProvider!=NULL)
|
||||
{
|
||||
@@ -188,7 +189,7 @@ void NetworkTable::RemoveTableListener(ITableListener* listener) {
|
||||
}
|
||||
|
||||
NetworkTableEntry* NetworkTable::GetEntry(std::string key){
|
||||
{
|
||||
{
|
||||
NTSynchronized sync(LOCK);
|
||||
return entryCache.Get(key);
|
||||
}
|
||||
@@ -196,7 +197,7 @@ NetworkTableEntry* NetworkTable::GetEntry(std::string key){
|
||||
|
||||
|
||||
NetworkTable* NetworkTable::GetSubTable(std::string key) {
|
||||
{
|
||||
{
|
||||
NTSynchronized sync(LOCK);
|
||||
return (NetworkTable*)provider.GetTable(absoluteKeyCache.Get(key));
|
||||
}
|
||||
@@ -206,7 +207,7 @@ NetworkTable* NetworkTable::GetSubTable(std::string key) {
|
||||
bool NetworkTable::ContainsKey(std::string key) {
|
||||
return node.ContainsKey(absoluteKeyCache.Get(key));
|
||||
}
|
||||
|
||||
|
||||
bool NetworkTable::ContainsSubTable(std::string key){
|
||||
std::string subtablePrefix(absoluteKeyCache.Get(key));
|
||||
subtablePrefix+=PATH_SEPARATOR;
|
||||
@@ -337,4 +338,3 @@ EntryCache::~EntryCache(){}
|
||||
NetworkTableEntry* EntryCache::Get(std::string& key){
|
||||
return cache[key];
|
||||
}
|
||||
|
||||
|
||||
3
ni-libraries/libwpi.so
Normal file
3
ni-libraries/libwpi.so
Normal file
@@ -0,0 +1,3 @@
|
||||
/* GNU ld script */
|
||||
OUTPUT_FORMAT(elf32-littlearm)
|
||||
INPUT ( -lwpi_2015 )
|
||||
3
ni-libraries/libwpi_2015.so
Normal file
3
ni-libraries/libwpi_2015.so
Normal file
@@ -0,0 +1,3 @@
|
||||
/* GNU ld script */
|
||||
OUTPUT_FORMAT(elf32-littlearm)
|
||||
GROUP ( AS_NEEDED ( -lwpilib_nonshared -lHALAthena -lNetworkTables -lFRC_NetworkCommunication -li2c -lni_emb -lNiFpgaLv -lNiFpga -lnirio_emb_can -lNiRioSrv -lni_rtlog -lRoboRIO_FRC_ChipObject -lspi -lvisa -ldl -lpthread -lrt ) )
|
||||
@@ -27,17 +27,17 @@ allwpilib:
|
||||
cd $(allwpilib) && mvn -T 8 clean package -Dwith-eclipse-plugins -DskipTests -DskipIT
|
||||
|
||||
orig: orig-frcsim-gazebo-plugins orig-frcsim-gazebo-models orig-frcsim-eclipse-plugins \
|
||||
orig-frcsim-eclipse-toolchain-plugin orig-frcsim-libwpilibsim-cpp orig-frcsim
|
||||
orig-frcsim-libwpilibsim-cpp orig-frcsim
|
||||
|
||||
debs: debs-frcsim-gazebo-plugins debs-frcsim-gazebo-models debs-frcsim-eclipse-plugins \
|
||||
debs-frcsim-eclipse-toolchain-plugin debs-frcsim-libwpilibsim-cpp debs-frcsim
|
||||
debs-frcsim-libwpilibsim-cpp debs-frcsim
|
||||
|
||||
update-repository: debs clean-repository
|
||||
cd repository && reprepro includedeb $(codename) ../frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb
|
||||
cd repository && reprepro includedeb $(codename) ../frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_i386.deb
|
||||
cd repository && reprepro includedeb $(codename) ../frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb
|
||||
cd repository && reprepro includedeb $(codename) ../frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb
|
||||
cd repository && reprepro includedeb $(codename) ../frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb
|
||||
# cd repository && reprepro includedeb $(codename) ../frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb
|
||||
cd repository && reprepro includedeb $(codename) ../frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb
|
||||
cd repository && reprepro includedeb $(codename) ../frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_i386.deb
|
||||
cd repository && reprepro includedeb $(codename) ../frcsim/frcsim_$(frcsim-package-version)_all.deb
|
||||
@@ -47,7 +47,7 @@ clean-repository:
|
||||
cd repository && reprepro remove $(codename) frcsim-gazebo-plugins
|
||||
cd repository && reprepro remove $(codename) frcsim-gazebo-models
|
||||
cd repository && reprepro remove $(codename) frcsim-eclipse-plugins
|
||||
cd repository && reprepro remove $(codename) frcsim-eclipse-toolchain-plugin
|
||||
# cd repository && reprepro remove $(codename) frcsim-eclipse-toolchain-plugin
|
||||
cd repository && reprepro remove $(codename) frcsim-libwpilibsim-cpp
|
||||
cd repository && reprepro remove $(codename) frcsim
|
||||
|
||||
@@ -72,7 +72,7 @@ install:
|
||||
sudo dpkg -i frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb \
|
||||
frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb \
|
||||
frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb \
|
||||
frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb \
|
||||
# frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb \
|
||||
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb \
|
||||
frcsim/frcsim_$(frcsim-package-version)_all.deb
|
||||
|
||||
@@ -133,13 +133,18 @@ frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolch
|
||||
|
||||
orig-frcsim-libwpilibsim-cpp: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz
|
||||
pull-libwpilibsim-cpp:
|
||||
cp -rf -t frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/ $(allwpilib)/wpilibc/wpilibC++Sim/*
|
||||
mkdir -p frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib
|
||||
cp -rf $(allwpilib)/hal frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib
|
||||
mkdir -p frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/networktables
|
||||
cp -rf $(allwpilib)/networktables/cpp frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/networktables
|
||||
mkdir -p frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/wpilibc
|
||||
cp -r $(allwpilib)/wpilibc/wpilibC++ frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/wpilibc
|
||||
cp -r $(allwpilib)/wpilibc/wpilibC++ frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/wpilibc/wpilibC++
|
||||
cp -r $(allwpilib)/wpilibc/wpilibC++Sim frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/allwpilib/wpilibc/wpilibC++Sim
|
||||
echo 'cmake_minimum_required(VERSION 2.8)' > frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/CMakeLists.txt
|
||||
echo 'project(WPILibSim)' >> frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/CMakeLists.txt
|
||||
echo 'add_subdirectory(allwpilib/wpilibc/wpilibC++Sim)' >> frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/CMakeLists.txt
|
||||
|
||||
|
||||
echo Increment version?
|
||||
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz: pull-libwpilibsim-cpp
|
||||
cd frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp && debuild clean
|
||||
@@ -179,7 +184,6 @@ frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolch
|
||||
|
||||
debs-frcsim-libwpilibsim-cpp: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_i386.deb
|
||||
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_i386.deb: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb
|
||||
cd frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp && make clean
|
||||
cd frcsim-libwpilibsim-cpp && sbuild --arch=i386 -A -d trusty-i386 frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version).dsc
|
||||
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz
|
||||
cd frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp && debuild --no-lintian -us -uc -aamd64
|
||||
|
||||
@@ -7,7 +7,7 @@ Build-Depends: debhelper (>= 9)
|
||||
|
||||
Package: frcsim-eclipse-plugins
|
||||
Architecture: all
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, eclipse, eclipse-jdt, eclipse-cdt, eclipse-rse, eclipse-cdt-launch-remote, frcsim-eclipse-toolchain-plugin, g++, libwebkitgtk-1.0-0, frcsim-libwpilibsim-cpp
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, eclipse, eclipse-jdt, eclipse-cdt, eclipse-rse, eclipse-cdt-launch-remote, g++, libwebkitgtk-1.0-0, frcsim-libwpilibsim-cpp
|
||||
Description: FRC plugin for developing code for RoboRIO and WPILibSim.
|
||||
This plugin allows the usage of eclipse for development of WPILib
|
||||
robot code for the RoboRIO and simulation in gazebo.
|
||||
@@ -1,11 +1,13 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
export DH_OPTIONS
|
||||
|
||||
export DESTDIR=$$(pwd)/debian/frcsim-libwpilibsim-cpp
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_build:
|
||||
$(MAKE) allwpilib=allwpilib
|
||||
|
||||
override_dh_auto_install:
|
||||
$(MAKE) DESTDIR=$$(pwd)/debian/frcsim-libwpilibsim-cpp allwpilib=allwpilib install
|
||||
|
||||
override_dh_strip:
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
project(WPILibC++)
|
||||
|
||||
file(GLOB_RECURSE SRC_FILES src/*.cpp)
|
||||
include_directories(include/ ${NWT_API_INCLUDES} ${HAL_API_INCLUDES})
|
||||
add_library(WPILib STATIC ${SRC_FILES})
|
||||
target_link_libraries(WPILib)
|
||||
INSTALL(TARGETS WPILib ARCHIVE DESTINATION lib COMPONENT lib)
|
||||
INSTALL(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT headers)
|
||||
# lib/ c m gcc_s ld-linux
|
||||
# usr/lib stdc++
|
||||
# ni_emb
|
||||
# HAL NWT
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ public:
|
||||
void Run();
|
||||
void Remove(Command *command);
|
||||
void RemoveAll();
|
||||
void ResetAll();
|
||||
void SetEnabled(bool enabled);
|
||||
|
||||
void UpdateTable();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "Task.h"
|
||||
#include "HAL/cpp/Synchronized.hpp"
|
||||
|
||||
typedef void (*TimerEventHandler)(void *param);
|
||||
typedef void *(*TimerEventHandler)(void *param);
|
||||
|
||||
class Notifier : public ErrorBase
|
||||
{
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
private:
|
||||
static Notifier *timerQueueHead;
|
||||
static ReentrantSemaphore queueSemaphore;
|
||||
static void* m_notifier;
|
||||
static int refcount;
|
||||
|
||||
static void ProcessQueue(uint32_t mask, void *params); // process the timer queue on a timer event
|
||||
|
||||
@@ -69,6 +69,7 @@ private:
|
||||
float m_minimumInput; // minimum input - limit setpoint to this
|
||||
bool m_continuous; // do the endpoints wrap around? eg. Absolute encoder
|
||||
bool m_enabled; //is the pid controller enabled
|
||||
bool m_destruct; // should the calculate thread stop running
|
||||
float m_prevError; // the prior sensor input (used to compute velocity)
|
||||
double m_totalError; //the sum of the errors for use in the integral calc
|
||||
enum
|
||||
@@ -88,12 +89,16 @@ private:
|
||||
PIDSource *m_pidInput;
|
||||
PIDOutput *m_pidOutput;
|
||||
|
||||
#ifndef FRC_SIMULATOR
|
||||
pthread_t m_controlLoop;
|
||||
#else
|
||||
Notifier* m_controlLoop;
|
||||
#endif
|
||||
pthread_mutex_t m_mutex;
|
||||
|
||||
void Initialize(float p, float i, float d, float f, PIDSource *source, PIDOutput *output,
|
||||
float period = 0.05);
|
||||
static void CallCalculate(void *controller);
|
||||
static void *CallCalculate(void *controller);
|
||||
|
||||
virtual ITable* GetTable();
|
||||
virtual std::string GetSmartDashboardType();
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
#ifdef WPI_ERRORS_DEFINE_STRINGS
|
||||
#define S(label, offset, message) const char *wpi_error_s_##label = message ; \
|
||||
const int32_t wpi_error_value_##label = offset ;
|
||||
const int32_t wpi_error_value_##label = offset
|
||||
#else
|
||||
#define S(label, offset, message) extern const char *wpi_error_s_##label ; \
|
||||
const int32_t wpi_error_value_##label = offset ;
|
||||
const int32_t wpi_error_value_##label = offset
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "RobotState.h"
|
||||
#include "Timer.h"
|
||||
#include "WPIErrors.h"
|
||||
#include <typeinfo>
|
||||
|
||||
static const char *kName = "name";
|
||||
static const char *kRunning = "running";
|
||||
@@ -29,17 +30,7 @@ void Command::InitCommand(const char *name, double timeout)
|
||||
m_canceled = false;
|
||||
m_runWhenDisabled = false;
|
||||
m_parent = NULL;
|
||||
if (name == NULL)
|
||||
{
|
||||
// Don't have a way to find the subclass name like java, so use the address
|
||||
char buf[32];
|
||||
snprintf(buf, 32, "Command_%p", this);
|
||||
m_name = buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_name = name;
|
||||
}
|
||||
m_name = name == NULL? std::string() : name;
|
||||
m_table = NULL;
|
||||
}
|
||||
|
||||
@@ -437,6 +428,10 @@ bool Command::WillRunWhenDisabled()
|
||||
|
||||
std::string Command::GetName()
|
||||
{
|
||||
if (m_name.length() == 0)
|
||||
{
|
||||
m_name = std::string("Command_") + std::string(typeid(*this).name());
|
||||
}
|
||||
return m_name;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,10 @@ Scheduler::Scheduler() :
|
||||
|
||||
m_table = NULL;
|
||||
m_enabled = true;
|
||||
m_runningCommandsChanged = false;
|
||||
toCancel = NULL;
|
||||
commands = NULL;
|
||||
ids = NULL;
|
||||
}
|
||||
|
||||
Scheduler::~Scheduler() {
|
||||
@@ -215,6 +219,19 @@ void Scheduler::RemoveAll() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Completely resets the scheduler. Undefined behavior if running.
|
||||
*/
|
||||
void Scheduler::ResetAll()
|
||||
{
|
||||
RemoveAll();
|
||||
m_subsystems.clear();
|
||||
m_buttons.clear();
|
||||
m_additions.clear();
|
||||
m_commands.clear();
|
||||
m_table = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the network tables associated with the Scheduler object on the SmartDashboard
|
||||
*/
|
||||
|
||||
@@ -7,36 +7,36 @@ void RobotState::SetImplementation(RobotStateInterface* i) {
|
||||
}
|
||||
|
||||
bool RobotState::IsDisabled() {
|
||||
if (impl != 0) {
|
||||
if (impl != nullptr) {
|
||||
return impl->IsDisabled();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RobotState::IsEnabled() {
|
||||
if (impl != 0) {
|
||||
impl->IsEnabled();
|
||||
if (impl != nullptr) {
|
||||
return impl->IsEnabled();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RobotState::IsOperatorControl() {
|
||||
if (impl != 0) {
|
||||
impl->IsOperatorControl();
|
||||
if (impl != nullptr) {
|
||||
return impl->IsOperatorControl();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RobotState::IsAutonomous() {
|
||||
if (impl != 0) {
|
||||
impl->IsAutonomous();
|
||||
if (impl != nullptr) {
|
||||
return impl->IsAutonomous();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RobotState::IsTest() {
|
||||
if (impl != 0) {
|
||||
impl->IsTest();
|
||||
if (impl != nullptr) {
|
||||
return impl->IsTest();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ project(WPILibC++Devices)
|
||||
|
||||
file(GLOB_RECURSE SRC_FILES src/*.cpp)
|
||||
include_directories(include/ ${WPILIB_INCLUDES} ${HAL_API_INCLUDES} ${NWT_API_INCLUDES})
|
||||
add_library(WPILibAthena STATIC ${SRC_FILES})
|
||||
target_link_libraries(WPILibAthena WPILib HALAthena NetworkTables ${NI_LIBS})
|
||||
INSTALL(TARGETS WPILibAthena ARCHIVE DESTINATION lib COMPONENT lib)
|
||||
add_library(wpilib_nonshared STATIC ${SRC_FILES} ${COM_SRC_FILES})
|
||||
target_link_libraries(wpilib_nonshared HALAthena NetworkTables ${NI_LIBS})
|
||||
INSTALL(TARGETS wpilib_nonshared ARCHIVE DESTINATION lib COMPONENT lib)
|
||||
INSTALL(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT headers)
|
||||
# lib/ c m gcc_s ld-linux
|
||||
# usr/lib stdc++
|
||||
|
||||
@@ -68,6 +68,8 @@ public:
|
||||
explicit CANJaguar(uint8_t deviceNumber);
|
||||
virtual ~CANJaguar();
|
||||
|
||||
uint8_t getDeviceNumber() const;
|
||||
|
||||
// SpeedController interface
|
||||
virtual float Get();
|
||||
virtual void Set(float value, uint8_t syncGroup=0);
|
||||
|
||||
@@ -20,7 +20,7 @@ class DigitalInput : public DigitalSource, public LiveWindowSendable
|
||||
public:
|
||||
explicit DigitalInput(uint32_t channel);
|
||||
virtual ~DigitalInput();
|
||||
uint32_t Get();
|
||||
bool Get();
|
||||
uint32_t GetChannel();
|
||||
|
||||
// Digital Source Interface
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "SensorBase.h"
|
||||
#include "RobotState.h"
|
||||
#include "Task.h"
|
||||
#include "HAL/HAL.hpp"
|
||||
|
||||
struct HALControlWord;
|
||||
class AnalogInput;
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) FIRST 2008. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
#pragma once
|
||||
|
||||
#include "HAL/HAL.hpp"
|
||||
#include "ErrorBase.h"
|
||||
#include "HAL/cpp/Synchronized.hpp"
|
||||
|
||||
typedef void (*TimerEventHandler)(void *param);
|
||||
|
||||
class Notifier : public ErrorBase
|
||||
{
|
||||
public:
|
||||
Notifier(TimerEventHandler handler, void *param = NULL);
|
||||
virtual ~Notifier();
|
||||
void StartSingle(double delay);
|
||||
void StartPeriodic(double period);
|
||||
void Stop();
|
||||
private:
|
||||
static Notifier *timerQueueHead;
|
||||
static ReentrantSemaphore queueSemaphore;
|
||||
static void* m_notifier;
|
||||
static int refcount;
|
||||
|
||||
static void ProcessQueue(uint32_t mask, void *params); // process the timer queue on a timer event
|
||||
static void UpdateAlarm(); // update the FPGA alarm since the queue has changed
|
||||
void InsertInQueue(bool reschedule); // insert this Notifier in the timer queue
|
||||
void DeleteFromQueue(); // delete this Notifier from the timer queue
|
||||
TimerEventHandler m_handler; // address of the handler
|
||||
void *m_param; // a parameter to pass to the handler
|
||||
double m_period; // the relative time (either periodic or single)
|
||||
double m_expirationTime; // absolute expiration time for the current event
|
||||
Notifier *m_nextEvent; // next Nofifier event
|
||||
bool m_periodic; // true if this is a periodic event
|
||||
bool m_queued; // indicates if this entry is queued
|
||||
SEMAPHORE_ID m_handlerSemaphore; // held by interrupt manager task while handler call is in progress
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Notifier);
|
||||
};
|
||||
@@ -1,108 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) FIRST 2008. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
#pragma once
|
||||
|
||||
#include "Base.h"
|
||||
#include "Controller.h"
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
#include <pthread.h>
|
||||
|
||||
class PIDOutput;
|
||||
class PIDSource;
|
||||
class Notifier;
|
||||
|
||||
/**
|
||||
* Class implements a PID Control Loop.
|
||||
*
|
||||
* Creates a separate thread which reads the given PIDSource and takes
|
||||
* care of the integral calculations, as well as writing the given
|
||||
* PIDOutput
|
||||
*/
|
||||
class PIDController : public LiveWindowSendable, public Controller, public ITableListener
|
||||
{
|
||||
public:
|
||||
PIDController(float p, float i, float d, PIDSource *source, PIDOutput *output, float period =
|
||||
0.05);
|
||||
PIDController(float p, float i, float d, float f, PIDSource *source, PIDOutput *output,
|
||||
float period = 0.05);
|
||||
virtual ~PIDController();
|
||||
virtual float Get();
|
||||
virtual void SetContinuous(bool continuous = true);
|
||||
virtual void SetInputRange(float minimumInput, float maximumInput);
|
||||
virtual void SetOutputRange(float mimimumOutput, float maximumOutput);
|
||||
virtual void SetPID(float p, float i, float d);
|
||||
virtual void SetPID(float p, float i, float d, float f);
|
||||
virtual float GetP();
|
||||
virtual float GetI();
|
||||
virtual float GetD();
|
||||
virtual float GetF();
|
||||
|
||||
virtual void SetSetpoint(float setpoint);
|
||||
virtual float GetSetpoint();
|
||||
|
||||
virtual float GetError();
|
||||
|
||||
virtual void SetTolerance(float percent);
|
||||
virtual void SetAbsoluteTolerance(float absValue);
|
||||
virtual void SetPercentTolerance(float percentValue);
|
||||
virtual bool OnTarget();
|
||||
|
||||
virtual void Enable();
|
||||
virtual void Disable();
|
||||
virtual bool IsEnabled();
|
||||
|
||||
virtual void Reset();
|
||||
|
||||
virtual void InitTable(ITable* table);
|
||||
|
||||
private:
|
||||
float m_P; // factor for "proportional" control
|
||||
float m_I; // factor for "integral" control
|
||||
float m_D; // factor for "derivative" control
|
||||
float m_F; // factor for "feed forward" control
|
||||
float m_maximumOutput; // |maximum output|
|
||||
float m_minimumOutput; // |minimum output|
|
||||
float m_maximumInput; // maximum input - limit setpoint to this
|
||||
float m_minimumInput; // minimum input - limit setpoint to this
|
||||
bool m_continuous; // do the endpoints wrap around? eg. Absolute encoder
|
||||
bool m_enabled; //is the pid controller enabled
|
||||
bool m_destruct; // should the calculate thread stop running
|
||||
float m_prevError; // the prior sensor input (used to compute velocity)
|
||||
double m_totalError; //the sum of the errors for use in the integral calc
|
||||
enum
|
||||
{
|
||||
kAbsoluteTolerance,
|
||||
kPercentTolerance,
|
||||
kNoTolerance
|
||||
} m_toleranceType;
|
||||
float m_tolerance; //the percetage or absolute error that is considered on target
|
||||
float m_setpoint;
|
||||
float m_error;
|
||||
float m_result;
|
||||
float m_period;
|
||||
|
||||
PIDSource *m_pidInput;
|
||||
PIDOutput *m_pidOutput;
|
||||
|
||||
pthread_t m_controlLoop;
|
||||
pthread_mutex_t m_mutex;
|
||||
|
||||
void Initialize(float p, float i, float d, float f, PIDSource *source, PIDOutput *output,
|
||||
float period = 0.05);
|
||||
static void *CallCalculate(void *controller);
|
||||
|
||||
virtual ITable* GetTable();
|
||||
virtual std::string GetSmartDashboardType();
|
||||
virtual void ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew);
|
||||
virtual void UpdateTable();
|
||||
virtual void StartLiveWindowMode();
|
||||
virtual void StopLiveWindowMode();
|
||||
protected:
|
||||
ITable* m_table;
|
||||
void Calculate();
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(PIDController);
|
||||
};
|
||||
@@ -40,6 +40,7 @@ public:
|
||||
virtual void SetRaw(unsigned short value);
|
||||
virtual unsigned short GetRaw();
|
||||
void SetPeriodMultiplier(PeriodMultiplier mult);
|
||||
void SetZeroLatch();
|
||||
void EnableDeadbandElimination(bool eliminateDeadband);
|
||||
void SetBounds(int32_t max, int32_t deadbandMax, int32_t center, int32_t deadbandMin,
|
||||
int32_t min);
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) FIRST 2008. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
#pragma once
|
||||
|
||||
#include "ErrorBase.h"
|
||||
#include "HAL/HAL.hpp"
|
||||
|
||||
/**
|
||||
* WPI task is a wrapper for the native Task object.
|
||||
* All WPILib tasks are managed by a static task manager for simplified cleanup.
|
||||
**/
|
||||
class Task : public ErrorBase
|
||||
{
|
||||
public:
|
||||
static const uint32_t kDefaultPriority = 101;
|
||||
|
||||
Task(const char* name, FUNCPTR function, int32_t priority = kDefaultPriority,
|
||||
uint32_t stackSize = 20000);
|
||||
virtual ~Task();
|
||||
|
||||
bool Start(uint32_t arg0 = 0, uint32_t arg1 = 0, uint32_t arg2 = 0, uint32_t arg3 = 0,
|
||||
uint32_t arg4 = 0, uint32_t arg5 = 0, uint32_t arg6 = 0, uint32_t arg7 = 0,
|
||||
uint32_t arg8 = 0, uint32_t arg9 = 0);
|
||||
bool Restart();
|
||||
bool Stop();
|
||||
|
||||
bool IsReady();
|
||||
bool IsSuspended();
|
||||
|
||||
bool Suspend();
|
||||
bool Resume();
|
||||
|
||||
bool Verify();
|
||||
|
||||
int32_t GetPriority();
|
||||
bool SetPriority(int32_t priority);
|
||||
const char* GetName();
|
||||
TASK GetID();
|
||||
|
||||
private:
|
||||
FUNCPTR m_function;
|
||||
char* m_taskName;
|
||||
TASK m_taskID;
|
||||
uint32_t m_stackSize;
|
||||
int m_priority;
|
||||
bool HandleError(STATUS results);
|
||||
DISALLOW_COPY_AND_ASSIGN(Task);
|
||||
};
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Copyright (c) FIRST 2008. All Rights Reserved. */
|
||||
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
||||
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
|
||||
/*----------------------------------------------------------------------------*/
|
||||
#pragma once
|
||||
|
||||
#include "HAL/Semaphore.hpp"
|
||||
#include "Base.h"
|
||||
|
||||
typedef void (*TimerInterruptHandler)(void *param);
|
||||
|
||||
void Wait(double seconds);
|
||||
double GetClock();
|
||||
double GetTime();
|
||||
|
||||
/**
|
||||
* Timer objects measure accumulated time in seconds.
|
||||
* The timer object functions like a stopwatch. It can be started, stopped, and cleared. When the
|
||||
* timer is running its value counts up in seconds. When stopped, the timer holds the current
|
||||
* value. The implementation simply records the time when started and subtracts the current time
|
||||
* whenever the value is requested.
|
||||
*/
|
||||
class Timer
|
||||
{
|
||||
public:
|
||||
Timer();
|
||||
virtual ~Timer();
|
||||
double Get();
|
||||
void Reset();
|
||||
void Start();
|
||||
void Stop();
|
||||
bool HasPeriodPassed(double period);
|
||||
|
||||
static double GetFPGATimestamp();
|
||||
static double GetPPCTimestamp();
|
||||
|
||||
private:
|
||||
double m_startTime;
|
||||
double m_accumulatedTime;
|
||||
bool m_running;
|
||||
MUTEX_ID m_semaphore;
|
||||
DISALLOW_COPY_AND_ASSIGN(Timer);
|
||||
};
|
||||
@@ -274,6 +274,14 @@ CANJaguar::~CANJaguar()
|
||||
m_safetyHelper = NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return The CAN ID passed in the constructor
|
||||
*/
|
||||
uint8_t CANJaguar::getDeviceNumber() const
|
||||
{
|
||||
return m_deviceNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the output set-point value.
|
||||
*
|
||||
@@ -1829,10 +1837,9 @@ void CANJaguar::ConfigNeutralMode(NeutralMode mode)
|
||||
void CANJaguar::ConfigEncoderCodesPerRev(uint16_t codesPerRev)
|
||||
{
|
||||
uint8_t dataBuffer[8];
|
||||
uint8_t dataSize;
|
||||
|
||||
// Set the codes per revolution mode
|
||||
dataSize = packint16_t(dataBuffer, codesPerRev);
|
||||
packint16_t(dataBuffer, codesPerRev);
|
||||
sendMessage(LM_API_CFG_ENC_LINES, dataBuffer, sizeof(uint16_t));
|
||||
|
||||
m_encoderCodesPerRev = codesPerRev;
|
||||
|
||||
@@ -69,7 +69,7 @@ DigitalInput::~DigitalInput()
|
||||
* Get the value from a digital input channel.
|
||||
* Retrieve the value of a single digital input channel from the FPGA.
|
||||
*/
|
||||
uint32_t DigitalInput::Get()
|
||||
bool DigitalInput::Get()
|
||||
{
|
||||
int32_t status = 0;
|
||||
bool value = getDIO(m_digital_ports[m_channel], &status);
|
||||
|
||||
@@ -179,7 +179,7 @@ float DriverStation::GetBatteryVoltage()
|
||||
*/
|
||||
float DriverStation::GetStickAxis(uint32_t stick, uint32_t axis)
|
||||
{
|
||||
if (stick < 1 || stick > kJoystickPorts)
|
||||
if (stick >= kJoystickPorts)
|
||||
{
|
||||
wpi_setWPIError(BadJoystickIndex);
|
||||
return 0;
|
||||
@@ -191,7 +191,7 @@ float DriverStation::GetStickAxis(uint32_t stick, uint32_t axis)
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
int8_t value = m_joystickAxes[stick - 1].axes[axis - 1];
|
||||
int8_t value = m_joystickAxes[stick].axes[axis - 1];
|
||||
|
||||
if(value < 0)
|
||||
{
|
||||
@@ -212,13 +212,13 @@ float DriverStation::GetStickAxis(uint32_t stick, uint32_t axis)
|
||||
*/
|
||||
short DriverStation::GetStickButtons(uint32_t stick)
|
||||
{
|
||||
if (stick < 1 || stick > kJoystickPorts)
|
||||
if (stick >= kJoystickPorts)
|
||||
{
|
||||
wpi_setWPIError(BadJoystickIndex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return m_joystickButtons[stick - 1];
|
||||
return m_joystickButtons[stick];
|
||||
}
|
||||
|
||||
bool DriverStation::IsEnabled()
|
||||
|
||||
@@ -26,6 +26,7 @@ void Jaguar::InitJaguar()
|
||||
SetBounds(2.31, 1.55, 1.507, 1.454, .697);
|
||||
SetPeriodMultiplier(kPeriodMultiplier_1X);
|
||||
SetRaw(m_centerPwm);
|
||||
SetZeroLatch();
|
||||
|
||||
HALReport(HALUsageReporting::kResourceType_Jaguar, GetChannel());
|
||||
LiveWindow::GetInstance()->AddActuator("Jaguar", GetChannel(), this);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user