Skip to content

Commit

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

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 committed Nov 6, 2024
1 parent 3113627 commit bf23b0e
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 bf23b0e

Please sign in to comment.