[hal] Remove HAL_GetPort (#7754)

This commit is contained in:
Thad House
2025-01-30 18:59:34 -08:00
committed by GitHub
parent 6e704370b3
commit ad29d45dfb
44 changed files with 84 additions and 272 deletions

View File

@@ -26,11 +26,9 @@ AnalogInput::AnalogInput(int channel) {
}
m_channel = channel;
HAL_PortHandle port = HAL_GetPort(channel);
int32_t status = 0;
std::string stackTrace = wpi::GetStackTrace(1);
m_port = HAL_InitializeAnalogInputPort(port, stackTrace.c_str(), &status);
m_port = HAL_InitializeAnalogInputPort(channel, stackTrace.c_str(), &status);
FRC_CheckErrorStatus(status, "Channel {}", channel);
HAL_Report(HALUsageReporting::kResourceType_AnalogChannel, channel + 1);