Skip to content

Commit

Permalink
ran fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
oh-yes-0-fps committed Sep 26, 2024
1 parent b6f0358 commit a536db3
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,9 @@ public WrapperCommand withName(String name) {
}

/**
* Decorates this Command so that it's `Execute` method is implicitly timed using the {@link Tracer} class.
* This decorator also names the command similarly to the {@link #withName(String)} method.
* Decorates this Command so that it's `Execute` method is implicitly timed using the {@link
* Tracer} class. This decorator also names the command similarly to the {@link #withName(String)}
* method.
*
* @param name name
* @return the decorated Command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,13 @@ public static synchronized CommandScheduler getInstance() {
private final List<Optional<Command>> m_toCancelInterruptors = new ArrayList<>();
private final Set<Command> m_endingCommands = new LinkedHashSet<>();

private final Watchdog m_watchdog = new Watchdog(
TimedRobot.kDefaultPeriod,
() -> {
System.out.println("CommandScheduler loop overrun, check NetworkTables for timing info");
});
private final Watchdog m_watchdog =
new Watchdog(
TimedRobot.kDefaultPeriod,
() -> {
System.out.println(
"CommandScheduler loop overrun, check NetworkTables for timing info");
});

CommandScheduler() {
HAL.report(tResourceType.kResourceType_Command, tInstances.kCommand2_Scheduler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ CommandPtr Command::Traced(std::string_view name) && {
return std::move(*this).ToPtr().Traced(name);
}


void Command::Schedule() {
CommandScheduler::GetInstance().Schedule(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ static bool ContainsKey(const TMap& map, TKey keyToCheck) {

CommandScheduler::CommandScheduler()
: m_impl(new Impl), m_watchdog(frc::TimedRobot::kDefaultPeriod, [] {
std::puts("CommandScheduler loop overrun, check NetworkTables for timing info");
std::puts(
"CommandScheduler loop overrun, check NetworkTables for timing "
"info");
}) {
HAL_Report(HALUsageReporting::kResourceType_Command,
HALUsageReporting::kCommand2_Scheduler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,9 @@ class Command : public wpi::Sendable, public wpi::SendableHelper<Command> {
CommandPtr WithName(std::string_view name) &&;

/**
* Decorates this Command so that it's `Execute` method is implicitly timed using the `Tracer` class.
* This decorator also names the command similarly to the `WithName(string)` method.
* Decorates this Command so that it's `Execute` method is implicitly timed
* using the `Tracer` class. This decorator also names the command similarly
* to the `WithName(string)` method.
*
* @param name name
* @return the decorated Command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,9 @@ class CommandPtr final {
CommandPtr WithName(std::string_view name) &&;

/**
* Decorates this Command so that it's `Execute` method is implicitly timed using the `Tracer` class.
* This decorator also names the command similarly to the `WithName(string)` method.
* Decorates this Command so that it's `Execute` method is implicitly timed
* using the `Tracer` class. This decorator also names the command similarly
* to the `WithName(string)` method.
*
* @param name name
* @return the decorated Command
Expand Down
7 changes: 3 additions & 4 deletions wpilibc/src/main/native/cpp/IterativeRobotBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ void IterativeRobotBase::LoopFunc() {

void IterativeRobotBase::PrintLoopOverrunMessage() {
FRC_ReportError(
err::Error,
"Loop time of {:.6f}s overrun\n Check NetworkTables for timing info",
m_period.value()
);
err::Error,
"Loop time of {:.6f}s overrun\n Check NetworkTables for timing info",
m_period.value());
}
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,6 @@ protected void loopFunc() {

private void printLoopOverrunMessage() {
DriverStation.reportWarning(
"Loop time of " + m_period + "s overrun\n Check NetworkTables for timing info",
false
);
"Loop time of " + m_period + "s overrun\n Check NetworkTables for timing info", false);
}
}

0 comments on commit a536db3

Please sign in to comment.