Files
allwpilib/commandsv2/src/main/native/cpp/frc2/command/PrintCommand.cpp

20 lines
549 B
C++
Raw Normal View History

// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
2025-11-07 19:56:21 -05:00
#include "wpi/commands2/PrintCommand.hpp"
2024-09-20 17:43:39 -07:00
#include <string>
2025-11-07 19:56:21 -05:00
#include "wpi/util/print.hpp"
2025-11-07 20:00:05 -05:00
using namespace wpi::cmd;
PrintCommand::PrintCommand(std::string_view message)
2025-11-07 20:00:05 -05:00
: CommandHelper{[str = std::string(message)] { wpi::util::print("{}\n", str); },
{}} {}
bool PrintCommand::RunsWhenDisabled() const {
return true;
}