mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Compare commits
21 Commits
test-tag
...
jenkins-st
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
777dc2113d | ||
|
|
174f2c0e23 | ||
|
|
434caf81d7 | ||
|
|
9327170069 | ||
|
|
597e209c09 | ||
|
|
ad1ace1022 | ||
|
|
70d09de2e9 | ||
|
|
f7e1753e03 | ||
|
|
df3f3cc0e1 | ||
|
|
25308e2442 | ||
|
|
6b3e2690d0 | ||
|
|
ae10d43900 | ||
|
|
d4e377fc0e | ||
|
|
9126646fef | ||
|
|
d3f632486f | ||
|
|
268459206f | ||
|
|
df390c275d | ||
|
|
1742634a96 | ||
|
|
0f8f83500b | ||
|
|
d5c73c95dc | ||
|
|
ca7dc5d6ac |
@@ -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";
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
<listOptionValue builtIn="false" value="$cpp-location/lib"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.link.option.libs.1072058280" name="Libraries (-l)" superClass="gnu.cpp.link.option.libs" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="WPILib"/>
|
||||
<listOptionValue builtIn="false" value="WPILibAthena"/>
|
||||
<listOptionValue builtIn="false" value="WPILib"/>
|
||||
<listOptionValue builtIn="false" value="HALAthena"/>
|
||||
@@ -155,7 +154,7 @@
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}}/src""/>
|
||||
<listOptionValue builtIn="false" value="$cpp-location/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"/>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(1), // 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);
|
||||
@@ -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());
|
||||
|
||||
@@ -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,47 +11,34 @@
|
||||
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>
|
||||
<example>
|
||||
<name>Getting Started</name>
|
||||
<description>An example program which demonstrates the simplest autonomous and
|
||||
teleoperated routines.</description>
|
||||
<tags>
|
||||
<tag>Getting Started with C++</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GettingStarted/src/Robot.cpp"
|
||||
destination="src/Robot.cpp"></file>
|
||||
</files>
|
||||
</example>
|
||||
|
||||
<tagDescription>
|
||||
<name>CommandBased Robot</name>
|
||||
<description>Examples for CommandBased robot programs.</description>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Simulation</name>
|
||||
<description>Examples that can be run in simulation.</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>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<name>GearsBot</name>
|
||||
@@ -59,7 +47,6 @@
|
||||
supports simulation.</description>
|
||||
<tags>
|
||||
<tag>CommandBased Robot</tag>
|
||||
<tag>Simulation</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
@@ -137,14 +124,12 @@
|
||||
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>
|
||||
<packages>
|
||||
<package>src</package>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,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(1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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,63 +1,49 @@
|
||||
<?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>
|
||||
</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>
|
||||
</tagDescription>
|
||||
<tagDescription>
|
||||
<name>Network Tables</name>
|
||||
<description>Examples of how to use Network Tables to accomplish a
|
||||
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 Java</name>
|
||||
<description>Examples for getting started with FRC Java</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-dir</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Simple Robot Example/Robot.java" destination="src/$package-dir/Robot.java" />
|
||||
</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-dir</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/Network Table Counter/Robot.java" destination="src/$package-dir/Robot.java" />
|
||||
</files>
|
||||
<name>Getting Started</name>
|
||||
<description>An example program which demonstrates the simplest autonomous and
|
||||
teleoperated routines.</description>
|
||||
<tags>
|
||||
<tag>Getting Started with Java</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src/$package-dir</package>
|
||||
</packages>
|
||||
<files>
|
||||
<file source="examples/GettingStarted/src/org/usfirst/frc/team190/robot/Robot.java"
|
||||
destination="src/$package-dir/Robot.java"></file>
|
||||
</files>
|
||||
</example>
|
||||
<tagDescription>
|
||||
<name>CommandBased Robot</name>
|
||||
<description>Examples for CommandBased robot programs.</description>
|
||||
</tagDescription>
|
||||
|
||||
<example>
|
||||
<name>GearsBot</name>
|
||||
<description>A fully functional example CommandBased program for WPIs GearsBot robot. This code can run on your computer if it supports simulation.</description>
|
||||
<tags>
|
||||
<tag>CommandBased Robot</tag>
|
||||
<tag>Simulation</tag>
|
||||
</tags>
|
||||
<packages>
|
||||
<package>src/$package-dir</package>
|
||||
@@ -90,8 +76,6 @@
|
||||
<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>
|
||||
<packages>
|
||||
<package>src/$package-dir</package>
|
||||
|
||||
@@ -3,6 +3,9 @@ package $package;
|
||||
|
||||
|
||||
import edu.wpi.first.wpilibj.SampleRobot;
|
||||
import edu.wpi.first.wpilibj.RobotDrive;
|
||||
import edu.wpi.first.wpilibj.Joystick;
|
||||
import edu.wpi.first.wpilibj.Timer;
|
||||
|
||||
/**
|
||||
* This is a demo program showing the use of the RobotDrive class.
|
||||
|
||||
@@ -8,10 +8,10 @@ import edu.wpi.first.wpilib.plugins.core.wizards.ProjectType;
|
||||
import edu.wpi.first.wpilib.plugins.java.WPILibJavaPlugin;
|
||||
|
||||
public class JavaProjectType implements ProjectType {
|
||||
static ProjectType SIMPLE = new JavaProjectType() {
|
||||
static ProjectType SAMPLE = new JavaProjectType() {
|
||||
@Override public Map<String, String> getFiles(String packageName) {
|
||||
Map<String, String> files = super.getFiles(packageName);
|
||||
files.put("src/"+packageName.replace(".", "/")+"/Robot.java", "simple/Robot.java");
|
||||
files.put("src/"+packageName.replace(".", "/")+"/Robot.java", "sample/Robot.java");
|
||||
return files;
|
||||
}
|
||||
};
|
||||
@@ -40,7 +40,7 @@ public class JavaProjectType implements ProjectType {
|
||||
};
|
||||
@SuppressWarnings("serial")
|
||||
static Map<String, ProjectType> TYPES = new HashMap<String, ProjectType>() {{
|
||||
put(ProjectType.SIMPLE, SIMPLE);
|
||||
put(ProjectType.SAMPLE, SAMPLE);
|
||||
put(ProjectType.ITERATIVE, ITERATIVE);
|
||||
put(ProjectType.COMMAND_BASED, COMMAND_BASED);
|
||||
}};
|
||||
|
||||
1
jenkins/README
Normal file
1
jenkins/README
Normal file
@@ -0,0 +1 @@
|
||||
This directory contains special jenkins build options.
|
||||
2
jenkins/docs/.gitignore
vendored
Normal file
2
jenkins/docs/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
build/
|
||||
site/
|
||||
32
jenkins/docs/Makefile
Normal file
32
jenkins/docs/Makefile
Normal file
@@ -0,0 +1,32 @@
|
||||
allwpilib=../..
|
||||
version=DEVELOPMENT
|
||||
|
||||
all: java cpp site
|
||||
|
||||
java:
|
||||
mkdir -p build/java/
|
||||
mkdir -p site/java/
|
||||
cp -r $(allwpilib)/wpilibj/wpilibJava/src/main/java/* build/java/
|
||||
cp -r $(allwpilib)/wpilibj/wpilibJavaDevices/src/main/java/* build/java/
|
||||
# cp -r $(allwpilib)/networktables/java/src/main/java/* build/java/
|
||||
( cat java.doxy ; echo "PROJECT_NUMBER=${version}" ) | doxygen -
|
||||
|
||||
cpp:
|
||||
mkdir -p build/cpp/
|
||||
mkdir -p site/cpp/
|
||||
cp -r $(allwpilib)/wpilibc/wpilibC++/src build/cpp/
|
||||
cp -r $(allwpilib)/wpilibc/wpilibC++/include build/cpp/
|
||||
cp -r $(allwpilib)/wpilibc/wpilibC++Devices/src build/cpp/
|
||||
cp -r $(allwpilib)/wpilibc/wpilibC++Devices/include build/cpp/
|
||||
# cp -r $(allwpilib)/networktables/cpp/lib build/cpp/
|
||||
# cp -r $(allwpilib)/networktables/cpp/include build/cpp/
|
||||
( cat cpp.doxy ; echo "PROJECT_NUMBER=${version}" ) | doxygen -
|
||||
|
||||
# TODO: HAL
|
||||
|
||||
site:
|
||||
mkdir -p build/site/
|
||||
|
||||
clean:
|
||||
rm -rf build/
|
||||
rm -rf site/
|
||||
2305
jenkins/docs/cpp.doxy
Normal file
2305
jenkins/docs/cpp.doxy
Normal file
File diff suppressed because it is too large
Load Diff
2303
jenkins/docs/java.doxy
Normal file
2303
jenkins/docs/java.doxy
Normal file
File diff suppressed because it is too large
Load Diff
24
networktables/OutlineViewer/build.gradle
Normal file
24
networktables/OutlineViewer/build.gradle
Normal file
@@ -0,0 +1,24 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
|
||||
group = "edu.wpi.frc.wpilib"
|
||||
version = "2.0"
|
||||
|
||||
sourceCompatibility = 1.7
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs = ["src"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(":java")
|
||||
}
|
||||
19
networktables/cpp/build.gradle
Normal file
19
networktables/cpp/build.gradle
Normal file
@@ -0,0 +1,19 @@
|
||||
apply plugin: 'cpp'
|
||||
|
||||
libraries {
|
||||
main {}
|
||||
}
|
||||
|
||||
sources {
|
||||
main {
|
||||
cpp {
|
||||
source {
|
||||
srcDirs = ["lib/share", "lib/Athena"]
|
||||
// includes = "**/*.cpp"
|
||||
}
|
||||
exportedHeaders {
|
||||
srcDirs = ["include"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
24
networktables/java-table-viewer/build.gradle
Normal file
24
networktables/java-table-viewer/build.gradle
Normal file
@@ -0,0 +1,24 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
|
||||
group = "edu.wpi.frc.wpilib"
|
||||
version = "2.0"
|
||||
|
||||
sourceCompatibility = 1.7
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs = ["src"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(":java")
|
||||
}
|
||||
39
networktables/java/build.gradle
Normal file
39
networktables/java/build.gradle
Normal file
@@ -0,0 +1,39 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'maven'
|
||||
|
||||
group = "edu.wpi.frc.wpilib"
|
||||
version = "2.0"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs = ["src/main/java", "Athena/src/main/java"]
|
||||
}
|
||||
}
|
||||
test {
|
||||
java {
|
||||
srcDirs = ["Athena/src/test/java"]
|
||||
excludes = ["edu/wpi/first/wpilibj/networktables2/system/SystemTest.java"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
mavenLocal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.+'
|
||||
testCompile group: 'org.jmock', name: 'jmock-junit4', version: '2.6.0'
|
||||
testCompile group: 'org.jmock', name: 'jmock-legacy', version: '2.6.0'
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
repository(url: "file://localhost/tmp/myRepo/")
|
||||
pom.artifactId = 'networktables'
|
||||
}
|
||||
}
|
||||
}
|
||||
1
networktables/settings.gradle
Normal file
1
networktables/settings.gradle
Normal file
@@ -0,0 +1 @@
|
||||
include "java", "java-table-viewer"
|
||||
@@ -16,34 +16,21 @@ libwpilibsim-package-version = $(libwpilibsim-version)-$(package-version)
|
||||
frcsim-version = 0.1
|
||||
frcsim-package-version = $(frcsim-version)-$(package-version)
|
||||
|
||||
# Main Targets
|
||||
.PHONY: all jenkins allwpilib pull debs update-repository clean-repository clean install
|
||||
|
||||
all: debs update-repository
|
||||
|
||||
jenkins: download-models pull-eclipse-toolchain pull all
|
||||
jenkins: orig debs update-repository
|
||||
|
||||
allwpilib:
|
||||
cd $(allwpilib) && mvn -T 8 clean package -Dwith-eclipse-plugins -DskipTests -DskipIT
|
||||
|
||||
orig: pre-orig-clean
|
||||
cd frcsim-gazebo-plugins && tar --exclude="./debian" -czvf \
|
||||
frcsim-gazebo-plugins_${gazebo-plugins-version}.orig.tar.gz frcsim-gazebo-plugins
|
||||
cd frcsim-gazebo-models && tar --exclude="./debian" -czvf \
|
||||
frcsim-gazebo-models_${gazebo-models-version}.orig.tar.gz frcsim-gazebo-models
|
||||
cd frcsim-eclipse-plugins && tar --exclude="./debian" -czvf \
|
||||
frcsim-eclipse-plugins_${eclipse-plugins-version}.orig.tar.gz frcsim-eclipse-plugins
|
||||
cd frcsim-eclipse-toolchain-plugin && tar --exclude="./debian" -czvf \
|
||||
frcsim-eclipse-toolchain-plugin_${eclipse-toolchain-version}.orig.tar.gz frcsim-eclipse-toolchain-plugin
|
||||
cd frcsim-libwpilibsim-cpp && tar --exclude="./debian" -czvf \
|
||||
frcsim-libwpilibsim-cpp_${libwpilibsim-version}.orig.tar.gz frcsim-libwpilibsim-cpp
|
||||
cd frcsim && tar --exclude="./debian" -czvf \
|
||||
frcsim_${frcsim-version}.orig.tar.gz frcsim
|
||||
orig: -orig-frcsim-gazebo-plugins -orig-frcsim-gazebo-models -orig-frcsim-eclipse-plugins \
|
||||
-orig-frcsim-eclipse-toolchain-plugin -orig-frcsim-libwpilibsim-cpp -orig-frcsim
|
||||
|
||||
debs:
|
||||
cd frcsim-gazebo-plugins/frcsim-gazebo-plugins && debuild -us -uc -iamd64
|
||||
cd frcsim-gazebo-models/frcsim-gazebo-models && debuild -us -uc
|
||||
cd frcsim-eclipse-plugins/frcsim-eclipse-plugins && debuild -us -uc
|
||||
cd frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin && debuild -us -uc
|
||||
cd frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp && debuild -us -uc
|
||||
cd frcsim/frcsim && debuild -us -uc
|
||||
debs: -debs-frcsim-gazebo-plugins -debs-frcsim-gazebo-models -debs-frcsim-eclipse-plugins \
|
||||
-debs-frcsim-eclipse-toolchain-plugin -debs-frcsim-libwpilibsim-cpp -debs-frcsim
|
||||
|
||||
update-repository: clean-repository
|
||||
cd repository && reprepro includedeb $(codename) ../frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb
|
||||
@@ -61,40 +48,52 @@ clean-repository:
|
||||
cd repository && reprepro remove $(codename) frcsim-libwpilibsim-cpp
|
||||
cd repository && reprepro remove $(codename) frcsim
|
||||
|
||||
pre-orig-clean:
|
||||
cd frcsim-gazebo-plugins/frcsim-gazebo-plugins && debuild clean
|
||||
cd frcsim-gazebo-models/frcsim-gazebo-models && debuild clean
|
||||
cd frcsim-eclipse-plugins/frcsim-eclipse-plugins && debuild clean
|
||||
cd frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin && debuild clean
|
||||
cd frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp && debuild clean
|
||||
cd frcsim/frcsim && debuild clean
|
||||
clean:
|
||||
-rm frcsim-gazebo-models/frcsim-gazebo-models_${gazebo-models-version}.orig.tar.gz
|
||||
-rm frcsim-gazebo-plugins/frcsim-gazebo-plugins_${gazebo-plugins-version}.orig.tar.gz
|
||||
-rm frcsim-eclipse-plugins/frcsim-eclipse-plugins_${eclipse-plugins-version}.orig.tar.gz
|
||||
-rm frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_${eclipse-toolchain-version}.orig.tar.gz
|
||||
-rm frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_${libwpilibsim-version}.orig.tar.gz
|
||||
-rm frcsim/frcsim_$(frcsim-package-version)_all.deb
|
||||
|
||||
rm -f frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz
|
||||
rm -f frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-version).orig.tar.gz
|
||||
rm -f frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-version).orig.tar.gz
|
||||
rm -f frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-version).orig.tar.gz
|
||||
rm -f frcsim-libwpilib-cpp/frcsim-libwpilib-cpp_$(libwpilibsim-version).orig.tar.gz
|
||||
rm -f frcsim/frcsim_$(frcsim-version).orig.tar.gz
|
||||
-rm frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb
|
||||
-rm frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb
|
||||
-rm frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb
|
||||
-rm frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb
|
||||
-rm frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb
|
||||
-rm frcsim/frcsim_$(frcsim-package-version)_all.deb
|
||||
|
||||
clean: pre-orig-clean
|
||||
rm -rf frcsim-eclipse-plugins/frcsim-eclipse-plugins/plugins
|
||||
rm -rf frcsim-eclipse-plugins/frcsim-eclipse-plugins/features
|
||||
install:
|
||||
sudo dpkg -i frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb \
|
||||
frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb \
|
||||
frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb \
|
||||
frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb \
|
||||
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb \
|
||||
frcsim/frcsim_$(frcsim-package-version)_all.deb
|
||||
|
||||
rm -rf frcsim-gazebo-plugins/frcsim-gazebo-plugins/src
|
||||
# orig support (for faster parallel builds)
|
||||
.PHONY: -orig-frcsim-gazebo-plugins -orig-frcsim-gazebo-models -orig-frcsim-eclipse-plugins \
|
||||
-orig-frcsim-eclipse-toolchain-plugin -orig-frcsim-libwpilibsim-cpp -orig-frcsim
|
||||
.PHONY: -pull-gazebo-plugins -pull-eclipse-plugins -pull-libwpilibsim-cpp
|
||||
|
||||
rm -rf frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/src
|
||||
rm -rf frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/include
|
||||
rm -f frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/Makefile
|
||||
rm -f frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/CMakeLists.txt
|
||||
rm -rf frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/target
|
||||
-orig-frcsim-gazebo-models: frcsim-gazebo-models/frcsim-gazebo-models_${gazebo-models-version}.orig.tar.gz
|
||||
frcsim-gazebo-models/frcsim-gazebo-models_${gazebo-models-version}.orig.tar.gz:
|
||||
cd frcsim-gazebo-models && \
|
||||
wget --no-check-certificate $(gazebo-models-orig-url) -O frcsim-gazebo-models_${gazebo-models-version}.orig.tar.gz && \
|
||||
tar xvf frcsim-gazebo-models_${gazebo-models-version}.orig.tar.gz
|
||||
|
||||
pull: clean pull-gazebo-plugins pull-eclipse-plugins pull-libwpilibsim-cpp orig
|
||||
|
||||
pull-gazebo-plugins:
|
||||
-orig-frcsim-gazebo-plugins: frcsim-gazebo-plugins/frcsim-gazebo-plugins_${gazebo-plugins-version}.orig.tar.gz
|
||||
-pull-gazebo-plugins:
|
||||
cp -rf -t frcsim-gazebo-plugins/frcsim-gazebo-plugins/ $(allwpilib)/simulation/frc_gazebo_plugins/*
|
||||
echo Increment version?
|
||||
frcsim-gazebo-plugins/frcsim-gazebo-plugins_${gazebo-plugins-version}.orig.tar.gz: -pull-gazebo-plugins
|
||||
cd frcsim-gazebo-plugins/frcsim-gazebo-plugins && debuild clean
|
||||
rm -f frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz
|
||||
cd frcsim-gazebo-plugins && tar --exclude="./debian" -czvf \
|
||||
frcsim-gazebo-plugins_${gazebo-plugins-version}.orig.tar.gz frcsim-gazebo-plugins
|
||||
|
||||
pull-eclipse-plugins:
|
||||
-orig-frcsim-eclipse-plugins: frcsim-eclipse-plugins/frcsim-eclipse-plugins_${eclipse-plugins-version}.orig.tar.gz
|
||||
-pull-eclipse-plugins:
|
||||
rm -rf frcsim-eclipse-plugins/frcsim-eclipse-plugins/plugins
|
||||
rm -rf frcsim-eclipse-plugins/frcsim-eclipse-plugins/features
|
||||
mkdir -p frcsim-eclipse-plugins/frcsim-eclipse-plugins/plugins
|
||||
@@ -106,8 +105,14 @@ pull-eclipse-plugins:
|
||||
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/features/edu.wpi.first.wpilib.plugins.cpp.feature_* frcsim-eclipse-plugins/frcsim-eclipse-plugins/features
|
||||
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/features/edu.wpi.first.wpilib.plugins.core.feature_* frcsim-eclipse-plugins/frcsim-eclipse-plugins/features
|
||||
echo Increment version?
|
||||
frcsim-eclipse-plugins/frcsim-eclipse-plugins_${eclipse-plugins-version}.orig.tar.gz: -pull-eclipse-plugins
|
||||
cd frcsim-eclipse-plugins/frcsim-eclipse-plugins && debuild clean
|
||||
rm -f frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-version).orig.tar.gz
|
||||
cd frcsim-eclipse-plugins && tar --exclude="./debian" -czvf \
|
||||
frcsim-eclipse-plugins_${eclipse-plugins-version}.orig.tar.gz frcsim-eclipse-plugins
|
||||
|
||||
pull-eclipse-toolchain:
|
||||
-orig-frcsim-eclipse-toolchain-plugin: frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_${eclipse-toolchain-version}.orig.tar.gz
|
||||
-pull-eclipse-toolchain:
|
||||
rm -rf frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/plugins
|
||||
rm -rf frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/features
|
||||
mkdir -p frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/plugins
|
||||
@@ -115,24 +120,53 @@ pull-eclipse-toolchain:
|
||||
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/plugins/edu.wpi.first.wpilib.plugins.cpp.toolchains.linux_* frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/plugins/
|
||||
cp $(allwpilib)/eclipse-plugins/edu.wpi.first.wpilib.plugins.updatesite/target/site/features/edu.wpi.first.wpilib.plugins.cpp.toolchains.linux.feature_* frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin/features/
|
||||
echo Increment version?
|
||||
frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_${eclipse-toolchain-version}.orig.tar.gz: -pull-eclipse-toolchain
|
||||
cd frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin && debuild clean
|
||||
rm -f frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-version).orig.tar.gz
|
||||
cd frcsim-eclipse-toolchain-plugin && tar --exclude="./debian" -czvf \
|
||||
frcsim-eclipse-toolchain-plugin_${eclipse-toolchain-version}.orig.tar.gz frcsim-eclipse-toolchain-plugin
|
||||
|
||||
pull-libwpilibsim-cpp:
|
||||
-orig-frcsim-libwpilibsim-cpp: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_${libwpilibsim-version}.orig.tar.gz
|
||||
-pull-libwpilibsim-cpp:
|
||||
cp -rf -t frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp/ $(allwpilib)/wpilibc/wpilibC++Sim/*
|
||||
echo Increment version?
|
||||
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_${libwpilibsim-version}.orig.tar.gz: -pull-libwpilibsim-cpp
|
||||
cd frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp && debuild clean
|
||||
rm -f frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz
|
||||
cd frcsim-libwpilibsim-cpp && tar --exclude="./debian" -czvf \
|
||||
frcsim-libwpilibsim-cpp_${libwpilibsim-version}.orig.tar.gz frcsim-libwpilibsim-cpp
|
||||
|
||||
download-models:
|
||||
cd frcsim-gazebo-models && \
|
||||
wget --no-check-certificate $(gazebo-models-orig-url) -O frcsim-gazebo-models_${gazebo-models-version}.orig.tar.gz && \
|
||||
tar xvf frcsim-gazebo-models_${gazebo-models-version}.orig.tar.gz
|
||||
-orig-frcsim: frcsim/frcsim_$(frcsim-package-version)_all.deb
|
||||
frcsim/frcsim_${frcsim-version}.orig.tar.gz:
|
||||
cd frcsim/frcsim && debuild clean
|
||||
rm -f frcsim/frcsim_$(frcsim-version).orig.tar.gz
|
||||
cd frcsim && tar --exclude="./debian" -czvf \
|
||||
frcsim_${frcsim-version}.orig.tar.gz frcsim
|
||||
|
||||
install:
|
||||
sudo dpkg -i frcsim-gazebo-plugins/frcsim-gazebo-plugins_0.2-1_amd64.deb \
|
||||
frcsim-gazebo-models/frcsim-gazebo-models_0.2-1_all.deb \
|
||||
frcsim-eclipse-plugins/frcsim-eclipse-plugins_0.1-1_all.deb \
|
||||
frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_0.1-1_all.deb \
|
||||
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_0.1-1_amd64.deb \
|
||||
frcsim/frcsim_0.1-1_all.deb
|
||||
# debs support (for faster parallel builds)
|
||||
.PHONY: -debs-frcsim-gazebo-plugins -debs-frcsim-gazebo-models -debs-frcsim-eclipse-plugins \
|
||||
-debs-frcsim-eclipse-toolchain-plugin -debs-frcsim-libwpilibsim-cpp -debs-frcsim
|
||||
|
||||
deploy:
|
||||
rsync -r -v -C -p repository/ adhenning@ccc.wpi.edu:public_html/frcsim/
|
||||
-debs-frcsim-gazebo-plugins: frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb
|
||||
frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-package-version)_amd64.deb: frcsim-gazebo-plugins/frcsim-gazebo-plugins_$(gazebo-plugins-version).orig.tar.gz
|
||||
cd frcsim-gazebo-plugins/frcsim-gazebo-plugins && debuild --no-lintian -us -uc -iamd64
|
||||
|
||||
-debs-frcsim-gazebo-models: frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb
|
||||
frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-package-version)_all.deb: frcsim-gazebo-models/frcsim-gazebo-models_$(gazebo-models-version).orig.tar.gz
|
||||
cd frcsim-gazebo-models/frcsim-gazebo-models && debuild --no-lintian -us -uc
|
||||
|
||||
-debs-frcsim-eclipse-plugins: frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb
|
||||
frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-package-version)_all.deb: frcsim-eclipse-plugins/frcsim-eclipse-plugins_$(eclipse-plugins-version).orig.tar.gz
|
||||
cd frcsim-eclipse-plugins/frcsim-eclipse-plugins && debuild --no-lintian -us -uc
|
||||
|
||||
-debs-frcsim-eclipse-toolchain-plugin: frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb
|
||||
frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-package-version)_all.deb: frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin_$(eclipse-toolchain-version).orig.tar.gz
|
||||
cd frcsim-eclipse-toolchain-plugin/frcsim-eclipse-toolchain-plugin && debuild --no-lintian -us -uc
|
||||
|
||||
-debs-frcsim-libwpilibsim-cpp: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb
|
||||
frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-package-version)_amd64.deb: frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp_$(libwpilibsim-version).orig.tar.gz
|
||||
cd frcsim-libwpilibsim-cpp/frcsim-libwpilibsim-cpp && debuild --no-lintian -us -uc
|
||||
|
||||
-debs-frcsim: frcsim/frcsim_$(frcsim-package-version)_all.deb
|
||||
frcsim/frcsim_$(frcsim-package-version)_all.deb: frcsim/frcsim_$(frcsim-version).orig.tar.gz
|
||||
cd frcsim/frcsim && debuild --no-lintian -us -uc
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
export GAZEBO_PLUGIN_PATH="${GAZEBO_PLUGIN_PATH}:/usr/lib/frcsim/plugins"
|
||||
export GAZEBO_MODEL_PATH="${GAZEBO_MODEL_PATH}:/usr/share/frcsim/models"
|
||||
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/frcsim/plugins"
|
||||
gazebo $@
|
||||
|
||||
@@ -104,15 +104,15 @@ function install-frcsim {
|
||||
fi
|
||||
|
||||
# Add FRCSim Repository and Key
|
||||
if ! echo "deb http://users.wpi.edu/~adhenning/frcsim `lsb_release -cs` main" > /etc/apt/sources.list.d/frcsim-latest.list
|
||||
if ! echo "deb http://first.wpi.edu/FRC/roborio/release/linux `lsb_release -cs` main" > /etc/apt/sources.list.d/frcsim-latest.list
|
||||
then
|
||||
echo "*** Cannot add FRCSim repository!" 1>&2
|
||||
install-fail
|
||||
fi
|
||||
if ! (wget users.wpi.edu/~adhenning/frcsim.key -O - | apt-key add -)
|
||||
if ! (wget first.wpi.edu/FRC/roborio/wpilib.gpg.key -O - | apt-key add -)
|
||||
then
|
||||
echo "*** Cannot add FRCSim repository key!" 1>&2
|
||||
if ! ping users.wpi.edu -c 1 >/dev/null; then
|
||||
if ! ping first.wpi.edu -c 1 >/dev/null; then
|
||||
echo "*** The package host for FRCSim appears to be down. Try again later." 1>&2
|
||||
fi
|
||||
install-fail
|
||||
|
||||
@@ -6,7 +6,7 @@ include_directories(include/ ${NWT_API_INCLUDES} ${HAL_API_INCLUDES})
|
||||
add_library(WPILib STATIC ${SRC_FILES})
|
||||
set(CMAKE_CXX_FLAGS "-fPIC")
|
||||
target_link_libraries(WPILib)
|
||||
INSTALL(TARGETS WPILib ARCHIVE DESTINATION src COMPONENT src)
|
||||
INSTALL(TARGETS WPILib ARCHIVE DESTINATION lib COMPONENT lib)
|
||||
INSTALL(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT headers)
|
||||
# lib/ c m gcc_s ld-linux
|
||||
# usr/lib stdc++
|
||||
|
||||
@@ -5,7 +5,7 @@ file(GLOB_RECURSE SRC_FILES src/*.cpp)
|
||||
include_directories(include/ ${WPILIB_INCLUDES} ${HAL_API_INCLUDES} ${NWT_API_INCLUDES})
|
||||
add_library(WPILibAthena STATIC ${SRC_FILES})
|
||||
target_link_libraries(WPILibAthena WPILib HALAthena NetworkTables ${NI_LIBS})
|
||||
INSTALL(TARGETS WPILibAthena ARCHIVE DESTINATION src COMPONENT src)
|
||||
INSTALL(TARGETS WPILibAthena ARCHIVE DESTINATION lib COMPONENT lib)
|
||||
INSTALL(DIRECTORY include DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT headers)
|
||||
# lib/ c m gcc_s ld-linux
|
||||
# usr/lib stdc++
|
||||
|
||||
@@ -63,6 +63,18 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<sourceFileExcludes>
|
||||
<exclude>edu/wpi/first/wpilibj/image/</exclude>
|
||||
<exclude>edu/wpi/first/wpilibj/camera/</exclude>
|
||||
<exclude>edu/wpi/first/wpilibj/visa/</exclude>
|
||||
<exclude>edu/wpi/first/wpilibj/SerialPort.java</exclude>
|
||||
</sourceFileExcludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
@@ -30,7 +30,20 @@
|
||||
<artifactId>wpilibJavaJNI</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<type>so</type>
|
||||
</dependency>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJava</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<classifier>sources</classifier>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>edu.wpi.first.wpilibj</groupId>
|
||||
<artifactId>wpilibJavaDevices</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<classifier>sources</classifier>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@@ -99,6 +112,30 @@
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>generate-sources</id>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<taskdef resource="net/sf/antcontrib/antcontrib.properties"
|
||||
classpathref="maven.plugin.classpath" />
|
||||
<mkdir dir="${project.build.directory}/sources" />
|
||||
|
||||
<property name="mvn.wpilibJava.sources.path" value="${edu.wpi.first.wpilibj:wpilibJava:jar:sources}"/>
|
||||
<unzip src="${mvn.wpilibJava.sources.path}" dest="${project.build.directory}/sources" />
|
||||
|
||||
<property name="mvn.wpilibJavaDevices.sources.path" value="${edu.wpi.first.wpilibj:wpilibJavaDevices:jar:sources}"/>
|
||||
<unzip src="${mvn.wpilibJavaDevices.sources.path}" dest="${project.build.directory}/sources" />
|
||||
|
||||
<zip basedir="${project.build.directory}/sources" destfile="${project.build.directory}/sources.jar"/>
|
||||
<attachartifact file="${project.build.directory}/sources.jar" classifier="sources" type="jar" />
|
||||
</target>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
Reference in New Issue
Block a user