diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c4bb1f9a..fafb7cdc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,6 +22,7 @@ stages: variables: DISPLAY: ':10' + MACOSX_DEPLOYMENT_TARGET: 11 steps: - bash: | @@ -59,7 +60,7 @@ stages: - job: Mac pool: - vmImage: 'macOS-11' + vmImage: 'macOS-12' steps: - script: | mkdir build diff --git a/src/main/java/robotbuilder/RobotBuilder.java b/src/main/java/robotbuilder/RobotBuilder.java index 82794811..ae67722e 100644 --- a/src/main/java/robotbuilder/RobotBuilder.java +++ b/src/main/java/robotbuilder/RobotBuilder.java @@ -20,7 +20,7 @@ */ public class RobotBuilder { - public static final int VERSION_MAJOR = 5; + public static final int VERSION_MAJOR = 6; public static final int VERSION_MINOR = 0; public static final String VERSION = VERSION_MAJOR + "." + VERSION_MINOR; diff --git a/src/main/resources/export/cpp/ExportDescription.yaml b/src/main/resources/export/cpp/ExportDescription.yaml index 1daa0a2a..ceddbaef 100644 --- a/src/main/resources/export/cpp/ExportDescription.yaml +++ b/src/main/resources/export/cpp/ExportDescription.yaml @@ -127,7 +127,7 @@ Instructions: Defaults: "None" Export: "RobotContainer" Import: "\\#include \"subsystems/#class($Short_Name).h\"" - ClassName: "frc2::SubsystemBase" + ClassName: "frc2::Subsystem" PID Subsystem: Defaults: "None" Export: "RobotContainer" @@ -343,7 +343,7 @@ Instructions: Command: Defaults: "Command,None" - ClassName: "frc2::CommandBase" + ClassName: "frc2::Command" Sequential Command Group: Defaults: "Command,None" PID Command: diff --git a/src/main/resources/export/cpp/RobotContainer-prototypes.h b/src/main/resources/export/cpp/RobotContainer-prototypes.h index 36317404..0263e020 100644 --- a/src/main/resources/export/cpp/RobotContainer-prototypes.h +++ b/src/main/resources/export/cpp/RobotContainer-prototypes.h @@ -1,7 +1,7 @@ // The robot's subsystems #foreach ($component in $components) #if ("#type($component)" != "" -&& ("#type($component)" == "frc2::SubsystemBase" +&& ("#type($component)" == "frc2::Subsystem" || "#type($component)" == "frc2::PIDSubsystem")) #class($component.getName()) #variable($component.getName()); #end diff --git a/src/main/resources/export/cpp/RobotContainer-subsystem-default_command.cpp b/src/main/resources/export/cpp/RobotContainer-subsystem-default_command.cpp index 7b75d5ee..1c6d8f78 100644 --- a/src/main/resources/export/cpp/RobotContainer-subsystem-default_command.cpp +++ b/src/main/resources/export/cpp/RobotContainer-subsystem-default_command.cpp @@ -1,5 +1,5 @@ #foreach ($component in $components) -#if ("#type($component)" == "frc2::SubsystemBase" || "#type($component)" == "frc2::PIDSubsystem") +#if ("#type($component)" == "frc2::Subsystem" || "#type($component)" == "frc2::PIDSubsystem") #foreach ($command in $commands) #if($command.name == $component.getProperty("Default Command").value) #set($params = $component.getProperty("Default command parameters").getValue()) diff --git a/src/main/resources/export/cpp/SetpointCommand-includes.h b/src/main/resources/export/cpp/SetpointCommand-includes.h index 0c2861b4..d46a69df 100644 --- a/src/main/resources/export/cpp/SetpointCommand-includes.h +++ b/src/main/resources/export/cpp/SetpointCommand-includes.h @@ -1,4 +1,4 @@ -\#include "frc2/command/CommandBase.h" +\#include "frc2/command/Command.h" \#include "frc2/command/CommandHelper.h" \#include "subsystems/#class(${command.getProperty("Requires").getValue()}).h" \ No newline at end of file diff --git a/src/main/resources/export/cpp/SetpointCommand.h b/src/main/resources/export/cpp/SetpointCommand.h index 43f6bd66..b96c69aa 100644 --- a/src/main/resources/export/cpp/SetpointCommand.h +++ b/src/main/resources/export/cpp/SetpointCommand.h @@ -13,7 +13,7 @@ * * @author ExampleAuthor */ -class #class($command.name): public frc2::CommandHelper { +class #class($command.name): public frc2::CommandHelper { public: #@autogenerated_code("constructor", " ") #parse("${exporter_path}SetpointCommand-constructor-header.h") diff --git a/src/main/resources/export/cpp/Subsystem-includes.h b/src/main/resources/export/cpp/Subsystem-includes.h index 7ebbfb6e..82cf2996 100644 --- a/src/main/resources/export/cpp/Subsystem-includes.h +++ b/src/main/resources/export/cpp/Subsystem-includes.h @@ -1,2 +1,2 @@ -\#include +\#include ${helper.getImports($subsystem, "RobotMap")} \ No newline at end of file diff --git a/src/main/resources/export/cpp/Subsystem.cpp b/src/main/resources/export/cpp/Subsystem.cpp index 035dd175..d39fc3ca 100644 --- a/src/main/resources/export/cpp/Subsystem.cpp +++ b/src/main/resources/export/cpp/Subsystem.cpp @@ -1,5 +1,5 @@ #set($subsystem = $helper.getByName($subsystem_name, $robot)) -#macro( klass $cmd )#if( "#type($cmd)" == "" )SendableSubsystemBase#elsefrc::#type($cmd)#end#end +#macro( klass $cmd )#if( "#type($cmd)" == "" )Subsystem#elsefrc::#type($cmd)#end#end #header() // ROBOTBUILDER TYPE: Subsystem. diff --git a/src/main/resources/export/cpp/Subsystem.h b/src/main/resources/export/cpp/Subsystem.h index 8e5f9f8e..a880571c 100644 --- a/src/main/resources/export/cpp/Subsystem.h +++ b/src/main/resources/export/cpp/Subsystem.h @@ -13,7 +13,7 @@ * * @author ExampleAuthor */ -class #class($subsystem.name): public frc2::SubsystemBase { +class #class($subsystem.name): public frc2::Subsystem { private: // It's desirable that everything possible is private except // for methods that implement subsystem capabilities diff --git a/src/main/resources/export/cpp/build.gradle b/src/main/resources/export/cpp/build.gradle index c768b722..adf04068 100644 --- a/src/main/resources/export/cpp/build.gradle +++ b/src/main/resources/export/cpp/build.gradle @@ -4,6 +4,11 @@ plugins { id "edu.wpi.first.GradleRIO" version "${wpilib_version}" } +wpi.maven.useLocal = false +wpi.maven.useDevelopment = true +wpi.versions.wpilibVersion = '2023.+' +wpi.versions.wpimathVersion = '2023.+' + // Define my targets (RoboRIO) and artifacts (deployable files) // This is added by GradleRIO's backing project DeployTools. deploy { diff --git a/src/main/resources/export/cpp/command-includes.h b/src/main/resources/export/cpp/command-includes.h index c9ee1b3d..650444d7 100644 --- a/src/main/resources/export/cpp/command-includes.h +++ b/src/main/resources/export/cpp/command-includes.h @@ -1,6 +1,6 @@ \#include -\#include +\#include #if (${command.getProperty("Requires").getValue()} != "None") \#include "subsystems/#class(${command.getProperty("Requires").getValue()}).h" diff --git a/src/main/resources/export/java/Command.java b/src/main/resources/export/java/Command.java index 41b6709d..1ef59f15 100644 --- a/src/main/resources/export/java/Command.java +++ b/src/main/resources/export/java/Command.java @@ -4,8 +4,8 @@ package ${package}.commands; #set($command = $helper.getByName($command_name, $robot)) #set($params = $command.getProperty("Parameters").getValue()) -#macro( klass $cmd )#if( "#type($cmd)" == "" )CommandBase#else#type($cmd)#end#end -import edu.wpi.first.wpilibj2.command.CommandBase; +#macro( klass $cmd )#if( "#type($cmd)" == "" )Command#else#type($cmd)#end#end +import edu.wpi.first.wpilibj2.command.Command; import java.util.function.DoubleSupplier; #@autogenerated_code("imports", "") diff --git a/src/main/resources/export/java/ExportDescription.yaml b/src/main/resources/export/java/ExportDescription.yaml index 6899b6f4..a7eb73bc 100644 --- a/src/main/resources/export/java/ExportDescription.yaml +++ b/src/main/resources/export/java/ExportDescription.yaml @@ -139,7 +139,7 @@ Instructions: Import: "import ${package}.subsystems.*;" Declaration: "private #class($Short_Name) #variable($Short_Name);" Construction: "#variable($Short_Name) = new #class($Short_Name)();" - ClassName: "SubsystemBase" + ClassName: "Subsystem" PID Subsystem: Defaults: "None" Export: "RobotContainer" diff --git a/src/main/resources/export/java/RobotContainer-declarations.java b/src/main/resources/export/java/RobotContainer-declarations.java index 502306c5..0d3f88ce 100644 --- a/src/main/resources/export/java/RobotContainer-declarations.java +++ b/src/main/resources/export/java/RobotContainer-declarations.java @@ -2,7 +2,7 @@ #foreach ($component in $components) #if ($helper.exportsTo("RobotContainer", $component) && "#type($component)" != "" -&& ("#type($component)" == "SubsystemBase" +&& ("#type($component)" == "Subsystem" || "#type($component)" == "PIDSubsystem")) public final #class($component.getName()) m_#variable($component.getName()) = new #class($component.getName())(); #end diff --git a/src/main/resources/export/java/RobotContainer-subsystem_default_Command.java b/src/main/resources/export/java/RobotContainer-subsystem_default_Command.java index 408adc06..83914441 100644 --- a/src/main/resources/export/java/RobotContainer-subsystem_default_Command.java +++ b/src/main/resources/export/java/RobotContainer-subsystem_default_Command.java @@ -1,7 +1,7 @@ #foreach ($component in $components) #if ($helper.exportsTo("RobotContainer", $component) && "#type($component)" != "" -&& ("#type($component)" == "SubsystemBase" +&& ("#type($component)" == "Subsystem" || "#type($component)" == "PIDSubsystem")) #foreach ($command in $commands) #if($command.name == $component.getProperty("Default Command").value) diff --git a/src/main/resources/export/java/SetpointCommand.java b/src/main/resources/export/java/SetpointCommand.java index d7d2f185..45675886 100644 --- a/src/main/resources/export/java/SetpointCommand.java +++ b/src/main/resources/export/java/SetpointCommand.java @@ -5,7 +5,7 @@ #set($command = $helper.getByName($command_name, $robot)) import java.util.function.DoubleSupplier; -import edu.wpi.first.wpilibj2.command.CommandBase; +import edu.wpi.first.wpilibj2.command.Command; import ${package}.Robot; #@autogenerated_code("imports", "") #parse("${exporter_path}Command-imports.java") @@ -14,7 +14,7 @@ /** * */ -public class #class($command.name) extends CommandBase { +public class #class($command.name) extends Command { #@autogenerated_code("variable_declarations", " ") #parse("${exporter_path}Command-variable-declarations.java") diff --git a/src/main/resources/export/java/Subsystem.java b/src/main/resources/export/java/Subsystem.java index f109877c..094da6db 100644 --- a/src/main/resources/export/java/Subsystem.java +++ b/src/main/resources/export/java/Subsystem.java @@ -3,12 +3,12 @@ package ${package}.subsystems; #set($subsystem = $helper.getByName($subsystem_name, $robot)) -#macro( klass $cmd )#if( "#type($cmd)" == "" ) SubsystemBase #else#type($cmd)#end#end +#macro( klass $cmd )#if( "#type($cmd)" == "" ) Subsystem #else#type($cmd)#end#end import ${package}.commands.*; import edu.wpi.first.wpilibj.livewindow.LiveWindow; -import edu.wpi.first.wpilibj2.command.SubsystemBase; +import edu.wpi.first.wpilibj2.command.Subsystem; #@autogenerated_code("imports", "") #parse("${exporter_path}Subsystem-imports.java") diff --git a/src/main/resources/export/java/build.gradle b/src/main/resources/export/java/build.gradle index f096a4e5..d9072b58 100644 --- a/src/main/resources/export/java/build.gradle +++ b/src/main/resources/export/java/build.gradle @@ -5,6 +5,11 @@ plugins { id "edu.wpi.first.GradleRIO" version "${wpilib_version}" } +wpi.maven.useLocal = false +wpi.maven.useDevelopment = true +wpi.versions.wpilibVersion = '2023.+' +wpi.versions.wpimathVersion = '2023.+' + sourceCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.VERSION_11