SCRIPT: FRC_ replacements

This commit is contained in:
PJ Reiniger
2025-11-07 20:00:43 -05:00
committed by Peter Johnson
parent 824f36f63a
commit 928ff20695
143 changed files with 477 additions and 477 deletions

View File

@@ -20,11 +20,11 @@ ExpansionHubMotor::ExpansionHubMotor(int usbId, int channel)
m_channel{channel},
m_velocityPidConstants{usbId, channel, true},
m_positionPidConstants{usbId, channel, false} {
FRC_AssertMessage(channel >= 0 && channel < ExpansionHub::NumMotorPorts,
WPILIB_AssertMessage(channel >= 0 && channel < ExpansionHub::NumMotorPorts,
"ExHub Motor Channel {} out of range", channel);
if (!m_hub.CheckAndReserveMotor(channel)) {
throw FRC_MakeError(err::ResourceAlreadyAllocated, "Channel {}", channel);
throw WPILIB_MakeError(err::ResourceAlreadyAllocated, "Channel {}", channel);
}
m_hub.ReportUsage(fmt::format("ExHubServo[{}]", channel), "ExHubServo");
@@ -153,7 +153,7 @@ ExpansionHubPidConstants& ExpansionHubMotor::GetPositionPidConstants() {
void ExpansionHubMotor::Follow(const ExpansionHubMotor& leader) {
if (m_hub.GetUsbId() != leader.m_hub.GetUsbId()) {
throw FRC_MakeError(err::InvalidParameter,
throw WPILIB_MakeError(err::InvalidParameter,
"Cannot follow motor on different hub");
}
m_modePublisher.Set(kFollowerMode);