mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +00:00
SCRIPT: FRC_ replacements
This commit is contained in:
committed by
Peter Johnson
parent
824f36f63a
commit
928ff20695
@@ -193,7 +193,7 @@ void IterativeRobotBase::LoopFunc() {
|
||||
}
|
||||
|
||||
void IterativeRobotBase::PrintLoopOverrunMessage() {
|
||||
FRC_ReportError(err::Error, "Loop time of {:.6f}s overrun", m_period.value());
|
||||
WPILIB_ReportError(err::Error, "Loop time of {:.6f}s overrun", m_period.value());
|
||||
}
|
||||
|
||||
void IterativeRobotBase::PrintWatchdogEpochs() {
|
||||
|
||||
@@ -35,7 +35,7 @@ void TimedRobot::StartCompetition() {
|
||||
int32_t status = 0;
|
||||
HAL_UpdateNotifierAlarm(m_notifier, callback.expirationTime.count(),
|
||||
&status);
|
||||
FRC_CheckErrorStatus(status, "UpdateNotifierAlarm");
|
||||
WPILIB_CheckErrorStatus(status, "UpdateNotifierAlarm");
|
||||
|
||||
std::chrono::microseconds currentTime{
|
||||
HAL_WaitForNotifierAlarm(m_notifier, &status)};
|
||||
@@ -81,7 +81,7 @@ TimedRobot::TimedRobot(wpi::units::second_t period) : IterativeRobotBase(period)
|
||||
|
||||
int32_t status = 0;
|
||||
m_notifier = HAL_InitializeNotifier(&status);
|
||||
FRC_CheckErrorStatus(status, "InitializeNotifier");
|
||||
WPILIB_CheckErrorStatus(status, "InitializeNotifier");
|
||||
HAL_SetNotifierName(m_notifier, "TimedRobot", &status);
|
||||
|
||||
HAL_ReportUsage("Framework", "TimedRobot");
|
||||
@@ -93,7 +93,7 @@ TimedRobot::~TimedRobot() {
|
||||
if (m_notifier != HAL_kInvalidHandle) {
|
||||
int32_t status = 0;
|
||||
HAL_StopNotifier(m_notifier, &status);
|
||||
FRC_ReportError(status, "StopNotifier");
|
||||
WPILIB_ReportError(status, "StopNotifier");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ TimesliceRobot::TimesliceRobot(wpi::units::second_t robotPeriodicAllocation,
|
||||
void TimesliceRobot::Schedule(std::function<void()> func,
|
||||
wpi::units::second_t allocation) {
|
||||
if (m_nextOffset + allocation > m_controllerPeriod) {
|
||||
throw FRC_MakeError(err::Error,
|
||||
throw WPILIB_MakeError(err::Error,
|
||||
"Function scheduled at offset {} with allocation {} "
|
||||
"exceeded controller period of {}\n",
|
||||
m_nextOffset, allocation, m_controllerPeriod);
|
||||
|
||||
Reference in New Issue
Block a user