This commit is contained in:
Matthew Kennedy 2022-04-15 06:01:04 -07:00 committed by GitHub
parent a7673066c3
commit f729a1de27
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@ void TsChannelBase::copyAndWriteSmallCrcPacket(uint8_t responseCode, const uint8
}
void TsChannelBase::crcAndWriteBuffer(uint8_t responseCode, size_t size) {
efiAssertVoid(OBD_PCM_Processor_Fault, size <= BLOCKING_FACTOR + 7, "crcAndWriteBuffer tried to transmit too large a packet")
auto scratchBuffer = this->scratchBuffer;
// Index 0/1 = packet size (big endian)
*(uint16_t*)scratchBuffer = SWAP_UINT16(size + 1);