mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
Compare commits
168 Commits
test-tag
...
jenkins-re
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8079482820 | ||
|
|
0b828eec62 | ||
|
|
49e06bd13b | ||
|
|
eca4d36a4b | ||
|
|
4d2a720f47 | ||
|
|
591e1de721 | ||
|
|
dc09233fca | ||
|
|
037d3b2fb5 | ||
|
|
a3995a202d | ||
|
|
a71f07ed67 | ||
|
|
cb81aa6fe9 | ||
|
|
ace43a6a12 | ||
|
|
a4e8d65b71 | ||
|
|
bfd88f1dab | ||
|
|
a65cb500fb | ||
|
|
f27df43b5b | ||
|
|
7e9f183cf9 | ||
|
|
2f26361398 | ||
|
|
52ecbd38ac | ||
|
|
6089722c4f | ||
|
|
244ecd23ee | ||
|
|
8aeacac302 | ||
|
|
45021c7f3d | ||
|
|
857a1abb01 | ||
|
|
c11f194cbf | ||
|
|
8b806e11e2 | ||
|
|
ba5111b994 | ||
|
|
88bf4ee567 | ||
|
|
76295a5746 | ||
|
|
90a106ccfb | ||
|
|
0fcef94904 | ||
|
|
3f38f3e84f | ||
|
|
64abdb8223 | ||
|
|
aaa7eabd03 | ||
|
|
1cef27134e | ||
|
|
aaab77cdbc | ||
|
|
7e2c68214d | ||
|
|
ad906da673 | ||
|
|
a6ea51ad02 | ||
|
|
d72ee199fe | ||
|
|
19b2d05236 | ||
|
|
26d789b89f | ||
|
|
f50b058457 | ||
|
|
39da9d67ba | ||
|
|
b6475d0503 | ||
|
|
295f212c8e | ||
|
|
fa4a39dcc6 | ||
|
|
66c653a21f | ||
|
|
340a3d492c | ||
|
|
6710ac3a2f | ||
|
|
9e62e60e6f | ||
|
|
e6c56e4446 | ||
|
|
35f1aded63 | ||
|
|
4904e1dc2c | ||
|
|
28b9c18e22 | ||
|
|
a548b14b7e | ||
|
|
323022acfd | ||
|
|
1bcdd301eb | ||
|
|
21f728c802 | ||
|
|
49d440eccc | ||
|
|
00486e2ec2 | ||
|
|
a3115dac19 | ||
|
|
1f35670a18 | ||
|
|
d1d81e5e19 | ||
|
|
a7b166e3fd | ||
|
|
6c28e09662 | ||
|
|
8199fb28d8 | ||
|
|
f2920fd77f | ||
|
|
ebd9667ba6 | ||
|
|
3f0f7931b8 | ||
|
|
cad83ed3ca | ||
|
|
62d6579428 | ||
|
|
1d7b17a2ba | ||
|
|
738859c4ea | ||
|
|
127ff0ac0a | ||
|
|
472f51fc73 | ||
|
|
0f0850ca95 | ||
|
|
ab27f795b7 | ||
|
|
b16a037759 | ||
|
|
1e812ac4d9 | ||
|
|
ecc6815f68 | ||
|
|
ca9f5a676d | ||
|
|
debf9e0ee9 | ||
|
|
15abbb36c2 | ||
|
|
d9b974300f | ||
|
|
e60baf41a9 | ||
|
|
09cb3a22cd | ||
|
|
27ecd35834 | ||
|
|
ff6d180305 | ||
|
|
410b739c23 | ||
|
|
2144b853d1 | ||
|
|
f87c517e6d | ||
|
|
77dac9bd77 | ||
|
|
56cf287b39 | ||
|
|
dc970d9a6b | ||
|
|
da2ea9ea87 | ||
|
|
b1ace79379 | ||
|
|
2a8ade093a | ||
|
|
b7458e7ba6 | ||
|
|
3fddee51c2 | ||
|
|
21967fcb24 | ||
|
|
9b896eab70 | ||
|
|
f439adc2a3 | ||
|
|
67cb854676 | ||
|
|
ef7c554029 | ||
|
|
359b4ec86b | ||
|
|
21153fc63f | ||
|
|
daa8bd67ef | ||
|
|
e5e568fa73 | ||
|
|
c9f6fcd969 | ||
|
|
778620b0a9 | ||
|
|
d58c6f0c0f | ||
|
|
a14d854211 | ||
|
|
c5fc1dc5be | ||
|
|
cded5351df | ||
|
|
47169e0ce1 | ||
|
|
4ef798a0c0 | ||
|
|
7ec8d4e9a3 | ||
|
|
17e7fc8f20 | ||
|
|
023f955a56 | ||
|
|
52e358c180 | ||
|
|
7638e2b6e5 | ||
|
|
f9ab84d912 | ||
|
|
04fadb85f5 | ||
|
|
698b371b16 | ||
|
|
6dde2c2b4c | ||
|
|
8ba0eada17 | ||
|
|
bf5eaf657e | ||
|
|
3baaea5a44 | ||
|
|
2cc937f5e1 | ||
|
|
23b6a980c2 | ||
|
|
89b80db2d0 | ||
|
|
1f27d36884 | ||
|
|
125dfac8b4 | ||
|
|
4215d1c79b | ||
|
|
dddba82d18 | ||
|
|
78e2a8d1b9 | ||
|
|
687bc44ae5 | ||
|
|
c82a94b268 | ||
|
|
d407fe546f | ||
|
|
699949fdf4 | ||
|
|
6d89974016 | ||
|
|
e523157507 | ||
|
|
3eba1c4688 | ||
|
|
d466d17edd | ||
|
|
9dfd6bde9d | ||
|
|
eded28ebfa | ||
|
|
777dc2113d | ||
|
|
174f2c0e23 | ||
|
|
434caf81d7 | ||
|
|
9327170069 | ||
|
|
597e209c09 | ||
|
|
ad1ace1022 | ||
|
|
70d09de2e9 | ||
|
|
f7e1753e03 | ||
|
|
df3f3cc0e1 | ||
|
|
25308e2442 | ||
|
|
6b3e2690d0 | ||
|
|
ae10d43900 | ||
|
|
d4e377fc0e | ||
|
|
9126646fef | ||
|
|
d3f632486f | ||
|
|
268459206f | ||
|
|
df390c275d | ||
|
|
1742634a96 | ||
|
|
0f8f83500b | ||
|
|
d5c73c95dc | ||
|
|
ca7dc5d6ac |
158
.gitignore
vendored
158
.gitignore
vendored
@@ -1,21 +1,82 @@
|
||||
# WPIlib Specific
|
||||
|
||||
wpilibc/build/
|
||||
hal/build/
|
||||
networktables/cpp/build/
|
||||
build/
|
||||
networktables/OutlineViewer/nbproject/private
|
||||
*~
|
||||
target/
|
||||
dist/
|
||||
bin/
|
||||
.project
|
||||
.cproject
|
||||
.settings/
|
||||
.classpath
|
||||
**/dependency-reduced-pom.xml
|
||||
|
||||
#Java File extentions
|
||||
# Created by the jenkins test script
|
||||
test-reports
|
||||
|
||||
# Added by the users of vagrant
|
||||
jdk-7u45-linux-arm-vfp-sflt.gz
|
||||
|
||||
|
||||
|
||||
|
||||
# Created by http://www.gitignore.io
|
||||
|
||||
### Linux ###
|
||||
*~
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
|
||||
### Windows ###
|
||||
# Windows image file caches
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
|
||||
### OSX ###
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear on external disk
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
|
||||
### Java ###
|
||||
*.class
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
@@ -23,3 +84,90 @@ bin/
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
|
||||
### C++ ###
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
|
||||
### Maven ###
|
||||
target/
|
||||
pom.xml.tag
|
||||
pom.xml.releaseBackup
|
||||
pom.xml.versionsBackup
|
||||
pom.xml.next
|
||||
release.properties
|
||||
|
||||
|
||||
### CMake ###
|
||||
CMakeCache.txt
|
||||
CMakeFiles
|
||||
cmake_install.cmake
|
||||
install_manifest.txt
|
||||
|
||||
|
||||
### Gradle ###
|
||||
.gradle
|
||||
build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
|
||||
### Vagrant ###
|
||||
.vagrant/
|
||||
|
||||
|
||||
### Eclipse ###
|
||||
*.pydevproject
|
||||
.metadata
|
||||
.gradle
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# CDT-specific
|
||||
.cproject
|
||||
|
||||
# PDT-specific
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
@@ -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)
|
||||
|
||||
125
Vagrantfile
vendored
Normal file
125
Vagrantfile
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
# -*- mode: ruby -*-
|
||||
# vi: set ft=ruby :
|
||||
|
||||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
# All Vagrant configuration is done here. The most common configuration
|
||||
# options are documented and commented below. For a complete reference,
|
||||
# please see the online documentation at vagrantup.com.
|
||||
|
||||
# Every Vagrant virtual environment requires a box to build off of.
|
||||
config.vm.box = "puphpet/ubuntu1404-x64"
|
||||
|
||||
# Run the bootstrap.sh shell script to setup the enviroment
|
||||
config.vm.provision :shell, path: "bootstrap.sh"
|
||||
|
||||
# Disable automatic box update checking. If you disable this, then
|
||||
# boxes will only be checked for updates when the user runs
|
||||
# `vagrant box outdated`. This is not recommended.
|
||||
# config.vm.box_check_update = false
|
||||
|
||||
# Create a forwarded port mapping which allows access to a specific port
|
||||
# within the machine from a port on the host machine. In the example below,
|
||||
# accessing "localhost:8080" will access port 80 on the guest machine.
|
||||
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
||||
|
||||
# Create a private network, which allows host-only access to the machine
|
||||
# using a specific IP.
|
||||
# config.vm.network "private_network", ip: "192.168.33.10"
|
||||
|
||||
# Create a public network, which generally matched to bridged network.
|
||||
# Bridged networks make the machine appear as another physical device on
|
||||
# your network.
|
||||
config.vm.network "public_network", bridge: 'en0'
|
||||
|
||||
# If true, then any SSH connections made will enable agent forwarding.
|
||||
# Default value: false
|
||||
config.ssh.forward_agent = true
|
||||
|
||||
# Share an additional folder to the guest VM. The first argument is
|
||||
# the path on the host to the actual folder. The second argument is
|
||||
# the path on the guest to mount the folder. And the optional third
|
||||
# argument is a set of non-required options.
|
||||
# config.vm.synced_folder "../data", "/vagrant_data"
|
||||
|
||||
# Provider-specific configuration so you can fine-tune various
|
||||
# backing providers for Vagrant. These expose provider-specific options.
|
||||
# Example for VirtualBox:
|
||||
#
|
||||
# config.vm.provider "virtualbox" do |vb|
|
||||
# # Don't boot with headless mode
|
||||
# vb.gui = true
|
||||
#
|
||||
# # Use VBoxManage to customize the VM. For example to change memory:
|
||||
# vb.customize ["modifyvm", :id, "--memory", "1024"]
|
||||
# end
|
||||
#
|
||||
# View the documentation for the provider you're using for more
|
||||
# information on available options.
|
||||
|
||||
# Enable provisioning with CFEngine. CFEngine Community packages are
|
||||
# automatically installed. For example, configure the host as a
|
||||
# policy server and optionally a policy file to run:
|
||||
#
|
||||
# config.vm.provision "cfengine" do |cf|
|
||||
# cf.am_policy_hub = true
|
||||
# # cf.run_file = "motd.cf"
|
||||
# end
|
||||
#
|
||||
# You can also configure and bootstrap a client to an existing
|
||||
# policy server:
|
||||
#
|
||||
# config.vm.provision "cfengine" do |cf|
|
||||
# cf.policy_server_address = "10.0.2.15"
|
||||
# end
|
||||
|
||||
# Enable provisioning with Puppet stand alone. Puppet manifests
|
||||
# are contained in a directory path relative to this Vagrantfile.
|
||||
# You will need to create the manifests directory and a manifest in
|
||||
# the file default.pp in the manifests_path directory.
|
||||
#
|
||||
# config.vm.provision "puppet" do |puppet|
|
||||
# puppet.manifests_path = "manifests"
|
||||
# puppet.manifest_file = "site.pp"
|
||||
# end
|
||||
|
||||
# Enable provisioning with chef solo, specifying a cookbooks path, roles
|
||||
# path, and data_bags path (all relative to this Vagrantfile), and adding
|
||||
# some recipes and/or roles.
|
||||
#
|
||||
# config.vm.provision "chef_solo" do |chef|
|
||||
# chef.cookbooks_path = "../my-recipes/cookbooks"
|
||||
# chef.roles_path = "../my-recipes/roles"
|
||||
# chef.data_bags_path = "../my-recipes/data_bags"
|
||||
# chef.add_recipe "mysql"
|
||||
# chef.add_role "web"
|
||||
#
|
||||
# # You may also specify custom JSON attributes:
|
||||
# chef.json = { mysql_password: "foo" }
|
||||
# end
|
||||
|
||||
# Enable provisioning with chef server, specifying the chef server URL,
|
||||
# and the path to the validation key (relative to this Vagrantfile).
|
||||
#
|
||||
# The Opscode Platform uses HTTPS. Substitute your organization for
|
||||
# ORGNAME in the URL and validation key.
|
||||
#
|
||||
# If you have your own Chef Server, use the appropriate URL, which may be
|
||||
# HTTP instead of HTTPS depending on your configuration. Also change the
|
||||
# validation key to validation.pem.
|
||||
#
|
||||
# config.vm.provision "chef_client" do |chef|
|
||||
# chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
|
||||
# chef.validation_key_path = "ORGNAME-validator.pem"
|
||||
# end
|
||||
#
|
||||
# If you're using the Opscode platform, your validator client is
|
||||
# ORGNAME-validator, replacing ORGNAME with your organization name.
|
||||
#
|
||||
# If you have your own Chef Server, the default validation client name is
|
||||
# chef-validator, unless you changed the configuration.
|
||||
#
|
||||
# chef.validation_client_name = "ORGNAME-validator"
|
||||
end
|
||||
@@ -1,10 +1,9 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
INCLUDE(CMakeForceCompiler)
|
||||
set(ARM_PREFIX arm-none-linux-gnueabi)
|
||||
set(ARM_PREFIX arm-frc-linux-gnueabi)
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
CMAKE_FORCE_CXX_COMPILER(${ARM_PREFIX}-g++ GNU)
|
||||
CMAKE_FORCE_C_COMPILER(${ARM_PREFIX}-gcc GNU)
|
||||
set(CMAKE_CXX_FLAGS "-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=softfp -Wall -Wno-psabi" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "-std=c++1y -Wformat=2 -Wall -Wextra -Werror -pedantic -Wno-psabi" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -g" CACHE STRING "" FORCE) # still want debugging for release?
|
||||
SET(CMAKE_FIND_ROOT_PATH $ENV{USER_HOME}/wpilib/toolchains/arm-none-linux-gnueabi-4.4.1/arm-none-linux-gnueabi/libc)
|
||||
|
||||
28
bootstrap.sh
Normal file
28
bootstrap.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/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 default-jdk maven python-pip python-setuptools g++-arm-frc-linux-gnueabi sshpass libc6-i386
|
||||
|
||||
easy_install pip
|
||||
yes | pip install git-review
|
||||
|
||||
|
||||
# Install the jdk-linux-arm-vfp-sflt
|
||||
# Create the target directory for the jdk
|
||||
mkdir -p /home/vagrant/jdk-linux-arm-vfp-sflt/
|
||||
# Unzip the jdk into this new directory
|
||||
tar -xzf /vagrant/jdk-7u45-linux-arm-vfp-sflt.gz -C /home/vagrant/jdk-linux-arm-vfp-sflt/
|
||||
|
||||
|
||||
# Keep this at the end of this file
|
||||
printf "\n\n"
|
||||
printf "Your virtual enviroment is now nearly set-up.\n"
|
||||
printf "You can access your enviroment using 'vagrant ssh'.\n"
|
||||
printf "Please run 'cd /vagrant' to navigate to the repository.\n"
|
||||
printf "Once you have navigated there please run 'git review -s' to complete the setup of git review.\n"
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Temporary method to deploy C++ integration tests to the RoboRIO
|
||||
|
||||
if [ $(which sshpass) ]
|
||||
then
|
||||
# Send stderr to /dev/null - the only thing printed to it is the login prompt
|
||||
sshpass -p "" ssh admin@10.1.90.2 killall FRCUserProgram java 2> /dev/null
|
||||
sshpass -p "" scp target/cmake/wpilibc/wpilibC++IntegrationTests/FRCUserProgram admin@10.1.90.2:/home/admin 2> /dev/null
|
||||
sshpass -p "" ssh admin@10.1.90.2 ./FRCUserProgram --gtest_color=yes $* 2> /dev/null
|
||||
else
|
||||
ssh admin@10.1.90.2 killall FRCUserProgram
|
||||
scp target/cmake/wpilibc/wpilibC++IntegrationTests/FRCUserProgram admin@10.1.90.2:/home/admin
|
||||
ssh admin@10.1.90.2 ./FRCUserProgram --gtest_color=yes $*
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.ui.navigator.resources;bundle-version="3.4.400",
|
||||
org.eclipse.ui.intro,
|
||||
org.eclipse.ui.intro.universal,
|
||||
org.eclipse.core.expressions;bundle-version="3.4.400"
|
||||
org.eclipse.core.expressions;bundle-version="3.4.400",
|
||||
org.eclipse.core.variables;bundle-version="3.2.700"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Export-Package: edu.wpi.first.wpilib.plugins.core,
|
||||
|
||||
@@ -83,5 +83,14 @@
|
||||
content="WPILib Intro/sample.xml">
|
||||
</configExtension>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.variables.valueVariables">
|
||||
<variable
|
||||
name="WPILIB"
|
||||
initialValue="${HOME}/wpilib"
|
||||
description="WPILib Path"
|
||||
>
|
||||
</variable>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
||||
@@ -105,6 +105,7 @@ public class WPILibCore extends AbstractUIPlugin {
|
||||
|
||||
public void saveGlobalProperties(Properties props) {
|
||||
try {
|
||||
props.setProperty("version", "current");
|
||||
props.store(new FileOutputStream(new File(WPILibCore.getDefault()
|
||||
.getWPILibBaseDir() + "/wpilib.properties")),
|
||||
"Don't add new properties, they will be deleted by the eclipse plugin.");
|
||||
@@ -133,7 +134,7 @@ public class WPILibCore extends AbstractUIPlugin {
|
||||
}
|
||||
|
||||
public String getDefaultVersion() {
|
||||
return "2013-test-0.4";
|
||||
return "0.2";
|
||||
}
|
||||
|
||||
public String getCurrentVersion() {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package edu.wpi.first.wpilib.plugins.core.actions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.debug.core.DebugPlugin;
|
||||
@@ -33,13 +34,18 @@ public class RunOutlineViewerAction implements IWorkbenchWindowActionDelegate {
|
||||
* @see IWorkbenchWindowActionDelegate#run
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
String jarFile = WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools"+File.separator
|
||||
+WPILibCore.getDefault().getCurrentVersion()+File.separator+"OutlineViewer-with-dependencies.jar";
|
||||
String[] cmd = {"java", "-jar", jarFile};
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools");
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
@Override public boolean accept(File dir, String name) {
|
||||
return name.startsWith("OutlineViewer") && name.endsWith(".jar");
|
||||
}
|
||||
});
|
||||
if (files == null || files.length < 1) return;
|
||||
String[] cmd = {"java", "-jar", files[0].getAbsolutePath()};
|
||||
try {
|
||||
DebugPlugin.exec(cmd, new File(System.getProperty("user.home")));
|
||||
} catch (CoreException e) {
|
||||
WPILibCore.logError("Error running outline viewer.", e);
|
||||
WPILibCore.logError("Error running OutlineViewer.", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,14 +34,13 @@ public class RunRobotBuilderAction implements IWorkbenchWindowActionDelegate {
|
||||
* @see IWorkbenchWindowActionDelegate#run
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools"+File.separator
|
||||
+WPILibCore.getDefault().getCurrentVersion());
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools");
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
@Override public boolean accept(File dir, String name) {
|
||||
return name.startsWith("RobotBuilder") && name.endsWith(".jar");
|
||||
}
|
||||
});
|
||||
if (files.length < 1) return;
|
||||
if (files == null || files.length < 1) return;
|
||||
String[] cmd = {"java", "-jar", files[0].getAbsolutePath()};
|
||||
try {
|
||||
DebugPlugin.exec(cmd, new File(System.getProperty("user.home")));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package edu.wpi.first.wpilib.plugins.core.actions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.debug.core.DebugPlugin;
|
||||
@@ -33,13 +34,18 @@ public class RunSFXDashboardAction implements IWorkbenchWindowActionDelegate {
|
||||
* @see IWorkbenchWindowActionDelegate#run
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
String jarFile = WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools"+File.separator
|
||||
+WPILibCore.getDefault().getCurrentVersion()+File.separator+"sfx.jar";
|
||||
String[] cmd = {"java", "-jar", jarFile};
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools");
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
@Override public boolean accept(File dir, String name) {
|
||||
return name.startsWith("sfx") && name.endsWith(".jar");
|
||||
}
|
||||
});
|
||||
if (files == null || files.length < 1) return;
|
||||
String[] cmd = {"java", "-jar", files[0].getAbsolutePath()};
|
||||
try {
|
||||
DebugPlugin.exec(cmd, new File(System.getProperty("user.home")));
|
||||
} catch (CoreException e) {
|
||||
WPILibCore.logError("Error running SFXDashboard.", e);
|
||||
WPILibCore.logError("Error running SFX Dashboard.", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package edu.wpi.first.wpilib.plugins.core.actions;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.debug.core.DebugPlugin;
|
||||
@@ -33,9 +34,14 @@ public class RunSmartDashboardAction implements IWorkbenchWindowActionDelegate {
|
||||
* @see IWorkbenchWindowActionDelegate#run
|
||||
*/
|
||||
public void run(IAction action) {
|
||||
String jarFile = WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools"+File.separator
|
||||
+WPILibCore.getDefault().getCurrentVersion()+File.separator+"SmartDashboard.jar";
|
||||
String[] cmd = {"java", "-jar", jarFile};
|
||||
File dir = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"tools");
|
||||
File[] files = dir.listFiles(new FilenameFilter() {
|
||||
@Override public boolean accept(File dir, String name) {
|
||||
return name.startsWith("SmartDashboard") && name.endsWith(".jar");
|
||||
}
|
||||
});
|
||||
if (files == null || files.length < 1) return;
|
||||
String[] cmd = {"java", "-jar", files[0].getAbsolutePath()};
|
||||
try {
|
||||
DebugPlugin.exec(cmd, new File(System.getProperty("user.home")));
|
||||
} catch (CoreException e) {
|
||||
|
||||
@@ -22,12 +22,12 @@ import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
|
||||
public abstract class AbstractInstaller {
|
||||
protected File installLocation;
|
||||
protected String version;
|
||||
protected String version, installedVersion;
|
||||
|
||||
public AbstractInstaller(String version) {
|
||||
this.installLocation = new File(WPILibCore.getDefault().getWPILibBaseDir()
|
||||
+ File.separator + getFeatureName() + File.separator + version);
|
||||
public AbstractInstaller(String version, String installedVersion, String path) {
|
||||
this.installLocation = new File(path);
|
||||
this.version = version;
|
||||
this.installedVersion = installedVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ public abstract class AbstractInstaller {
|
||||
WPILibCore.logInfo("Installing "+getFeatureName()+" if necessary");
|
||||
|
||||
if (!isInstalled()) {
|
||||
WPILibCore.logInfo("Install necessary");
|
||||
WPILibCore.logInfo("Install necessary for " + getFeatureName());
|
||||
try {
|
||||
install();
|
||||
} catch (InstallException e) {
|
||||
@@ -64,9 +64,9 @@ public abstract class AbstractInstaller {
|
||||
getErrorMessage(e));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
updateInstalledVersion(version);
|
||||
WPILibCore.logInfo("Installed");
|
||||
WPILibCore.logInfo("Installed" + getFeatureName());
|
||||
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
@@ -105,7 +105,7 @@ public abstract class AbstractInstaller {
|
||||
* @return True for is there and newer, false otherwise.
|
||||
*/
|
||||
protected boolean isInstalled() {
|
||||
return installLocation.exists();
|
||||
return installLocation.exists() && !version.contains("DEVELOPMENT") && version.equals(installedVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,7 +138,7 @@ public abstract class AbstractInstaller {
|
||||
}
|
||||
|
||||
// Call 'unzip'
|
||||
final String[] cmd = {"unzip", tmpFile.getAbsolutePath(), "-d", installLocation.getAbsolutePath()};
|
||||
final String[] cmd = {"unzip" , "-o", tmpFile.getAbsolutePath(), "-d", installLocation.getAbsolutePath()};
|
||||
WPILibCore.logInfo("unzip "+tmpFile.getAbsolutePath()+" -d "+installLocation.getAbsolutePath());
|
||||
final Process unzipProcess = DebugPlugin.exec(cmd, installLocation);
|
||||
try (final InputStream is = unzipProcess.getInputStream()) {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package edu.wpi.first.wpilib.plugins.core.installer;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
@@ -11,7 +9,7 @@ import edu.wpi.first.wpilib.plugins.core.preferences.PreferenceConstants;
|
||||
public class ToolsInstaller extends AbstractInstaller {
|
||||
|
||||
public ToolsInstaller(String version) {
|
||||
super(version);
|
||||
super(version, WPILibCore.getDefault().getPreferenceStore().getString(PreferenceConstants.TOOLS_VERSION), WPILibCore.getDefault().getWPILibBaseDir() + "/tools");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -22,13 +20,8 @@ public class ToolsInstaller extends AbstractInstaller {
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCore.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_TOOLS_VERSION)) {
|
||||
WPILibCore.logInfo("Forcing library version to "+version);
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
props.setProperty("version", version);
|
||||
WPILibCore.getDefault().saveGlobalProperties(props);
|
||||
prefs.setValue(PreferenceConstants.TOOLS_VERSION, version);
|
||||
}
|
||||
prefs.setValue(PreferenceConstants.TOOLS_VERSION, version);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,8 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
|
||||
IPreferenceStore store = WPILibCore.getDefault().getPreferenceStore();
|
||||
store.setDefault(PreferenceConstants.TEAM_NUMBER,
|
||||
WPILibCore.getDefault().getProjectProperties(null).getProperty("team-number", "0"));
|
||||
store.setDefault(PreferenceConstants.TOOLS_VERSION, WPILibCore.getDefault().getDefaultVersion());
|
||||
store.setDefault(PreferenceConstants.UPDATE_TOOLS_VERSION, true);
|
||||
String val = store.getString(PreferenceConstants.TOOLS_VERSION);
|
||||
if (!store.contains(PreferenceConstants.TOOLS_VERSION) && val != null)
|
||||
store.setValue(PreferenceConstants.TOOLS_VERSION, "none");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class NewProjectMainPage extends WizardPage {
|
||||
private Text worldText;
|
||||
private Button worldButton;
|
||||
|
||||
Button iterativeRobot, commandRobot;
|
||||
Button iterativeRobot, commandRobot, sampleRobot;
|
||||
private boolean showPackage;
|
||||
private boolean showProjectTypes;
|
||||
private TeamNumberPage teamNumberPage;
|
||||
@@ -109,6 +109,12 @@ public class NewProjectMainPage extends WizardPage {
|
||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
gd.widthHint = 300;
|
||||
commandRobot.setLayoutData(gd);
|
||||
|
||||
sampleRobot = new Button(projectTypeGroup, SWT.RADIO | SWT.WRAP);
|
||||
sampleRobot.setText("Sample Robot: A robot project used for small sample programs or for highly advanced programs with more complete control over program flow");
|
||||
gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
gd.widthHint = 300;
|
||||
sampleRobot.setLayoutData(gd);
|
||||
}
|
||||
|
||||
label = new Label(container, SWT.NULL);
|
||||
@@ -214,6 +220,7 @@ public class NewProjectMainPage extends WizardPage {
|
||||
public ProjectType getProjectType() {
|
||||
if (!showProjectTypes) return null;
|
||||
else if (iterativeRobot.getSelection()) return types.get(ProjectType.ITERATIVE);
|
||||
else if (sampleRobot.getSelection()) return types.get(ProjectType.SAMPLE);
|
||||
else return types.get(ProjectType.COMMAND_BASED);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import java.net.URL;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ProjectType {
|
||||
String SIMPLE = "SIMPLE";
|
||||
String SAMPLE = "SAMPLE";
|
||||
String ITERATIVE = "ITERATIVE";
|
||||
String COMMAND_BASED = "COMMAND_BASED";
|
||||
|
||||
|
||||
@@ -77,8 +77,8 @@ public class TeamNumberPage extends WizardPage {
|
||||
private void dialogChanged() {
|
||||
String teamNumber = getTeamNumber();
|
||||
if (listener != null) listener.stateChanged(null);
|
||||
if (!teamNumber.matches("^([0-9]+)$")) {
|
||||
updateStatus("Team number must be a valid integer.");
|
||||
if (!teamNumber.matches("^([1-9][0-9]*)$")) {
|
||||
updateStatus("Team number must be a valid integer without leading zeroes.");
|
||||
return;
|
||||
}
|
||||
updateStatus(null);
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
bin.includes = feature.xml
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.feature"
|
||||
label="Linux Toolchain for Robot C++ Development"
|
||||
version="0.2.0"
|
||||
provider-name="Worcester Polytechnic Institute"
|
||||
os="linux">
|
||||
|
||||
<description>
|
||||
The C++ toolchain to build Athena programs on Linux.
|
||||
</description>
|
||||
|
||||
<copyright>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
</copyright>
|
||||
|
||||
<license>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer. Redistributions in binary form must reproduce the
|
||||
* above copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution. Neither the name of the FIRST nor the
|
||||
* names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="edu.wpi.first.wpilib.plugins.cpp.feature" version="0.1.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.linux"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.feature</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
</project>
|
||||
@@ -1,12 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Linux
|
||||
Bundle-SymbolicName: edu.wpi.first.wpilib.plugins.cpp.toolchains.linux;singleton:=true
|
||||
Bundle-Version: 0.2.0
|
||||
Bundle-Activator: edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.Activator
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
edu.wpi.first.wpilib.plugins.core;bundle-version="0.1.0",
|
||||
edu.wpi.first.wpilib.plugins.cpp;bundle-version="0.1.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
@@ -1,8 +0,0 @@
|
||||
Making This Plugin Work
|
||||
=======================
|
||||
|
||||
This plugin needs a very big zip that contains the toolchain. This is
|
||||
currently hosted by Jenkins in the "Windows Toolchain Provider"
|
||||
project. This can also be created from the download from mentor
|
||||
embedded. The file should be resources/toolchain.zip and contains the
|
||||
5 main directories.
|
||||
@@ -1,7 +0,0 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
resources/,\
|
||||
plugin.xml
|
||||
src.includes = resources/
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.ui.startup">
|
||||
<startup
|
||||
class="edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.Activator">
|
||||
</startup>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.linux</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilib.plugins.cpp.toolchains</groupId>
|
||||
<artifactId>linux</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>zip</type>
|
||||
<destFileName>toolchain.zip</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
<outputDirectory>${project.build.outputDirectory}/resources</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,62 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.linux;
|
||||
|
||||
import org.eclipse.ui.IStartup;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin implements IStartup {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "edu.wpi.first.wpilib.plugins.cpp.toolchains.windows"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
private String getCurrentVersion() {
|
||||
return WPILibCPPPlugin.getDefault().getDefaultToolchainVersion();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void earlyStartup() {
|
||||
new ToolchainInstaller(getCurrentVersion()).installIfNecessary();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.linux;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
|
||||
public class ToolchainInstaller extends AbstractInstaller {
|
||||
|
||||
public ToolchainInstaller(String version) {
|
||||
super(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "toolchains";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION)) {
|
||||
System.out.println("Forcing library version to "+version);
|
||||
prefs.setValue(PreferenceConstants.TOOLCHAIN_VERSION, version);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getInstallResourceStream() {
|
||||
return ToolchainInstaller.class.getResourceAsStream("/resources/toolchain.zip");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
bin.includes = feature.xml
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.feature"
|
||||
label="Mac Toolchain for Robot C++ Development"
|
||||
version="0.2.0"
|
||||
provider-name="Worcester Polytechnic Institute"
|
||||
os="macosx">
|
||||
|
||||
<description>
|
||||
The C++ toolchain to build Athena programs on a Mac.
|
||||
</description>
|
||||
|
||||
<copyright>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
</copyright>
|
||||
|
||||
<license>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer. Redistributions in binary form must reproduce the
|
||||
* above copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution. Neither the name of the FIRST nor the
|
||||
* names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="edu.wpi.first.wpilib.plugins.cpp.feature" version="0.1.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.mac"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.feature</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
</project>
|
||||
@@ -1,12 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Windows
|
||||
Bundle-SymbolicName: edu.wpi.first.wpilib.plugins.cpp.toolchains.mac;singleton:=true
|
||||
Bundle-Version: 0.2.0
|
||||
Bundle-Activator: edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.Activator
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
edu.wpi.first.wpilib.plugins.core;bundle-version="0.1.0",
|
||||
edu.wpi.first.wpilib.plugins.cpp;bundle-version="0.1.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
@@ -1,8 +0,0 @@
|
||||
Making This Plugin Work
|
||||
=======================
|
||||
|
||||
This plugin needs a very big zip that contains the toolchain. This is
|
||||
currently hosted by Jenkins in the "Windows Toolchain Provider"
|
||||
project. This can also be created from the download from mentor
|
||||
embedded. The file should be resources/toolchain.zip and contains the
|
||||
5 main directories.
|
||||
@@ -1,7 +0,0 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
resources/,\
|
||||
plugin.xml
|
||||
src.includes = resources/
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.ui.startup">
|
||||
<startup
|
||||
class="edu.wpi.first.wpilib.plugins.cpp.toolchains.mac.Activator">
|
||||
</startup>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.mac</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilib.plugins.cpp.toolchains</groupId>
|
||||
<artifactId>mac</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>zip</type>
|
||||
<destFileName>toolchain.zip</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
<outputDirectory>${project.build.outputDirectory}/resources</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,62 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.mac;
|
||||
|
||||
import org.eclipse.ui.IStartup;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin implements IStartup {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "edu.wpi.first.wpilib.plugins.cpp.toolchains.windows"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
private String getCurrentVersion() {
|
||||
return WPILibCPPPlugin.getDefault().getDefaultToolchainVersion();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void earlyStartup() {
|
||||
new ToolchainInstaller(getCurrentVersion()).installIfNecessary();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.mac;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
|
||||
public class ToolchainInstaller extends AbstractInstaller {
|
||||
|
||||
public ToolchainInstaller(String version) {
|
||||
super(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "toolchains";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION)) {
|
||||
System.out.println("Forcing library version to "+version);
|
||||
prefs.setValue(PreferenceConstants.TOOLCHAIN_VERSION, version);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getInstallResourceStream() {
|
||||
return ToolchainInstaller.class.getResourceAsStream("/resources/toolchain.zip");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
bin.includes = feature.xml
|
||||
@@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature"
|
||||
label="Windows Toolchain for Robot C++ Development"
|
||||
version="0.2.0"
|
||||
provider-name="Worcester Polytechnic Institute"
|
||||
os="win32">
|
||||
|
||||
<description>
|
||||
The C++ toolchain to build Athena programs on Windows.
|
||||
</description>
|
||||
|
||||
<copyright>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
</copyright>
|
||||
|
||||
<license>
|
||||
* Copyright (c) 2013 FIRST and WPI
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or
|
||||
* without modification, are permitted provided that the following
|
||||
* conditions are met:
|
||||
* Redistributions of source code must retain the above
|
||||
* copyright notice, this list of conditions and the following
|
||||
* disclaimer. Redistributions in binary form must reproduce the
|
||||
* above copyright notice, this list of conditions and the following
|
||||
* disclaimer in the documentation and/or other materials provided
|
||||
* with the distribution. Neither the name of the FIRST nor the
|
||||
* names of its contributors may be used to endorse or promote
|
||||
* products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY FIRST AND CONTRIBUTORS``AS IS''
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY NONINFRINGEMENT
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
* EVENT SHALL FIRST OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
|
||||
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
</license>
|
||||
|
||||
<requires>
|
||||
<import feature="edu.wpi.first.wpilib.plugins.cpp.feature" version="0.1.0.qualifier"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.feature</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
</project>
|
||||
@@ -1,12 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Windows
|
||||
Bundle-SymbolicName: edu.wpi.first.wpilib.plugins.cpp.toolchains.windows;singleton:=true
|
||||
Bundle-Version: 0.2.0
|
||||
Bundle-Activator: edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.Activator
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
edu.wpi.first.wpilib.plugins.core;bundle-version="0.1.0",
|
||||
edu.wpi.first.wpilib.plugins.cpp;bundle-version="0.1.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
@@ -1,8 +0,0 @@
|
||||
Making This Plugin Work
|
||||
=======================
|
||||
|
||||
This plugin needs a very big zip that contains the toolchain. This is
|
||||
currently hosted by Jenkins in the "Windows Toolchain Provider"
|
||||
project. This can also be created from the download from mentor
|
||||
embedded. The file should be resources/toolchain.zip and contains the
|
||||
5 main directories.
|
||||
@@ -1,7 +0,0 @@
|
||||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
resources/,\
|
||||
plugin.xml
|
||||
src.includes = resources/
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.4"?>
|
||||
<plugin>
|
||||
<extension
|
||||
point="org.eclipse.ui.startup">
|
||||
<startup
|
||||
class="edu.wpi.first.wpilib.plugins.cpp.toolchains.windows.Activator">
|
||||
</startup>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
@@ -1,47 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins.cpp.toolchains.windows</artifactId>
|
||||
<version>0.2.0</version>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>edu.wpi.first.wpilib.plugins</groupId>
|
||||
<artifactId>edu.wpi.first.wpilib.plugins</artifactId>
|
||||
<version>0.1.0.qualifier</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
<phase>prepare-package</phase>
|
||||
<goals>
|
||||
<goal>copy</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilib.plugins.cpp.toolchains</groupId>
|
||||
<artifactId>windows</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<type>zip</type>
|
||||
<destFileName>toolchain.zip</destFileName>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
<overWriteIfNewer>true</overWriteIfNewer>
|
||||
<outputDirectory>${project.build.outputDirectory}/resources</outputDirectory>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@@ -1,62 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.windows;
|
||||
|
||||
import org.eclipse.ui.IStartup;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
|
||||
/**
|
||||
* The activator class controls the plug-in life cycle
|
||||
*/
|
||||
public class Activator extends AbstractUIPlugin implements IStartup {
|
||||
|
||||
// The plug-in ID
|
||||
public static final String PLUGIN_ID = "edu.wpi.first.wpilib.plugins.cpp.toolchains.windows"; //$NON-NLS-1$
|
||||
|
||||
// The shared instance
|
||||
private static Activator plugin;
|
||||
|
||||
/**
|
||||
* The constructor
|
||||
*/
|
||||
public Activator() {
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
plugin = this;
|
||||
}
|
||||
|
||||
private String getCurrentVersion() {
|
||||
return WPILibCPPPlugin.getDefault().getDefaultToolchainVersion();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
plugin = null;
|
||||
super.stop(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static Activator getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void earlyStartup() {
|
||||
new ToolchainInstaller(getCurrentVersion()).installIfNecessary();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.toolchains.windows;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
|
||||
public class ToolchainInstaller extends AbstractInstaller {
|
||||
|
||||
public ToolchainInstaller(String version) {
|
||||
super(version);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "toolchains";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION)) {
|
||||
System.out.println("Forcing library version to "+version);
|
||||
prefs.setValue(PreferenceConstants.TOOLCHAIN_VERSION, version);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getInstallResourceStream() {
|
||||
return ToolchainInstaller.class.getResourceAsStream("/resources/toolchain.zip");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -25,7 +25,8 @@ Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.cdt.debug.ui;bundle-version="7.2.0",
|
||||
org.eclipse.cdt.launch;bundle-version="7.1.0",
|
||||
org.eclipse.cdt.launch.remote;bundle-version="2.4.0",
|
||||
org.eclipse.cdt.debug.mi.core;bundle-version="7.2.0"
|
||||
org.eclipse.cdt.debug.mi.core;bundle-version="7.2.0",
|
||||
org.eclipse.core.variables
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Export-Package: edu.wpi.first.wpilib.plugins.cpp,
|
||||
|
||||
@@ -173,15 +173,6 @@
|
||||
</enablement>
|
||||
</commonWizard>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.preferencePages">
|
||||
<page
|
||||
category="edu.wpi.first.wpilib.plugins.core.preferences.WPILibPreferencePage"
|
||||
class="edu.wpi.first.wpilib.plugins.cpp.preferences.CPPPreferencePage"
|
||||
id="edu.wpi.first.wpilib.plugins.cpp.preferences.CPPPreferencePage"
|
||||
name="C++ Preferences">
|
||||
</page>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.runtime.preferences">
|
||||
<initializer
|
||||
|
||||
@@ -1,76 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318." name="/" resourcePath="">
|
||||
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.1222262887" name="Cross GCC" nonInternalBuilderId="cdt.managedbuild.builder.gnu.cross" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.513278893" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-none-linux-gnueabi-" valueType="string"/>
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.1104307" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" value="$toolchain/bin" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.801649698" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder autoBuildTarget="all" buildPath="${workspace_loc:/$project}/Debug" cleanBuildTarget="clean" errorParsers="" id="org.eclipse.cdt.build.core.internal.builder.2128327489" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
|
||||
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cross.c.compiler.432788947" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.154663678" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.516596133" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1224398283" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751" name="Debug" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.debug.379433867" name="Cross GCC" nonInternalBuilderId="cdt.managedbuild.builder.gnu.cross" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.541714056" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-frc-linux-gnueabi-" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.864368257" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder autoBuildTarget="all" buildPath="${workspace_loc:/$project}/Debug" cleanBuildTarget="clean" id="org.eclipse.cdt.build.core.internal.builder.1308552451" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="CDT Internal Builder" superClass="org.eclipse.cdt.build.core.internal.builder"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.1261239456" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.none" id="gnu.c.compiler.option.optimization.level.680635682" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.143320011" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1793678673" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.442358515" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.549514425" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1682909384" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1597382905" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/src""/>
|
||||
<listOptionValue builtIn="false" value="$cpp-location/include"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.963785380" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1505235107" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1204256582" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.969129918" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.394786621" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${WPILIB}/cpp/current/include""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.dialect.std.1060340803" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.c++1y" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1033680971" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1367166630" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1568604896" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.paths.1928585110" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="$cpp-location/lib"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.362679811" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.1895838080" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.libs.1363675797" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="wpi"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.1072058280" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="WPILib"/>
|
||||
<listOptionValue builtIn="false" value="WPILibAthena"/>
|
||||
<listOptionValue builtIn="false" value="WPILib"/>
|
||||
<listOptionValue builtIn="false" value="HALAthena"/>
|
||||
<listOptionValue builtIn="false" value="NetworkTables"/>
|
||||
<listOptionValue builtIn="false" value="FRC_NetworkCommunication"/>
|
||||
<listOptionValue builtIn="false" value="i2c"/>
|
||||
<listOptionValue builtIn="false" value="ni_emb"/>
|
||||
<listOptionValue builtIn="false" value="NiFpgaLv"/>
|
||||
<listOptionValue builtIn="false" value="NiFpga"/>
|
||||
<listOptionValue builtIn="false" value="nirio_emb_can"/>
|
||||
<listOptionValue builtIn="false" value="NiRioSrv"/>
|
||||
<listOptionValue builtIn="false" value="ni_rtlog"/>
|
||||
<listOptionValue builtIn="false" value="RoboRIO_FRC_ChipObject"/>
|
||||
<listOptionValue builtIn="false" value="spi"/>
|
||||
<listOptionValue builtIn="false" value="visa"/>
|
||||
<listOptionValue builtIn="false" value="dl"/>
|
||||
<listOptionValue builtIn="false" value="pthread"/>
|
||||
<option id="gnu.cpp.link.option.paths.1566479969" name="Library search path (-L)" superClass="gnu.cpp.link.option.paths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${WPILIB}/cpp/current/lib""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.flags.1747959472" name="Linker flags" superClass="gnu.cpp.link.option.flags" value="-Wl,-rpath-link,$cpp-location/lib" valueType="string"/>
|
||||
<option id="gnu.cpp.link.option.other.1891020896" name="Other options (-Xlinker [option])" superClass="gnu.cpp.link.option.other" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-export-dynamic"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1757265359" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.132949138" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1584536431" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.tool.gnu.cross.assembler.184874228" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<option id="gnu.both.asm.option.include.paths.1131856974" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1900042568" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.412234585" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1047448065" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1542016468" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.300115601">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.300115601" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.300115601" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.300115601." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.2008160346" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.511797597" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-frc-linux-gnueabi-" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.2130959809" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/$project}/Release" id="cdt.managedbuild.builder.gnu.cross.1554116591" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.985086840" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.2030238370" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.188807954" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.884664323" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.1342658383" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1371546365" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.1242574722" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1782227077" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.1397048702" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.716979188" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.126686576" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.886832650" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1915412749" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.671283127" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
@@ -81,94 +104,44 @@
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325" moduleId="org.eclipse.cdt.core.settings" name="Simulate">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163" name="Release" parent="cdt.managedbuild.config.gnu.cross.exe.release">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.release.1534660163." name="/" resourcePath="">
|
||||
<toolChain id="cdt.managedbuild.toolchain.gnu.cross.exe.release.136041223" name="Cross GCC" superClass="cdt.managedbuild.toolchain.gnu.cross.exe.release">
|
||||
<option id="cdt.managedbuild.option.gnu.cross.prefix.2033173825" name="Prefix" superClass="cdt.managedbuild.option.gnu.cross.prefix" value="arm-none-linux-gnueabi-" valueType="string"/>
|
||||
<option id="cdt.managedbuild.option.gnu.cross.path.1246856819" name="Path" superClass="cdt.managedbuild.option.gnu.cross.path" value="$toolchain/bin" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.targetPlatform.gnu.cross.433467152" isAbstract="false" osList="all" superClass="cdt.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/$project}/Release" id="cdt.managedbuild.builder.gnu.cross.716436070" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="cdt.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.compiler.2003820010" name="Cross GCC Compiler" superClass="cdt.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.option.optimization.level.1889430616" name="Optimization Level" superClass="gnu.c.compiler.option.optimization.level" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1571598299" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.1532409549" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.compiler.901599840" name="Cross G++ Compiler" superClass="cdt.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.366961467" name="Optimization Level" superClass="gnu.cpp.compiler.option.optimization.level" value="gnu.cpp.compiler.optimization.level.most" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.95433592" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.863062221" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.c.linker.970059366" name="Cross GCC Linker" superClass="cdt.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.cpp.linker.476884336" name="Cross G++ Linker" superClass="cdt.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.749590312" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.archiver.1104120173" name="Cross GCC Archiver" superClass="cdt.managedbuild.tool.gnu.cross.archiver"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.cross.assembler.1966871489" name="Cross GCC Assembler" superClass="cdt.managedbuild.tool.gnu.cross.assembler">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.304828125" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318.2017904325">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318.2017904325" moduleId="org.eclipse.cdt.core.settings" name="Simulate">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GmakeErrorParser" id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318.2017904325" name="Simulate" parent="cdt.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.418253318.2017904325." name="/" resourcePath="">
|
||||
<configuration artifactName="FRCUserProgram" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325" name="Simulate" parent="cdt.managedbuild.config.gnu.cross.exe.debug">
|
||||
<folderInfo id="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.2017904325." name="/" resourcePath="">
|
||||
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.base.1184188597" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.base">
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.base.1621111203" name="Debug Platform" osList="linux,hpux,aix,qnx" superClass="cdt.managedbuild.target.gnu.platform.base"/>
|
||||
<builder buildPath="${workspace_loc:/${ProjName}}/Simulate" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator" id="cdt.managedbuild.target.gnu.builder.base.840272037" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" superClass="cdt.managedbuild.target.gnu.builder.base"/>
|
||||
<tool id="cdt.managedbuild.tool.gnu.archiver.base.158466008" name="GCC Archiver" superClass="cdt.managedbuild.tool.gnu.archiver.base"/>
|
||||
<tool command="g++" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.cpp.compiler.base.2105416021" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
|
||||
<tool id="cdt.managedbuild.tool.gnu.cpp.compiler.base.2105416021" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.base">
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1645322059" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/src""/>
|
||||
<listOptionValue builtIn="false" value="$cpp-location/sim/include"/>
|
||||
<listOptionValue builtIn="false" value="${WPILIB}/cpp/current/sim/include"/>
|
||||
<listOptionValue builtIn="false" value="/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="/usr/include/gazebo-3.0"/>
|
||||
<listOptionValue builtIn="false" value="/usr/include/gazebo-3.1"/>
|
||||
<listOptionValue builtIn="false" value="/usr/include/sdformat-2.0"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.optimization.level.1648211502" 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.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"/>
|
||||
@@ -191,83 +164,40 @@
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool command="as" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.tool.gnu.assembler.base.2105089872" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
|
||||
<tool id="cdt.managedbuild.tool.gnu.assembler.base.2105089872" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.base">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.254601899" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="$project.cdt.managedbuild.target.gnu.cross.exe.548740421" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
|
||||
<project id="$project.cdt.managedbuild.target.gnu.cross.exe.13534228" name="Executable" projectType="cdt.managedbuild.target.gnu.cross.exe"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.418253318;cdt.managedbuild.config.gnu.cross.exe.debug.418253318.;cdt.managedbuild.tool.gnu.cross.c.compiler.432788947;cdt.managedbuild.tool.gnu.c.compiler.input.1224398283">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.c"" command="arm-none-linux-gnueabi-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751;cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.;cdt.managedbuild.tool.gnu.cross.c.compiler.1261239456;cdt.managedbuild.tool.gnu.c.compiler.input.1793678673">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1534660163;cdt.managedbuild.config.gnu.cross.exe.release.1534660163.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.901599840;cdt.managedbuild.tool.gnu.cpp.compiler.input.863062221">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.cpp"" command="arm-none-linux-gnueabi-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.300115601;cdt.managedbuild.config.gnu.cross.exe.release.300115601.;cdt.managedbuild.tool.gnu.cross.c.compiler.985086840;cdt.managedbuild.tool.gnu.c.compiler.input.884664323">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.418253318;cdt.managedbuild.config.gnu.cross.exe.debug.418253318.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.442358515;cdt.managedbuild.tool.gnu.cpp.compiler.input.963785380">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.cpp"" command="arm-none-linux-gnueabi-g++" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.300115601;cdt.managedbuild.config.gnu.cross.exe.release.300115601.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1342658383;cdt.managedbuild.tool.gnu.cpp.compiler.input.1782227077">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.release.1534660163;cdt.managedbuild.config.gnu.cross.exe.release.1534660163.;cdt.managedbuild.tool.gnu.cross.c.compiler.2003820010;cdt.managedbuild.tool.gnu.c.compiler.input.1532409549">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC"/>
|
||||
<profile id="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC">
|
||||
<buildOutputProvider>
|
||||
<openAction enabled="true" filePath=""/>
|
||||
<parser enabled="true"/>
|
||||
</buildOutputProvider>
|
||||
<scannerInfoProvider id="specsFile">
|
||||
<runAction arguments="-E -P -v -dD "${plugin_state_location}/specs.c"" command="arm-none-linux-gnueabi-gcc" useDefault="true"/>
|
||||
<parser enabled="true"/>
|
||||
</scannerInfoProvider>
|
||||
</profile>
|
||||
<scannerConfigBuildInfo instanceId="cdt.managedbuild.config.gnu.cross.exe.debug.1104744751;cdt.managedbuild.config.gnu.cross.exe.debug.1104744751.;cdt.managedbuild.tool.gnu.cross.cpp.compiler.1505235107;cdt.managedbuild.tool.gnu.cpp.compiler.input.1033680971">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Release">
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/$project"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Debug">
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/$project"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Simulate">
|
||||
|
||||
@@ -27,3 +27,6 @@ sim.exe=Simulate/${out}
|
||||
wpilib.sim=${wpilib}/sim
|
||||
sim.tools=${wpilib.sim}/tools
|
||||
sim.lib=${wpilib.sim}/lib
|
||||
|
||||
# Use the current C++ library by default
|
||||
cpp-version=current
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define $classname_H
|
||||
|
||||
#include "../CommandBase.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
class $classname: public CommandBase
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "Commands/Command.h"
|
||||
#include "Subsystems/ExampleSubsystem.h"
|
||||
#include "OI.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
/**
|
||||
* The base for all commands. All atomic commands should subclass CommandBase.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define $classname_H
|
||||
|
||||
#include "Commands/CommandGroup.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
class $classname: public CommandGroup
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define EXAMPLE_COMMAND_H
|
||||
|
||||
#include "../CommandBase.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
class ExampleCommand: public CommandBase
|
||||
{
|
||||
|
||||
@@ -3,9 +3,6 @@
|
||||
#include "SmartDashboard/SmartDashboard.h"
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
|
||||
#@autogenerated_code("pid", "")
|
||||
#parse("${exporter-path}PIDSubsystem-pid.cpp")
|
||||
#end
|
||||
$classname::$classname() :
|
||||
PIDSubsystem("$classname", 1.0, 0.0, 0.0)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef ROBOTMAP_H
|
||||
#define ROBOTMAP_H
|
||||
|
||||
#include "WPILib.h"
|
||||
|
||||
/**
|
||||
* The RobotMap is a mapping from the ports sensors and actuators are wired into
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
// TODO: convert into C++ template
|
||||
#error "This is not a C++ file. I have no idea what this is doing here, so I'm leaving this message here to let someone else clean this up"
|
||||
import edu.wpi.first.wpilibj.command.Trigger;
|
||||
#include "$classname.h"
|
||||
|
||||
/**
|
||||
* New and improved C++
|
||||
*/
|
||||
public class $classname extends Trigger
|
||||
$classname::$classname()
|
||||
{
|
||||
public:
|
||||
bool get()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
bool $classname::Get()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
// TODO: convert into C++ template
|
||||
#error "This is not a C++ file. I have no idea what this is doing here, so I'm leaving this message here to let someone else clean this up"
|
||||
import edu.wpi.first.wpilibj.command.Trigger;
|
||||
#ifndef $classname_H
|
||||
#define $classname_H
|
||||
|
||||
public class $classname extends Trigger
|
||||
#include "WPILib.h"
|
||||
|
||||
class $classname: public Trigger
|
||||
{
|
||||
public:
|
||||
bool get();
|
||||
}
|
||||
$classname();
|
||||
bool Get();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -26,9 +26,6 @@ DriveTrain::DriveTrain() : Subsystem("DriveTrain") {
|
||||
right_encoder->SetDistancePerPulse((double) (4.0/12.0*M_PI) / 360.0);
|
||||
#endif
|
||||
|
||||
left_encoder->Start();
|
||||
right_encoder->Start();
|
||||
|
||||
rangefinder = new AnalogInput(6);
|
||||
gyro = new Gyro(1);
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef DriveTrain_H
|
||||
#define DriveTrain_H
|
||||
|
||||
#include "Commands/Subsystem.h"
|
||||
#include "WPILib.h"
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
#include "WPILib.h"
|
||||
|
||||
class Robot: public IterativeRobot
|
||||
{
|
||||
|
||||
RobotDrive myRobot; // robot drive system
|
||||
Joystick stick; // only joystick
|
||||
LiveWindow *lw;
|
||||
int autoLoopCounter;
|
||||
|
||||
public:
|
||||
Robot() :
|
||||
myRobot(0, 1), // these must be initialized in the same order
|
||||
stick(0), // as they are declared above.
|
||||
lw(NULL),
|
||||
autoLoopCounter(0)
|
||||
{
|
||||
myRobot.SetExpiration(0.1);
|
||||
}
|
||||
|
||||
private:
|
||||
void RobotInit()
|
||||
{
|
||||
lw = LiveWindow::GetInstance();
|
||||
}
|
||||
|
||||
void AutonomousInit()
|
||||
{
|
||||
autoLoopCounter = 0;
|
||||
}
|
||||
|
||||
void AutonomousPeriodic()
|
||||
{
|
||||
if(autoLoopCounter < 100) //Check if we've completed 100 loops (approximately 2 seconds)
|
||||
{
|
||||
myRobot.Drive(-0.5, 0.0); // drive forwards half speed
|
||||
autoLoopCounter++;
|
||||
} else {
|
||||
myRobot.Drive(0.0, 0.0); // stop robot
|
||||
}
|
||||
}
|
||||
|
||||
void TeleopInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void TeleopPeriodic()
|
||||
{
|
||||
myRobot.ArcadeDrive(stick); // drive with arcade style (use right stick)
|
||||
}
|
||||
|
||||
void TestPeriodic()
|
||||
{
|
||||
lw->Run();
|
||||
}
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot);
|
||||
@@ -0,0 +1,49 @@
|
||||
#include "WPILib.h"
|
||||
|
||||
/**
|
||||
* This is a demo program showing how to use Mecanum control with the RobotDrive class.
|
||||
*/
|
||||
class Robot: public SampleRobot
|
||||
{
|
||||
|
||||
// Channels for the wheels
|
||||
const static int frontLeftChannel = 2;
|
||||
const static int rearLeftChannel = 3;
|
||||
const static int frontRightChannel = 1;
|
||||
const static int rearRightChannel = 0;
|
||||
|
||||
const static int joystickChannel = 0;
|
||||
|
||||
RobotDrive robotDrive; // robot drive system
|
||||
Joystick stick; // only joystick
|
||||
|
||||
public:
|
||||
Robot() :
|
||||
robotDrive(frontLeftChannel, rearLeftChannel,
|
||||
frontRightChannel, rearRightChannel), // these must be initialized in the same order
|
||||
stick(joystickChannel) // as they are declared above.
|
||||
{
|
||||
robotDrive.SetExpiration(0.1);
|
||||
robotDrive.SetInvertedMotor(RobotDrive::kFrontLeftMotor, true); // invert the left side motors
|
||||
robotDrive.SetInvertedMotor(RobotDrive::kRearLeftMotor, true); // you may need to change or remove this to match your robot
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the motors with Mecanum drive.
|
||||
*/
|
||||
void OperatorControl()
|
||||
{
|
||||
robotDrive.SetSafetyEnabled(false);
|
||||
while (IsOperatorControl())
|
||||
{
|
||||
// Use the joystick X axis for lateral movement, Y axis for forward movement, and Z axis for rotation.
|
||||
// This sample does not use field-oriented drive, so the gyro input is set to zero.
|
||||
robotDrive.MecanumDrive_Cartesian(stick.GetX(), stick.GetY(), stick.GetZ());
|
||||
|
||||
Wait(0.005); // wait 5ms to avoid hogging CPU cycles
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
START_ROBOT_CLASS(Robot);
|
||||
@@ -1,24 +0,0 @@
|
||||
#include <networktables/NetworkTable.h>
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
// This is a simple robot program
|
||||
int main()
|
||||
{
|
||||
NetworkTable::SetServerMode();
|
||||
NetworkTable::SetTeam(190);
|
||||
NetworkTable* table = NetworkTable::GetTable("SmartDashboard");
|
||||
cout << "Started up" << endl;
|
||||
|
||||
long i = 0;
|
||||
while (true)
|
||||
{
|
||||
cout << i << endl;
|
||||
table->PutNumber("i", i);
|
||||
i++;
|
||||
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
* points than get none. When called sequentially, this command will block until
|
||||
* the hot goal is detected or until it is timed out.
|
||||
*/
|
||||
class CheckForHotGoal : Command {
|
||||
class CheckForHotGoal : public Command {
|
||||
public:
|
||||
CheckForHotGoal(double time);
|
||||
void Initialize();
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Commands/SetPivotSetpoint.h"
|
||||
#include "Commands/DriveForward.h"
|
||||
#include "Commands/Shoot.h"
|
||||
#include "Commands/CheckForHotGoal.h"
|
||||
|
||||
DriveAndShootAutonomous::DriveAndShootAutonomous() {
|
||||
AddSequential(new CloseClaw());
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -43,8 +43,6 @@ DriveTrain::DriveTrain() :
|
||||
leftEncoder->SetDistancePerPulse((4.0/*in*/*M_PI)/(360.0*12.0/*in/ft*/));
|
||||
#endif
|
||||
|
||||
rightEncoder->Start();
|
||||
leftEncoder->Start();
|
||||
LiveWindow::GetInstance()->AddSensor("DriveTrain", "Right Encoder", rightEncoder);
|
||||
LiveWindow::GetInstance()->AddSensor("DriveTrain", "Left Encoder", leftEncoder);
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package $package;
|
||||
|
||||
/**
|
||||
* Simplest possible robot program
|
||||
*
|
||||
* @author Team $team-number
|
||||
*/
|
||||
public class Robot {
|
||||
|
||||
/**
|
||||
* @param args Input....
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// Do stuff here!
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<examples>
|
||||
<!-- TODO add back in when there are enough samples to justify tags
|
||||
<tagDescription>
|
||||
<name>Simple Robot</name>
|
||||
<description>Examples for simple robot programs.</description>
|
||||
@@ -10,48 +11,135 @@
|
||||
variety of tasks such as sending and receiving values to both
|
||||
dashboards and co-processors.</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<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>
|
||||
|
||||
<tagDescription>
|
||||
<name>CommandBased Robot</name>
|
||||
<description>Examples for CommandBased robot programs.</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Simulation</name>
|
||||
<description>Examples that can be run in simulation.</description>
|
||||
<name>Actuators</name>
|
||||
<description>Example programs that demonstrate the use of various actuators</description>
|
||||
</tagDescription>
|
||||
|
||||
<example>
|
||||
<name>Simple Robot Example</name>
|
||||
<description>The simplest possible program that compiles. This
|
||||
shows the structure of a simple program that does nothing at
|
||||
all.</description>
|
||||
<tags>
|
||||
<tag>Simple Robot</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Simple Robot Example/Robot.java" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<name>Network Table Counter</name>
|
||||
<description>A simple program that increments a network table
|
||||
variable once every second. This shows the structure of a simple
|
||||
program that only uses network tables.</description>
|
||||
<tags>
|
||||
<tag>Simple Robot</tag>
|
||||
<tag>Network Tables</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Network Table Counter/Robot.cpp" destination="src/Robot.cpp" />
|
||||
</files>
|
||||
|
||||
<tagDescription>
|
||||
<name>Analog</name>
|
||||
<description>Examples programs that show different uses of analog inputs,
|
||||
outputs and various analog sensors</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>CAN</name>
|
||||
<description>Example programs that demonstrate the use of the CAN components in the control system</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Complete List</name>
|
||||
<description>Complete list of all sample programs across all categories</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Digital</name>
|
||||
<description>Example programs that demonstrate the sensors that use the digital I/O ports</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>I2C</name>
|
||||
<description>Example programs that demonstrate the use of I2C and various sensors that use it</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Joystick</name>
|
||||
<description>Example programs that demonstate different uses of joysticks for robot driving</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Pneumatics</name>
|
||||
<description>Example programs that demonstrate the use of the compressor and solenoids</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Robot and Motor</name>
|
||||
<description>Example programs that demonstrate driving a robot and motors including safety, servos, etc.</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>SPI</name>
|
||||
<description>Example programs that demonstrate the use of the SPI bus and sensors that connect to it</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Safety</name>
|
||||
<description>Example programs that demonstate the motor safety classes and how to use them with your programs</description>
|
||||
</tagDescription>
|
||||
|
||||
<tagDescription>
|
||||
<name>Sensors</name>
|
||||
<description>Example programs that demonstrate the use of the various commonly used sensors on FRC robots</description>
|
||||
</tagDescription>
|
||||
|
||||
<example>
|
||||
<name>Arcade Drive</name>
|
||||
<description>An example program which the use of Arcade Drive with the RobotDrive class</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/ArcadeDrive/src/Robot.cpp" destination="src/Robot.cpp"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
|
||||
<example>
|
||||
<name>Mecanum Drive</name>
|
||||
<description>An example program which the use of Mecanum Drive with the RobotDrive class</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Robot and Motor</tag>
|
||||
<tag>Joystick</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/MecanumDrive/src/Robot.cpp" destination="src/Robot.cpp"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
|
||||
<example>
|
||||
<name>Getting Started</name>
|
||||
<description>An example program which demonstrates the simplest autonomous and
|
||||
teleoperated routines.</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GettingStarted/src/Robot.cpp"
|
||||
destination="src/Robot.cpp"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<name>GearsBot</name>
|
||||
<description>A fully functional example CommandBased program for
|
||||
@@ -59,7 +147,7 @@
|
||||
supports simulation.</description>
|
||||
<tags>
|
||||
<tag>CommandBased Robot</tag>
|
||||
<tag>Simulation</tag>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
@@ -137,15 +225,14 @@
|
||||
destination="src/Subsystems/Wrist.h"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
|
||||
<example>
|
||||
<name>PacGoat</name>
|
||||
<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>
|
||||
<tag>Simulation</tag>
|
||||
<tag>2014 Season</tag>
|
||||
</tags>
|
||||
<tag>Complete List</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
<package>src/Commands</package>
|
||||
|
||||
@@ -17,8 +17,8 @@ class Robot: public SampleRobot
|
||||
|
||||
public:
|
||||
Robot() :
|
||||
myRobot(1, 2), // these must be initialized in the same order
|
||||
stick(1) // as they are declared above.
|
||||
myRobot(0, 1), // these must be initialized in the same order
|
||||
stick(0) // as they are declared above.
|
||||
{
|
||||
myRobot.SetExpiration(0.1);
|
||||
}
|
||||
|
||||
@@ -58,15 +58,6 @@ public class WPILibCPPPlugin extends AbstractUIPlugin implements IStartup {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
public String getDefaultToolchainVersion() {
|
||||
return "arm-none-linux-gnueabi-4.4.1";
|
||||
}
|
||||
|
||||
public String getToolchain() {
|
||||
return WPILibCore.getDefault().getWPILibBaseDir()
|
||||
+ File.separator + "toolchains" + File.separator + getPreferenceStore().getString(PreferenceConstants.TOOLCHAIN_VERSION);
|
||||
}
|
||||
|
||||
public String getCurrentVersion() {
|
||||
try {
|
||||
Properties props = new AntPropertiesParser(WPILibCPPPlugin.class.getResourceAsStream("/resources/configuration.properties")).getProperties();
|
||||
@@ -82,7 +73,7 @@ public class WPILibCPPPlugin extends AbstractUIPlugin implements IStartup {
|
||||
|
||||
public String getCPPDir() {
|
||||
return WPILibCore.getDefault().getWPILibBaseDir()
|
||||
+ File.separator + "cpp" + File.separator + getPreferenceStore().getString(PreferenceConstants.LIBRARY_VERSION);
|
||||
+ File.separator + "cpp" + File.separator + "current";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.installer;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.variables.IStringVariableManager;
|
||||
import org.eclipse.core.variables.IValueVariable;
|
||||
import org.eclipse.core.variables.VariablesPlugin;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
import edu.wpi.first.wpilib.plugins.core.installer.AbstractInstaller;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
@@ -19,28 +20,43 @@ import edu.wpi.first.wpilib.plugins.cpp.preferences.PreferenceConstants;
|
||||
public class CPPInstaller extends AbstractInstaller {
|
||||
|
||||
public CPPInstaller(String version) {
|
||||
super(version);
|
||||
super(version,
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().getString(PreferenceConstants.LIBRARY_INSTALLED), WPILibCPPPlugin.getDefault().getCPPDir());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName() {
|
||||
return "cpp";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateInstalledVersion(String version) {
|
||||
IPreferenceStore prefs = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
if (prefs.getBoolean(PreferenceConstants.UPDATE_LIBRARY_VERSION)) {
|
||||
WPILibCPPPlugin.logInfo("Forcing library version to "+version);
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
props.setProperty("cpp-version", version);
|
||||
WPILibCore.getDefault().saveGlobalProperties(props);
|
||||
prefs.setValue(PreferenceConstants.LIBRARY_VERSION, version);
|
||||
WPILibCPPPlugin.getDefault().getPreferenceStore().setValue(PreferenceConstants.LIBRARY_INSTALLED,
|
||||
version);
|
||||
|
||||
IStringVariableManager vm = VariablesPlugin.getDefault().getStringVariableManager();
|
||||
try
|
||||
{
|
||||
if (System.getProperty("os.name").startsWith("Windows"))
|
||||
{
|
||||
IValueVariable vv = vm.getValueVariable("HOME");
|
||||
if (vv == null)
|
||||
vm.addVariables(new IValueVariable[]{vm.newValueVariable("HOME", "user.home directory", false,System.getProperty("user.home"))});
|
||||
else
|
||||
{
|
||||
if (!System.getProperty("user.home").equals(vm.performStringSubstitution("${HOME}")))
|
||||
vv.setValue(System.getProperty("user.home"));
|
||||
}
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected InputStream getInstallResourceStream() {
|
||||
return CPPInstaller.class.getResourceAsStream("/resources/cpp.zip");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getFeatureName()
|
||||
{
|
||||
return "cpp";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,16 +111,16 @@ public class DeployLaunchShortcut implements ILaunchShortcut
|
||||
// Debug deploys are done with the Eclipse Remote System Explorer,
|
||||
// which lets it work with Eclipse's C++ debugger.
|
||||
|
||||
// Kill running program before using RSE as RSE can't
|
||||
WPILibCPPPlugin.logInfo("Running ant file: " + activeProj.getLocation().toOSString() + File.separator + "build.xml");
|
||||
WPILibCPPPlugin.logInfo("Targets: kill-program, Mode: " + mode);
|
||||
AntLauncher.runAntFile(new File (activeProj.getLocation().toOSString() + File.separator + "build.xml"), "kill-program", null, mode);
|
||||
|
||||
// TODO: figure out UI issues. that's why this is undocumented
|
||||
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);
|
||||
}
|
||||
@@ -139,21 +139,32 @@ public class DeployLaunchShortcut implements ILaunchShortcut
|
||||
String remote_connection = RSEUtils.getTarget(teamNumber).getName();
|
||||
|
||||
ILaunchConfigurationWorkingCopy config = type.newInstance(null, activeProj.getName());
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_COREFILE_PATH, "");
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, false);
|
||||
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, "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(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, WPILibCPPPlugin.getDefault().getToolchain() + "/bin/arm-none-linux-gnueabi-gdb");
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION, remote_connection);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ID, "gdbserver");
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_SKIP_DOWNLOAD_TO_TARGET, false);
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_PORT, "2345");
|
||||
config.setAttribute(IRemoteConnectionConfigurationConstants.ATTR_GDBSERVER_COMMAND, "gdbserver");
|
||||
|
||||
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);
|
||||
return config;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,8 +16,10 @@ public class RSEUtils {
|
||||
|
||||
public static IHost getTarget(int teamNumber) {
|
||||
// The ip address based on the team number
|
||||
String hostName = "10."+(teamNumber/100)+"."+(teamNumber%100)+".2";
|
||||
String connectionName = hostName; //"Team "+teamNumber;
|
||||
//String hostName = "10."+(teamNumber/100)+"."+(teamNumber%100)+".2";
|
||||
//String connectionName = hostName; //"Team "+teamNumber;
|
||||
String hostName = "roboRIO-" + teamNumber + ".local";
|
||||
String connectionName = hostName;
|
||||
|
||||
// get the singleton RSE registry
|
||||
try {
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
package edu.wpi.first.wpilib.plugins.cpp.preferences;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.eclipse.jface.preference.BooleanFieldEditor;
|
||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||
import org.eclipse.ui.IWorkbench;
|
||||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
|
||||
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
|
||||
import edu.wpi.first.wpilib.plugins.core.preferences.ComboFieldEditor;
|
||||
import edu.wpi.first.wpilib.plugins.cpp.WPILibCPPPlugin;
|
||||
|
||||
/**
|
||||
* This class represents a preference page that
|
||||
* is contributed to the Preferences dialog. By
|
||||
* subclassing <samp>FieldEditorPreferencePage</samp>, we
|
||||
* can use the field support built into JFace that allows
|
||||
* us to create a page that is small and knows how to
|
||||
* save, restore and apply itself.
|
||||
* <p>
|
||||
* This page is used to modify preferences only. They
|
||||
* are stored in the preference store that belongs to
|
||||
* the main plug-in class. That way, preferences can
|
||||
* be accessed directly via the preference store.
|
||||
*/
|
||||
|
||||
public class CPPPreferencePage
|
||||
extends FieldEditorPreferencePage
|
||||
implements IWorkbenchPreferencePage {
|
||||
ComboFieldEditor toolchainVersionEditor;
|
||||
BooleanFieldEditor autoUpdateToolchainEditor;
|
||||
private ComboFieldEditor wpiLibVersionEditor;
|
||||
private BooleanFieldEditor autoUpdateEditor;
|
||||
|
||||
public CPPPreferencePage() {
|
||||
super(GRID);
|
||||
setPreferenceStore(WPILibCPPPlugin.getDefault().getPreferenceStore());
|
||||
setDescription("Change workspace level settings for C++.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the field editors. Field editors are abstractions of
|
||||
* the common GUI blocks needed to manipulate various types
|
||||
* of preferences. Each field editor knows how to save and
|
||||
* restore itself.
|
||||
*/
|
||||
public void createFieldEditors() {
|
||||
wpiLibVersionEditor = new ComboFieldEditor(PreferenceConstants.LIBRARY_VERSION,
|
||||
"&Library Version:", getFieldEditorParent(), getInstalledVersions());
|
||||
addField(wpiLibVersionEditor);
|
||||
autoUpdateEditor = new BooleanFieldEditor(PreferenceConstants.UPDATE_LIBRARY_VERSION,
|
||||
"&Auto Update Library Version", getFieldEditorParent());
|
||||
addField(autoUpdateEditor);
|
||||
toolchainVersionEditor = new ComboFieldEditor(PreferenceConstants.TOOLCHAIN_VERSION,
|
||||
"&Toolchain Version:", getFieldEditorParent(), getInstalledToolchains());
|
||||
addField(toolchainVersionEditor);
|
||||
autoUpdateToolchainEditor = new BooleanFieldEditor(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION,
|
||||
"&Auto Update Toolchain Version", getFieldEditorParent());
|
||||
addField(autoUpdateToolchainEditor);
|
||||
}
|
||||
|
||||
private List<String> getInstalledVersions() {
|
||||
File[] dirs = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"cpp")
|
||||
.listFiles(new FileFilter() {
|
||||
@Override public boolean accept(File f) {
|
||||
return f.isDirectory();
|
||||
}
|
||||
});
|
||||
List<String> versions = new ArrayList<String>();
|
||||
for (File dir : dirs) {
|
||||
versions.add(dir.getName());
|
||||
}
|
||||
Collections.sort(versions);
|
||||
return versions;
|
||||
}
|
||||
|
||||
private List<String> getInstalledToolchains() {
|
||||
File[] dirs = new File(WPILibCore.getDefault().getWPILibBaseDir()+File.separator+"toolchains")
|
||||
.listFiles(new FileFilter() {
|
||||
@Override public boolean accept(File f) {
|
||||
return f.isDirectory();
|
||||
}
|
||||
});
|
||||
List<String> versions = new ArrayList<String>();
|
||||
for (File dir : dirs) {
|
||||
versions.add(dir.getName());
|
||||
}
|
||||
Collections.sort(versions);
|
||||
return versions;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
|
||||
*/
|
||||
public void init(IWorkbench workbench) {
|
||||
WPILibCPPPlugin.logInfo("Preferences initialized.");
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
getPreferenceStore().setValue(PreferenceConstants.LIBRARY_VERSION,
|
||||
props.getProperty("cpp-version", WPILibCPPPlugin.getDefault().getCurrentVersion()));
|
||||
}
|
||||
|
||||
@Override public void performApply() {
|
||||
performOk();
|
||||
}
|
||||
|
||||
@Override public boolean performOk() {
|
||||
Properties props = WPILibCore.getDefault().getProjectProperties(null);
|
||||
props.setProperty("cpp-version", wpiLibVersionEditor.getChoice());
|
||||
WPILibCore.getDefault().saveGlobalProperties(props);
|
||||
return super.performOk();
|
||||
}
|
||||
}
|
||||
@@ -4,8 +4,5 @@ package edu.wpi.first.wpilib.plugins.cpp.preferences;
|
||||
* Constant definitions for plug-in preferences
|
||||
*/
|
||||
public class PreferenceConstants {
|
||||
public static final String LIBRARY_VERSION = "libraryVersionPreference";
|
||||
public static final String UPDATE_LIBRARY_VERSION = "udpateLibraryVersionPreference";
|
||||
public static final String TOOLCHAIN_VERSION = "toolchainVersionPreference";
|
||||
public static final String UPDATE_TOOLCHAIN_VERSION = "udpateToolchainVersionPreference";
|
||||
public static final String LIBRARY_INSTALLED = "libraryVersion_current";
|
||||
}
|
||||
|
||||
@@ -18,11 +18,8 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer {
|
||||
*/
|
||||
public void initializeDefaultPreferences() {
|
||||
IPreferenceStore store = WPILibCPPPlugin.getDefault().getPreferenceStore();
|
||||
store.setDefault(PreferenceConstants.LIBRARY_VERSION,
|
||||
WPILibCore.getDefault().getProjectProperties(null)
|
||||
.getProperty("cpp-version", WPILibCPPPlugin.getDefault().getCurrentVersion()));
|
||||
store.setDefault(PreferenceConstants.UPDATE_LIBRARY_VERSION, true);
|
||||
store.setDefault(PreferenceConstants.TOOLCHAIN_VERSION, WPILibCPPPlugin.getDefault().getDefaultToolchainVersion());
|
||||
store.setDefault(PreferenceConstants.UPDATE_TOOLCHAIN_VERSION, true);
|
||||
if (!store.contains(PreferenceConstants.LIBRARY_INSTALLED))
|
||||
store.setValue(PreferenceConstants.LIBRARY_INSTALLED,
|
||||
"none");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,10 +38,18 @@ public class CPPProjectType implements ProjectType {
|
||||
return files;
|
||||
}
|
||||
};
|
||||
static ProjectType SAMPLE = new CPPProjectType() {
|
||||
@Override public Map<String, String> getFiles(String packageName) {
|
||||
Map<String, String> files = super.getFiles(packageName);
|
||||
files.put("src/Robot.cpp", "sample/Robot.cpp");
|
||||
return files;
|
||||
}
|
||||
};
|
||||
@SuppressWarnings("serial")
|
||||
static Map<String, ProjectType> TYPES = new HashMap<String, ProjectType>() {{
|
||||
put(ProjectType.ITERATIVE, ITERATIVE);
|
||||
put(ProjectType.COMMAND_BASED, COMMAND_BASED);
|
||||
put(ProjectType.SAMPLE, SAMPLE);
|
||||
}};
|
||||
|
||||
@Override
|
||||
|
||||
@@ -44,7 +44,6 @@ public class WPIRobotCPPProjectCreator implements IProjectCreator {
|
||||
public Map<String, String> getValues() {
|
||||
Map<String, String> vals = new HashMap<String, String>();
|
||||
vals.put("$project", projectName);
|
||||
vals.put("$toolchain", WPILibCPPPlugin.getDefault().getToolchain());
|
||||
vals.put("$cpp-location", WPILibCPPPlugin.getDefault().getCPPDir());
|
||||
vals.put("$world", worldName);
|
||||
return vals;
|
||||
@@ -74,9 +73,6 @@ public class WPIRobotCPPProjectCreator implements IProjectCreator {
|
||||
} catch (CoreException e) {
|
||||
WPILibCPPPlugin.logError("Error intializing FRC C++ project.", e);
|
||||
}
|
||||
|
||||
//config.getToolChain().getOptionById("cdt.managedbuild.option.gnu.cross.prefix").setValue(prefix);
|
||||
//config.getToolChain().getOptionById("cdt.managedbuild.option.gnu.cross.path").setValue(path);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,15 @@
|
||||
username="${username}"
|
||||
password="${password}"
|
||||
trust="true"
|
||||
command="tail -F -s 0 -n 0 ${deploy.log.file}"/>
|
||||
command="tail -F -n 0 ${deploy.log.file}"/>
|
||||
</target>
|
||||
|
||||
<target name="kill-program" depends="get-target-ip" description="Kill the currently running FRC program">
|
||||
<sshexec host="${target}"
|
||||
username="${username}"
|
||||
password="${password}"
|
||||
trust="true"
|
||||
command="/usr/local/frc/bin/frcKillRobot.sh"/>
|
||||
</target>
|
||||
|
||||
<target name="debug-deploy" depends="get-target-ip" description="Deploy the jar and start the program running in debug mode.">
|
||||
|
||||
@@ -157,15 +157,6 @@
|
||||
</enablement>
|
||||
</commonWizard>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.preferencePages">
|
||||
<page
|
||||
category="edu.wpi.first.wpilib.plugins.core.preferences.WPILibPreferencePage"
|
||||
class="edu.wpi.first.wpilib.plugins.java.preferences.JavaPreferencePage"
|
||||
id="edu.wpi.first.wpilib.plugins.java.preferences.JavaPreferencePage"
|
||||
name="Java Preferences">
|
||||
</page>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.runtime.preferences">
|
||||
<initializer
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJavaDevices</artifactId>
|
||||
<artifactId>wpilibJavaFinal</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<classifier>sources</classifier>
|
||||
<outputDirectory>${java-zip}/lib</outputDirectory>
|
||||
@@ -107,6 +107,13 @@
|
||||
<type>javadoc</type>
|
||||
<outputDirectory>${java-zip}/javadoc-jar</outputDirectory>
|
||||
</artifactItem>
|
||||
<artifactItem>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJava</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<type>javadoc</type>
|
||||
<outputDirectory>${java-zip}/javadoc-jar</outputDirectory>
|
||||
</artifactItem>
|
||||
</artifactItems>
|
||||
|
||||
<overWriteReleases>false</overWriteReleases>
|
||||
@@ -329,6 +336,12 @@
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJavaFinal</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<classifier>sources</classifier>
|
||||
</dependency>
|
||||
<!-- dependency>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
<artifactId>jna</artifactId>
|
||||
@@ -361,6 +374,12 @@
|
||||
</dependency>
|
||||
|
||||
<!-- Javadoc -->
|
||||
<dependency>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJava</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<type>javadoc</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJavaDevices</artifactId>
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package $package;
|
||||
|
||||
import edu.wpi.first.wpilibj.buttons.Button;
|
||||
import $package.commands.ExampleCommand;
|
||||
|
||||
/**
|
||||
* This class is the glue that binds the controls on the physical operator
|
||||
* interface to the commands and command groups that allow control of the robot.
|
||||
*/
|
||||
public class OI {
|
||||
//// CREATING BUTTONS
|
||||
// One type of button is a joystick button which is any button on a joystick.
|
||||
// You create one by telling it which joystick it's on and which button
|
||||
// number it is.
|
||||
// Joystick stick = new Joystick(port);
|
||||
// Button button = new JoystickButton(stick, buttonNumber);
|
||||
|
||||
// There are a few additional built in buttons you can use. Additionally,
|
||||
// by subclassing Button you can create custom triggers and bind those to
|
||||
// commands the same as any other Button.
|
||||
|
||||
//// TRIGGERING COMMANDS WITH BUTTONS
|
||||
// Once you have a button, it's trivial to bind it to a button in one of
|
||||
// three ways:
|
||||
|
||||
// Start the command when the button is pressed and let it run the command
|
||||
// until it is finished as determined by it's isFinished method.
|
||||
// button.whenPressed(new ExampleCommand());
|
||||
|
||||
// Run the command while the button is being held down and interrupt it once
|
||||
// the button is released.
|
||||
// button.whileHeld(new ExampleCommand());
|
||||
|
||||
// Start the command when the button is released and let it run the command
|
||||
// until it is finished as determined by it's isFinished method.
|
||||
// button.whenReleased(new ExampleCommand());
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import $package.subsystems.ExampleSubsystem;
|
||||
public class Robot extends IterativeRobot {
|
||||
|
||||
public static final ExampleSubsystem exampleSubsystem = new ExampleSubsystem();
|
||||
public static OI oi;
|
||||
|
||||
Command autonomousCommand;
|
||||
|
||||
@@ -26,6 +27,7 @@ public class Robot extends IterativeRobot {
|
||||
* used for any initialization code.
|
||||
*/
|
||||
public void robotInit() {
|
||||
oi = new OI();
|
||||
// instantiate the command used for the autonomous period
|
||||
autonomousCommand = new ExampleCommand();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package $package;
|
||||
/**
|
||||
* The RobotMap is a mapping from the ports sensors and actuators are wired into
|
||||
* to a variable name. This provides flexibility changing wiring, makes checking
|
||||
* the wiring easier and significantly reduces the number of magic numbers
|
||||
* floating around.
|
||||
*/
|
||||
public class RobotMap {
|
||||
// For example to map the left and right motors, you could define the
|
||||
// following variables to use with your drivetrain subsystem.
|
||||
// public static final int leftMotor = 1;
|
||||
// public static final int rightMotor = 2;
|
||||
|
||||
// If you are using multiple modules, make sure to define both the port
|
||||
// number and the module. For example you with a rangefinder:
|
||||
// public static final int rangefinderPort = 1;
|
||||
// public static final int rangefinderModule = 1;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package $package;
|
||||
|
||||
import edu.wpi.first.wpilibj.IterativeRobot;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.RobotDrive;
|
||||
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
|
||||
|
||||
/**
|
||||
* The VM is configured to automatically run this class, and to call the
|
||||
* functions corresponding to each mode, as described in the IterativeRobot
|
||||
* 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.
|
||||
*/
|
||||
public class Robot extends IterativeRobot {
|
||||
RobotDrive myRobot;
|
||||
Joystick stick;
|
||||
int autoLoopCounter;
|
||||
|
||||
/**
|
||||
* This function is run when the robot is first started up and should be
|
||||
* used for any initialization code.
|
||||
*/
|
||||
public void robotInit() {
|
||||
myRobot = new RobotDrive(0,1);
|
||||
stick = new Joystick(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is run once each time the robot enters autonomous mode
|
||||
*/
|
||||
public void autonomousInit() {
|
||||
autoLoopCounter = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called periodically during autonomous
|
||||
*/
|
||||
public void autonomousPeriodic() {
|
||||
if(autoLoopCounter < 100) //Check if we've completed 100 loops (approximately 2 seconds)
|
||||
{
|
||||
myRobot.drive(-0.5, 0.0); // drive forwards half speed
|
||||
autoLoopCounter++;
|
||||
} else {
|
||||
myRobot.drive(0.0, 0.0); // stop robot
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called once each time the robot enters tele-operated mode
|
||||
*/
|
||||
public void teleopInit(){
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called periodically during operator control
|
||||
*/
|
||||
public void teleopPeriodic() {
|
||||
myRobot.arcadeDrive(stick);
|
||||
}
|
||||
|
||||
/**
|
||||
* This function is called periodically during test mode
|
||||
*/
|
||||
public void testPeriodic() {
|
||||
LiveWindow.run();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
|
||||
package org.usfirst.frc.team190.robot;
|
||||
|
||||
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.RobotDrive;
|
||||
import edu.wpi.first.wpilibj.RobotDrive.MotorType;
|
||||
import edu.wpi.first.wpilibj.SampleRobot;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
|
||||
/**
|
||||
* This is a demo program showing how to use Mecanum control with the RobotDrive class.
|
||||
*/
|
||||
public class Robot extends SampleRobot {
|
||||
|
||||
RobotDrive robotDrive;
|
||||
Joystick stick;
|
||||
|
||||
// Channels for the wheels
|
||||
final int frontLeftChannel = 2;
|
||||
final int rearLeftChannel = 3;
|
||||
final int frontRightChannel = 1;
|
||||
final int rearRightChannel = 0;
|
||||
|
||||
// The channel on the driver station that the joystick is connected to
|
||||
final int joystickChannel = 0;
|
||||
|
||||
public Robot() {
|
||||
robotDrive.setExpiration(0.1);
|
||||
robotDrive = new RobotDrive(frontLeftChannel, rearLeftChannel, frontRightChannel, rearRightChannel);
|
||||
robotDrive.setInvertedMotor(MotorType.kFrontLeft, true); // invert the left side motors
|
||||
robotDrive.setInvertedMotor(MotorType.kRearLeft, true); // you may need to change or remove this to match your robot
|
||||
|
||||
stick = new Joystick(joystickChannel);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Runs the motors with Mecanum drive.
|
||||
*/
|
||||
public void operatorControl() {
|
||||
robotDrive.setSafetyEnabled(true);
|
||||
while (isOperatorControl()) {
|
||||
|
||||
// Use the joystick X axis for lateral movement, Y axis for forward movement, and Z axis for rotation.
|
||||
// This sample does not use field-oriented drive, so the gyro input is set to zero.
|
||||
robotDrive.mecanumDrive_Cartesian(stick.getX(), stick.getY(), stick.getZ(), 0);
|
||||
|
||||
Timer.delay(0.005); // wait 5ms to avoid hogging CPU cycles
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
|
||||
package org.usfirst.frc.team190.robot;
|
||||
|
||||
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.SpeedController;
|
||||
import edu.wpi.first.wpilibj.Talon;
|
||||
import edu.wpi.first.wpilibj.SampleRobot;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
|
||||
/**
|
||||
* This sample program shows how to control a motor using a joystick. In the operator
|
||||
* control part of the program, the joystick is read and the value is written to the motor.
|
||||
*
|
||||
* Joystick analog values range from -1 to 1 and speed controller inputs also range from -1
|
||||
* to 1 making it easy to work together. The program also delays a short time in the loop
|
||||
* to allow other threads to run. This is generally a good idea, especially since the joystick
|
||||
* values are only transmitted from the Driver Station once every 20ms.
|
||||
*/
|
||||
public class Robot extends SampleRobot {
|
||||
|
||||
private SpeedController motor; // the motor to directly control with a joystick
|
||||
private Joystick stick;
|
||||
|
||||
private final double k_updatePeriod = 0.005; // update every 0.005 seconds/5 milliseconds (200Hz)
|
||||
|
||||
public Robot() {
|
||||
motor = new Talon(0); // initialize the motor as a Talon on channel 0
|
||||
stick = new Joystick(0); // initialize the joystick on port 0
|
||||
}
|
||||
|
||||
/**
|
||||
* Runs the motor from a joystick.
|
||||
*/
|
||||
public void operatorControl() {
|
||||
while (isOperatorControl()) {
|
||||
// Set the motor's output.
|
||||
// This takes a number from -1 (100% speed in reverse) to +1 (100% speed going forward)
|
||||
motor.set(stick.getY());
|
||||
|
||||
Timer.delay(k_updatePeriod); // wait 5ms to the next update
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package $package;
|
||||
|
||||
import edu.wpi.first.wpilibj.networktables.NetworkTable;
|
||||
|
||||
/**
|
||||
* An example of a network table counter.
|
||||
*
|
||||
* @author Team $team-number
|
||||
*/
|
||||
public class Robot {
|
||||
|
||||
private static NetworkTable table;
|
||||
|
||||
/**
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
NetworkTable.setServerMode();
|
||||
NetworkTable.setTeam(190);
|
||||
table = NetworkTable.getTable("SmartDashboard");
|
||||
System.out.println("Started up");
|
||||
|
||||
long i = 0;
|
||||
while (true) {
|
||||
System.out.println(i);
|
||||
table.putNumber("i", i);
|
||||
i++;
|
||||
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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());
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
package $package;
|
||||
|
||||
/**
|
||||
* Simplest possible robot program
|
||||
*
|
||||
* @author Team $team-number
|
||||
*/
|
||||
public class Robot {
|
||||
|
||||
/**
|
||||
* @param args Input....
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
// Do stuff here!
|
||||
}
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user