Skip to content

Commit

Permalink
[commands] Revert "WrappedCommand: Call wrapped command initSendable (#…
Browse files Browse the repository at this point in the history
…6471)" (#7353)

This reverts commit 7bc0380.

Calling initSendable on the wrapped command is fundamentally flawed as the wrapper is the command being sent.
  • Loading branch information
rzblue authored Nov 6, 2024
1 parent 5a16b0e commit af65281
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

package edu.wpi.first.wpilibj2.command;

import edu.wpi.first.util.sendable.SendableBuilder;
import java.util.Set;

/**
Expand Down Expand Up @@ -101,9 +100,4 @@ public boolean runsWhenDisabled() {
public InterruptionBehavior getInterruptionBehavior() {
return m_command.getInterruptionBehavior();
}

@Override
public void initSendable(SendableBuilder builder) {
m_command.initSendable(builder);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,3 @@ Command::InterruptionBehavior WrapperCommand::GetInterruptionBehavior() const {
wpi::SmallSet<Subsystem*, 4> WrapperCommand::GetRequirements() const {
return m_command->GetRequirements();
}

void WrapperCommand::InitSendable(wpi::SendableBuilder& builder) {
m_command->InitSendable(builder);
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ class WrapperCommand : public CommandHelper<Command, WrapperCommand> {

wpi::SmallSet<Subsystem*, 4> GetRequirements() const override;

void InitSendable(wpi::SendableBuilder& builder) override;

protected:
/// Command being wrapped.
std::unique_ptr<Command> m_command;
Expand Down

0 comments on commit af65281

Please sign in to comment.