ts: isBigPacket convert from define to method
This commit is contained in:
parent
1ea4401ac9
commit
3d20eefeac
|
@ -19,7 +19,9 @@ size_t TsChannelBase::read(uint8_t* buffer, size_t size) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#define isBigPacket(size) ((TS_PACKET_HEADER_SIZE + size + TS_PACKET_TAIL_SIZE) > sizeof(scratchBuffer))
|
||||
bool TsChannelBase::isBigPacket(size_t size) {
|
||||
return ((TS_PACKET_HEADER_SIZE + size + TS_PACKET_TAIL_SIZE) > sizeof(scratchBuffer));
|
||||
}
|
||||
|
||||
void TsChannelBase::copyAndWriteSmallCrcPacket(uint8_t responseCode, const uint8_t* buf, size_t size) {
|
||||
// don't transmit too large a buffer
|
||||
|
|
|
@ -75,6 +75,7 @@ public:
|
|||
bool in_sync = false;
|
||||
|
||||
private:
|
||||
bool isBigPacket(size_t size);
|
||||
void writeCrcPacketLarge(uint8_t responseCode, const uint8_t* buf, size_t size);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue