2020-12-26 14:12:05 -08:00
|
|
|
// 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.
|
2017-10-17 21:37:58 -07:00
|
|
|
|
2025-11-07 19:56:21 -05:00
|
|
|
#include "wpi/commands2/PrintCommand.hpp"
|
2017-10-17 21:37:58 -07:00
|
|
|
|
2024-09-20 17:43:39 -07:00
|
|
|
#include <string>
|
|
|
|
|
|
2025-11-07 19:56:21 -05:00
|
|
|
#include "wpi/util/print.hpp"
|
2019-11-05 20:52:49 -08:00
|
|
|
|
2025-11-07 20:00:05 -05:00
|
|
|
using namespace wpi::cmd;
|
2019-08-25 23:55:59 -04:00
|
|
|
|
2021-05-26 17:44:18 -07:00
|
|
|
PrintCommand::PrintCommand(std::string_view message)
|
2025-11-07 20:00:05 -05:00
|
|
|
: CommandHelper{[str = std::string(message)] { wpi::util::print("{}\n", str); },
|
2021-06-06 16:13:58 -07:00
|
|
|
{}} {}
|
2019-08-25 23:55:59 -04:00
|
|
|
|
2020-12-28 12:58:06 -08:00
|
|
|
bool PrintCommand::RunsWhenDisabled() const {
|
|
|
|
|
return true;
|
|
|
|
|
}
|