Remove periodic can read call (#1868)

It is not necessary anymore, and is a complicated and confusing API to keep around.
This commit is contained in:
Thad House
2019-09-28 15:38:58 -07:00
committed by Peter Johnson
parent 41efb8015d
commit 8858ec55c7
8 changed files with 22 additions and 201 deletions

View File

@@ -116,20 +116,3 @@ bool CAN::ReadPacketTimeout(int apiId, int timeoutMs, CANData* data) {
return true;
}
}
bool CAN::ReadPeriodicPacket(int apiId, int timeoutMs, int periodMs,
CANData* data) {
int32_t status = 0;
HAL_ReadCANPeriodicPacket(m_handle, apiId, data->data, &data->length,
&data->timestamp, timeoutMs, periodMs, &status);
if (status == HAL_CAN_TIMEOUT ||
status == HAL_ERR_CANSessionMux_MessageNotFound) {
return false;
}
if (status != 0) {
wpi_setErrorWithContext(status, HAL_GetErrorMessage(status));
return false;
} else {
return true;
}
}