Skip to content

Commit

Permalink
Update to referece BeachbotLib items
Browse files Browse the repository at this point in the history
  • Loading branch information
sciencewhiz committed Jan 16, 2017
1 parent 0979f3d commit 11f9958
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 101 deletions.
Binary file modified build/libs/RobotBuilder-all.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/main/java/robotbuilder/RobotBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class RobotBuilder {
public static final int VERSION_MAJOR = 2;
public static final int VERSION_MINOR = 0;

public static final String VERSION = VERSION_MAJOR + "." + VERSION_MINOR;
public static final String VERSION = VERSION_MAJOR + "." + VERSION_MINOR + "BB";

public static final String SAVE_FILE_TYPE = "yaml";

Expand Down
88 changes: 2 additions & 86 deletions src/main/resources/PaletteDescription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,10 @@ Palette:
name: Autonomous command parameters
- !IntegerProperty
name: Team Number
default: 0
default: 330
- !BooleanProperty
name: Use Default Java Package
default: true
default: false
- !StringProperty
name: Java Package
default: "org.usfirst.frc0000"
Expand Down Expand Up @@ -726,90 +726,6 @@ Palette:
- !ParameterSet
name: Parameter presets
default: []
- !Component
name: PID Command
type: Command
help: A command that uses a PID controller to perform its desired action.
properties:
- !TypeSelectionProperty
name: Requires
type: Subsystem
default: "None"
- !BooleanProperty
name: Button on SmartDashboard
default: true
- !Parameters
name: Parameters
default: {}
- !ParameterSet
name: Parameter presets
default: []
- !TypeSelectionProperty
name: Input
type: PIDSource
validators: [TypeDropdownSelected]
default: "None"
- !TypeSelectionProperty
name: Output
type: PIDOutput
validators: [TypeDropdownSelected]
default: "None"
- !DoubleProperty
name: P
default: 1
- !DoubleProperty
name: I
default: 0
- !DoubleProperty
name: D
default: 0
- !DoubleProperty
name: Tolerance
default: 0.2
- !DoubleProperty
name: Period
default: .02
- !BooleanProperty
name: Continuous
default: false
- !BooleanProperty
name: Limit Input
default: false
- !DoubleProperty
name: Minimum Input
default: 0
- !DoubleProperty
name: Maximum Input
default: 5
- !BooleanProperty
name: Limit Output
default: false
- !DoubleProperty
name: Minimum Output
default: -1
- !DoubleProperty
name: Maximum Output
default: 1
- !Component
name: Setpoint Command
type: Command
help: A command that moves a PID subsystem to a predetermined setpoint.
properties:
- !ComponentSelectionProperty
name: Requires
validators: [TypeDropdownSelected]
componentName: PID Subsystem
default: None
- !BooleanProperty
name: Button on SmartDashboard
default: true
- !Parameters
name: Parameters
value:
- !!robotbuilder.data.properties.ParameterDescriptor {name: setpoint, type: double}
- !ParameterSet
name: Parameter presets
default: []
- !Component
name: Timed Command
type: Command
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/export/java/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#set($command = $helper.getByName($command-name, $robot))
#set($params = $command.getProperty("Parameters").getValue())
#macro( klass $cmd )#if( "#type($cmd)" == "" )Command#else#type($cmd)#end#end
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.BBCommand;
import ${package}.Robot;

/**
*
*/
public class #class($command.name) extends #klass($command) {
public class #class($command.name) extends BBCommand {

#@autogenerated_code("variable_declarations", " ")
#parse("${exporter-path}Command-variable-declarations.java")
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/export/java/CommandGroup.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#header()

package ${package}.commands;
package ${package}.commands.commandgroups;
#set($command = $helper.getByName($command-name, $robot))
#set($commandDescriptors = $command.getProperty("Commands").getValue())

import edu.wpi.first.wpilibj.command.CommandGroup;
import edu.wpi.first.wpilibj.command.BBCommandGroup;
import ${package}.subsystems.*;

/**
*
*/
public class #class($command.name) extends CommandGroup {
public class #class($command.name) extends BBCommandGroup {


#@autogenerated_code("parameters", " ")
Expand Down
6 changes: 4 additions & 2 deletions src/main/resources/export/java/ExportDescription.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,15 @@ Instructions:
Construction: "#variable($Name) = new ${ClassName}(${PCM_ID});"
Solenoid:
Defaults: "SolenoidOutput,Component,None"
ClassName: "Solenoid"
ClassName: "BBSolenoid"
Import: "import org.usfirst.frc330.wpilibj.${ClassName};"
Relay Solenoid:
Defaults: "RelayOutput,Component,None"
ClassName: "Relay"
Double Solenoid:
Defaults: "Solenoid,Component,None"
ClassName: "DoubleSolenoid"
ClassName: "BBDoubleSolenoid"
Import: "import org.usfirst.frc330.wpilibj.${ClassName};"
Construction: >-
#if(${Forward_PCM_Solenoid} != ${Reverse_PCM_Solenoid})Warning, the two modules in robot builder are different!
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/export/java/InstantCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
package ${package}.commands;
#set($command = $helper.getByName($command-name, $robot))
#set($params = $command.getProperty("Parameters").getValue())
import edu.wpi.first.wpilibj.command.InstantCommand;
import edu.wpi.first.wpilibj.command.BBInstantCommand;
import ${package}.Robot;

/**
*
*/
public class #class($command.name) extends InstantCommand {
public class #class($command.name) extends BBInstantCommand {

#@autogenerated_code("variable_declarations", " ")
#parse("${exporter-path}Command-variable-declarations.java")
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/export/java/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package ${package};

import ${package}.commands.*;
import ${package}.commands.commandgroups.*;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
${helper.getImports($robot, "OI")}

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/export/java/RobotTemplate.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

package $package;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.BBIterativeRobot;
import edu.wpi.first.wpilibj.command.Command;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
Expand All @@ -16,7 +16,7 @@
* creating this project, you must also update the manifest file in the resource
* directory.
*/
public class Robot extends IterativeRobot {
public class Robot extends BBIterativeRobot {

Command autonomousCommand;

Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/export/java/TimedCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
package ${package}.commands;
#set($command = $helper.getByName($command-name, $robot))

import edu.wpi.first.wpilibj.command.TimedCommand;
import edu.wpi.first.wpilibj.command.BBTimedCommand;
import ${package}.Robot;

/**
*
*/
public class #class($command.name) extends TimedCommand {
public class #class($command.name) extends BBTimedCommand {

#@autogenerated_code("constructor", " ")
#parse("${exporter-path}TimedCommand-constructor.java")
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/export/java/files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#foreach ($command in $commands)
#if ($command.base.name == "Command Group")
- !File
export: $package-path/commands/#class($command.name).java
export: $package-path/commands/commandgroups/#class($command.name).java
source: ${exporter-path}CommandGroup.java
update: Modify
modifications:
Expand Down

0 comments on commit 11f9958

Please sign in to comment.