Merge branch 'main' into 2027

This commit is contained in:
Peter Johnson
2025-07-08 19:54:03 -07:00
50 changed files with 156 additions and 123 deletions

View File

@@ -35,28 +35,35 @@ build:build_cpp --test_tag_filters=+allwpilib-build-cpp --build_tag_filters=+all
build:no_example --test_tag_filters=-wpi-example --build_tag_filters=-wpi-example
test:no_example --test_tag_filters=-wpi-example --build_tag_filters=-wpi-example
# Artifactory Cache Setup
build:base_remote --remote_timeout=3600
# Additional suggestions from buildbuddy for speed
build:base_remote --experimental_remote_cache_compression
build:base_remote --experimental_remote_cache_compression_threshold=100
build:base_remote --noslim_profile
build:base_remote --experimental_profile_include_target_label
build:base_remote --experimental_profile_include_primary_output
build:base_remote --nolegacy_important_outputs
common:base_remote_readonly --noremote_upload_local_results
build:artifactory_readonly --config=base_remote_readonly
build:artifactory_readonly --remote_cache=https://frcmaven.wpi.edu/artifactory/wpilib-generic-cache-bazel-local
# workaround for https://github.com/bazelbuild/bazel/issues/17700
build:artifactory_readonly --remote_cache_header=X-JFrog-Download-Redirect-To=None
# Build Buddy Cache Setup
build:build_buddy --bes_results_url=https://app.buildbuddy.io/invocation/
build:build_buddy --bes_backend=grpcs://remote.buildbuddy.io
build:build_buddy --remote_cache=grpcs://remote.buildbuddy.io
build:build_buddy --remote_timeout=3600
# Additional suggestions from buildbuddy for speed
build:build_buddy --remote_cache_compression
build:build_buddy --experimental_remote_cache_compression_threshold=100
build:build_buddy --noslim_profile
build:build_buddy --experimental_profile_include_target_label
build:build_buddy --experimental_profile_include_primary_output
build:build_buddy --nolegacy_important_outputs
common:build_buddy_readonly --noremote_upload_local_results
build:build_buddy --config=base_remote
# This config should be used locally. It downloads more than the CI version
build:remote_user --config=build_buddy
build:remote_user --config=build_buddy_readonly
build:remote_user --config=base_remote
build:remote_user --config=artifactory_readonly
build:remote_user --remote_download_toplevel
build:ci --config=build_buddy
build:ci --config=base_remote
build:ci --remote_download_minimal
build --build_metadata=REPO_URL=https://github.com/wpilibsuite/allwpilib.git

View File

@@ -0,0 +1,30 @@
name: "Setup Artifactory Bazel caching"
description: "Sets up the Artifactory Bazel cache to be readonly / writing based on the presence of environment variables"
inputs:
username:
description: "Artifactory API username"
token:
description: "Artifactory API token"
runs:
using: "composite"
steps:
- name: Setup without key
env:
API_KEY: ${{ inputs.token }}
if: ${{ env.API_KEY == '' }}
shell: bash
run: |
echo "No API key secret detected, will setup readonly cache"
echo "build:ci --config=artifactory_readonly" > bazel_auth.rc
- name: Set with key
env:
API_KEY: ${{ inputs.token }}
if: ${{ env.API_KEY != '' }}
shell: bash
run: |
echo "API Key detected!"
# X-JFrog-Download-Redirect-To is a workaround for https://github.com/bazelbuild/bazel/issues/17700
echo "build:base_remote --remote_cache=https://${{ inputs.username }}:${{ inputs.token }}@frcmaven.wpi.edu/artifactory/wpilib-generic-cache-bazel-local --remote_cache_header=X-JFrog-Download-Redirect-To=None" > bazel_auth.rc

View File

@@ -1,27 +0,0 @@
name: 'Setup BuildBuddy acache'
description: 'Sets up the build buddy cache to be readonly / writing based on the presence of environment variables'
inputs:
token:
description: 'Build Buddy API token'
runs:
using: "composite"
steps:
- name: Setup without key
env:
API_KEY: ${{ inputs.token }}
if: ${{ env.API_KEY == '' }}
shell: bash
run: |
echo "No API key secret detected, will setup readonly cache"
echo "build:ci --config=build_buddy_readonly" > bazel_auth.rc
- name: Set with key
env:
API_KEY: ${{ inputs.token }}
if: ${{ env.API_KEY != '' }}
shell: bash
run: |
echo "API Key detected!"
echo "build:build_buddy --remote_header=x-buildbuddy-api-key=${{ env.API_KEY }}" > bazel_auth.rc

View File

@@ -5,7 +5,8 @@
"items.find": {
"$or":[
{ "repo": "wpilib-generic-gradlecache" },
{ "repo": "wpilib-generic-cache-cmake" }
{ "repo": "wpilib-generic-cache-cmake" },
{ "repo": "wpilib-generic-cache-bazel" }
],
"$or":[
{

View File

@@ -26,10 +26,11 @@ jobs:
java-version: 17
architecture: x64
- id: Setup_build_buddy
uses: ./.github/actions/setup-build-buddy
- name: Setup Artifactory
uses: ./.github/actions/setup-artifactory-bazel
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
username: ${{ secrets.ARTIFACTORY_USERNAME }}
token: ${{ secrets.ARTIFACTORY_PASSWORD }}
- name: bazel ${{ matrix.action }}
run: bazel --output_user_root=C:\\bazelroot ${{ matrix.action }} -k ... --config=ci ${{ matrix.config }} --verbose_failures
@@ -42,10 +43,11 @@ jobs:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- id: Setup_build_buddy
uses: ./.github/actions/setup-build-buddy
- name: Setup Artifactory
uses: ./.github/actions/setup-artifactory-bazel
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
username: ${{ secrets.ARTIFACTORY_USERNAME }}
token: ${{ secrets.ARTIFACTORY_PASSWORD }}
- name: bazel test (release)
run: bazel test -k ... --config=ci -c opt --config=macos --nojava_header_compilation --verbose_failures
@@ -64,12 +66,12 @@ jobs:
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: bazelbuild/setup-bazelisk@v3
- id: Setup_build_buddy
uses: ./.github/actions/setup-build-buddy
- name: Setup Artifactory
uses: ./.github/actions/setup-artifactory-bazel
with:
token: ${{ secrets.BUILDBUDDY_API_KEY }}
username: ${{ secrets.ARTIFACTORY_USERNAME }}
token: ${{ secrets.ARTIFACTORY_PASSWORD }}
- name: bazel ${{ matrix.action }} (release)
run: bazel ${{ matrix.action }} ... --config=ci -c opt ${{ matrix.config }} -k --verbose_failures

View File

@@ -4,6 +4,7 @@ So you want to contribute your changes back to WPILib. Great! We have a few cont
- [General Contribution Rules](#general-contribution-rules)
- [What to Contribute](#what-to-contribute)
- [Contribution Process](#contribution-process)
- [Coding Guidelines](#coding-guidelines)
- [Submitting Changes](#submitting-changes)
- [Pull Request Format](#pull-request-format)
@@ -30,12 +31,21 @@ So you want to contribute your changes back to WPILib. Great! We have a few cont
- Features must be added to Java (WPILibJ), C++ (WPILibC), with rare exceptions.
- Most of Python (RobotPy) is created by wrapping WPILibC with pybind11 via robotpy-build. However, new features to the command framework should also be submitted to [robotpy-commands-v2](https://github.com/robotpy/robotpy-commands-v2) as the command framework is reimplemented in Python.
- During competition season, we will not merge any new feature additions. We want to ensure that the API is stable during the season to help minimize issues for teams.
- Ask about large changes before spending a bunch of time on them! You can create a new issue on our GitHub tracker for feature request/discussion and talk about it with us there.
- Ask about large changes before spending a bunch of time on them! See [Contribution Process](#contribution-process) for where to ask.
- Features that make it easier for teams with less experience to be more successful are more likely to be accepted.
- Features in WPILib should be broadly applicable to all teams. Anything that is team specific should not be submitted.
- As a rule, we are happy with the general structure of WPILib. We are not interested in major rewrites of all of WPILib. We are open to talking about ideas, but backwards compatibility is very important for WPILib, so be sure to keep this in mind when proposing major changes.
- Generally speaking, we do not accept code for specific sensors. We have to be able to test the sensor in hardware on the WPILib test bed. Additionally, hardware availability for teams is important. Therefore, as a general rule, the library only directly supports hardware that is in the Kit of Parts. If you are a company interested in getting a sensor into the Kit of Parts, please contact FIRST directly at frcparts@firstinspires.org.
## Contribution Process
Have an idea to make WPILib better? Here's some steps to go from idea to implementation:
1. (Optional) **Discuss it in the Discord.** The programming discussion channel in the [Unofficial FIRST Robotics Competition Discord Server](https://discord.com/invite/frc) is a popular choice for initial discussion about ideas because many WPILib developers are active there and the live messaging nature of the platform is well suited for initial discussion (particularly for smaller changes). Note that the unofficial Discord server is not a mandatory step in the development process and is not endorsed by FIRST®.
2. (Recommended) **Open a GitHub issue.** GitHub issues are another way to get initial feedback about an idea before working on an implementation. Compared to the unofficial Discord server, GitHub issues have much wider visibility and are better suited for serious discussions about major changes. Getting feedback about an idea (whether in the unofficial Discord server or in a GitHub issue) before working on the implementation is recommended to avoid working on a change that will be rejected, though some ideas are pretty safe.
3. (Rare) **Create a design document in GitHub.** Sometimes, a change is so large that a design document is necessary to fully flesh out the details (and get feedback on them) before starting on an implementation. This is done through a pull request that adds the design document (as a Markdown file) to the repository. This is extremely rare, and it is sometimes done concurrently with the implementation if the change doesn't need much debate but is large enough to require a design document.
4. (Mandatory) **Create a GitHub pull request.** This is how you implement the changes, and is the focus of most of the rest of this document.
## Coding Guidelines
WPILib uses modified Google style guides for both C++ and Java, which can be found in the [styleguide repository](https://github.com/wpilibsuite/styleguide). Autoformatters are available for many popular editors at https://github.com/google/styleguide. Running wpiformat is required for all contributions and is enforced by our continuous integration system.

View File

@@ -533,7 +533,12 @@ public abstract class Command implements Sendable {
});
}
/** Schedules this command. */
/**
* Schedules this command.
*
* @deprecated Use CommandScheduler.getInstance().schedule(Command...) instead
*/
@Deprecated(since = "2025", forRemoval = true)
public void schedule() {
CommandScheduler.getInstance().schedule(this);
}
@@ -610,7 +615,7 @@ public abstract class Command implements Sendable {
value -> {
if (value) {
if (!isScheduled()) {
schedule();
CommandScheduler.getInstance().schedule(this);
}
} else {
if (isScheduled()) {

View File

@@ -58,7 +58,7 @@ public class ProxyCommand extends Command {
@Override
public void initialize() {
m_command = m_supplier.get();
m_command.schedule();
CommandScheduler.getInstance().schedule(m_command);
}
@Override

View File

@@ -28,7 +28,7 @@ public class ScheduleCommand extends Command {
@Override
public void initialize() {
for (Command command : m_toSchedule) {
command.schedule();
CommandScheduler.getInstance().schedule(command);
}
}

View File

@@ -93,7 +93,7 @@ public class Trigger implements BooleanSupplier {
addBinding(
(previous, current) -> {
if (previous != current) {
command.schedule();
CommandScheduler.getInstance().schedule(command);
}
});
return this;
@@ -110,7 +110,7 @@ public class Trigger implements BooleanSupplier {
addBinding(
(previous, current) -> {
if (!previous && current) {
command.schedule();
CommandScheduler.getInstance().schedule(command);
}
});
return this;
@@ -127,7 +127,7 @@ public class Trigger implements BooleanSupplier {
addBinding(
(previous, current) -> {
if (previous && !current) {
command.schedule();
CommandScheduler.getInstance().schedule(command);
}
});
return this;
@@ -148,7 +148,7 @@ public class Trigger implements BooleanSupplier {
addBinding(
(previous, current) -> {
if (!previous && current) {
command.schedule();
CommandScheduler.getInstance().schedule(command);
} else if (previous && !current) {
command.cancel();
}
@@ -171,7 +171,7 @@ public class Trigger implements BooleanSupplier {
addBinding(
(previous, current) -> {
if (previous && !current) {
command.schedule();
CommandScheduler.getInstance().schedule(command);
} else if (!previous && current) {
command.cancel();
}
@@ -193,7 +193,7 @@ public class Trigger implements BooleanSupplier {
if (command.isScheduled()) {
command.cancel();
} else {
command.schedule();
CommandScheduler.getInstance().schedule(command);
}
}
});
@@ -214,7 +214,7 @@ public class Trigger implements BooleanSupplier {
if (command.isScheduled()) {
command.cancel();
} else {
command.schedule();
CommandScheduler.getInstance().schedule(command);
}
}
});

View File

@@ -197,7 +197,7 @@ void Command::InitSendable(wpi::SendableBuilder& builder) {
[this](bool value) {
bool isScheduled = IsScheduled();
if (value && !isScheduled) {
Schedule();
CommandScheduler::GetInstance().Schedule(this);
} else if (!value && isScheduled) {
Cancel();
}

View File

@@ -37,7 +37,7 @@ ProxyCommand::ProxyCommand(std::unique_ptr<Command> command) {
void ProxyCommand::Initialize() {
m_command = m_supplier();
m_command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_command);
}
void ProxyCommand::End(bool interrupted) {

View File

@@ -18,7 +18,7 @@ ScheduleCommand::ScheduleCommand(Command* toSchedule) {
void ScheduleCommand::Initialize() {
for (auto command : m_toSchedule) {
command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
}

View File

@@ -29,7 +29,7 @@ void Trigger::AddBinding(wpi::unique_function<void(bool, bool)>&& body) {
Trigger Trigger::OnChange(Command* command) {
AddBinding([command](bool previous, bool current) {
if (previous != current) {
command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
});
return *this;
@@ -38,7 +38,7 @@ Trigger Trigger::OnChange(Command* command) {
Trigger Trigger::OnChange(CommandPtr&& command) {
AddBinding([command = std::move(command)](bool previous, bool current) {
if (previous != current) {
command.Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
});
return *this;
@@ -47,7 +47,7 @@ Trigger Trigger::OnChange(CommandPtr&& command) {
Trigger Trigger::OnTrue(Command* command) {
AddBinding([command](bool previous, bool current) {
if (!previous && current) {
command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
});
return *this;
@@ -56,7 +56,7 @@ Trigger Trigger::OnTrue(Command* command) {
Trigger Trigger::OnTrue(CommandPtr&& command) {
AddBinding([command = std::move(command)](bool previous, bool current) {
if (!previous && current) {
command.Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
});
return *this;
@@ -65,7 +65,7 @@ Trigger Trigger::OnTrue(CommandPtr&& command) {
Trigger Trigger::OnFalse(Command* command) {
AddBinding([command](bool previous, bool current) {
if (previous && !current) {
command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
});
return *this;
@@ -74,7 +74,7 @@ Trigger Trigger::OnFalse(Command* command) {
Trigger Trigger::OnFalse(CommandPtr&& command) {
AddBinding([command = std::move(command)](bool previous, bool current) {
if (previous && !current) {
command.Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
});
return *this;
@@ -83,7 +83,7 @@ Trigger Trigger::OnFalse(CommandPtr&& command) {
Trigger Trigger::WhileTrue(Command* command) {
AddBinding([command](bool previous, bool current) {
if (!previous && current) {
command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
} else if (previous && !current) {
command->Cancel();
}
@@ -94,7 +94,7 @@ Trigger Trigger::WhileTrue(Command* command) {
Trigger Trigger::WhileTrue(CommandPtr&& command) {
AddBinding([command = std::move(command)](bool previous, bool current) {
if (!previous && current) {
command.Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
} else if (previous && !current) {
command.Cancel();
}
@@ -105,7 +105,7 @@ Trigger Trigger::WhileTrue(CommandPtr&& command) {
Trigger Trigger::WhileFalse(Command* command) {
AddBinding([command](bool previous, bool current) {
if (previous && !current) {
command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
} else if (!previous && current) {
command->Cancel();
}
@@ -116,7 +116,7 @@ Trigger Trigger::WhileFalse(Command* command) {
Trigger Trigger::WhileFalse(CommandPtr&& command) {
AddBinding([command = std::move(command)](bool previous, bool current) {
if (!previous && current) {
command.Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
} else if (previous && !current) {
command.Cancel();
}
@@ -130,7 +130,7 @@ Trigger Trigger::ToggleOnTrue(Command* command) {
if (command->IsScheduled()) {
command->Cancel();
} else {
command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
}
});
@@ -143,7 +143,7 @@ Trigger Trigger::ToggleOnTrue(CommandPtr&& command) {
if (command.IsScheduled()) {
command.Cancel();
} else {
command.Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
}
});
@@ -156,7 +156,7 @@ Trigger Trigger::ToggleOnFalse(Command* command) {
if (command->IsScheduled()) {
command->Cancel();
} else {
command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
}
});
@@ -169,7 +169,7 @@ Trigger Trigger::ToggleOnFalse(CommandPtr&& command) {
if (command.IsScheduled()) {
command.Cancel();
} else {
command.Schedule();
frc2::CommandScheduler::GetInstance().Schedule(command);
}
}
});

View File

@@ -398,7 +398,10 @@ class Command : public wpi::Sendable, public wpi::SendableHelper<Command> {
/**
* Schedules this command.
*
* @deprecated Use CommandScheduler::GetInstance().Schedule() instead
*/
[[deprecated("Use CommandScheduler::GetInstance().Schedule() instead.")]]
void Schedule();
/**

View File

@@ -277,7 +277,10 @@ CommandPtr final {
/**
* Schedules this command.
*
* @deprecated Use CommandScheduler::GetInstance().Schedule() instead
*/
[[deprecated("Use CommandScheduler::GetInstance().Schedule() instead.")]]
void Schedule() const&;
// Prevent calls on a temporary, as the returned pointer would be invalid

View File

@@ -55,7 +55,7 @@ class CommandSendableButtonTest extends CommandTestBase {
@Test
void trueAndScheduledNoOp() {
// Scheduled and true -> no-op
m_command.schedule();
CommandScheduler.getInstance().schedule(m_command);
CommandScheduler.getInstance().run();
SmartDashboard.updateValues();
assertTrue(m_command.isScheduled());
@@ -90,7 +90,7 @@ class CommandSendableButtonTest extends CommandTestBase {
@Test
void falseAndScheduledCancel() {
// Scheduled and false -> cancel
m_command.schedule();
CommandScheduler.getInstance().schedule(m_command);
CommandScheduler.getInstance().run();
SmartDashboard.updateValues();
assertTrue(m_command.isScheduled());

View File

@@ -22,7 +22,7 @@ class ProxyCommandTest extends CommandTestBase {
scheduler.schedule(scheduleCommand);
verify(command1).schedule();
verify(command1).initialize();
}
}

View File

@@ -22,8 +22,8 @@ class ScheduleCommandTest extends CommandTestBase {
scheduler.schedule(scheduleCommand);
verify(command1).schedule();
verify(command2).schedule();
verify(command1).initialize();
verify(command2).initialize();
}
}

View File

@@ -39,10 +39,10 @@ class NetworkButtonTest extends CommandTestBase {
pub.set(false);
button.onTrue(command);
scheduler.run();
verify(command, never()).schedule();
verify(command, never()).initialize();
pub.set(true);
scheduler.run();
scheduler.run();
verify(command).schedule();
verify(command).initialize();
}
}

View File

@@ -207,7 +207,7 @@ class TriggerTest extends CommandTestBase {
.until(button);
button.setPressed(false);
command1.schedule();
scheduler.schedule(command1);
scheduler.run();
assertEquals(1, startCounter.get());
assertEquals(0, endCounter.get());
@@ -258,13 +258,13 @@ class TriggerTest extends CommandTestBase {
button.setPressed(true);
scheduler.run();
verify(command, never()).schedule();
verify(command, never()).initialize();
SimHooks.stepTiming(0.3);
button.setPressed(true);
scheduler.run();
verify(command).schedule();
verify(command).initialize();
}
@Test

View File

@@ -49,7 +49,7 @@ TEST_F(CommandSendableButtonTest, trueAndNotScheduledSchedules) {
TEST_F(CommandSendableButtonTest, trueAndScheduledNoOp) {
// Scheduled and true -> no-op
m_command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_command.value());
GetScheduler().Run();
frc::SmartDashboard::UpdateValues();
EXPECT_TRUE(m_command->IsScheduled());
@@ -82,7 +82,7 @@ TEST_F(CommandSendableButtonTest, falseAndNotScheduledNoOp) {
TEST_F(CommandSendableButtonTest, falseAndScheduledCancel) {
// Scheduled and false -> cancel
m_command->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_command.value());
GetScheduler().Run();
frc::SmartDashboard::UpdateValues();
EXPECT_TRUE(m_command->IsScheduled());

View File

@@ -38,7 +38,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand.value());
}
}

View File

@@ -47,7 +47,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand != nullptr) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand);
}
}

View File

@@ -47,7 +47,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand != nullptr) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand);
}
}

View File

@@ -38,7 +38,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand.value());
}
}

View File

@@ -26,7 +26,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_robot.GetAutonomousCommand();
if (m_autonomousCommand) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand.value());
}
}

View File

@@ -37,7 +37,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand != nullptr) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand);
}
}

View File

@@ -38,7 +38,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand != nullptr) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand);
}
}

View File

@@ -38,7 +38,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand.value());
}
}

View File

@@ -22,7 +22,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand.value());
}
}

View File

@@ -37,7 +37,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand != nullptr) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand);
}
}

View File

@@ -37,7 +37,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand.value());
}
}

View File

@@ -22,7 +22,7 @@ void Robot::AutonomousInit() {
m_autonomousCommand = m_container.GetAutonomousCommand();
if (m_autonomousCommand) {
m_autonomousCommand->Schedule();
frc2::CommandScheduler::GetInstance().Schedule(m_autonomousCommand.value());
}
}

View File

@@ -65,7 +65,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -67,7 +67,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -74,7 +74,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -65,7 +65,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -63,7 +63,7 @@ public class Robot extends TimedRobot {
m_autonomousCommand = m_robot.getAutonomousCommand();
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -58,7 +58,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -65,7 +65,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -65,7 +65,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -55,7 +55,7 @@ public class Robot extends TimedRobot {
m_autonomousCommand = m_robot.getAutonomousCommand();
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -58,7 +58,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -58,7 +58,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -36,7 +36,7 @@ public class Robot extends TimedRobot {
m_autonomousCommand = m_robotContainer.getAutonomousCommand();
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -58,7 +58,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -58,7 +58,7 @@ public class Robot extends TimedRobot {
// schedule the autonomous command (example)
if (m_autonomousCommand != null) {
m_autonomousCommand.schedule();
CommandScheduler.getInstance().schedule(m_autonomousCommand);
}
}

View File

@@ -19,7 +19,7 @@ def generate_nanopb(nanopb: Path, output_directory: Path, proto_dir: Path):
proto_files = proto_dir.glob("*.proto")
for path in proto_files:
absolute_filename = path.absolute()
subprocess.run(
subprocess.check_call(
[
sys.executable,
nanopb,
@@ -28,8 +28,7 @@ def generate_nanopb(nanopb: Path, output_directory: Path, proto_dir: Path):
"-S.cpp",
"-e.npb",
absolute_filename,
],
check=True,
]
)
java_files = (output_directory).glob("*")
for java_file in java_files:

View File

@@ -15,7 +15,7 @@ def generate_quickbuf(
proto_files = proto_dir.glob("*.proto")
for path in proto_files:
absolute_filename = path.absolute()
subprocess.run(
subprocess.check_call(
[
protoc,
f"--plugin=protoc-gen-quickbuf={quickbuf_plugin}",