Closed Humancell closed 5 years ago
I've been reading more and more about templates, and have tried both:
PacketSerial<0, 512> myPacketSerial;
error: 'PacketSerial' is not a template
COBSPacketSerial<0, 512> myPacketSerial;
error: 'COBSPacketSerial {aka PacketSerial_<COBS>}' is not a template
But neither of these work ...
Ok ... so close.
I found this, and it works! The underscore and EncoderType I missed.
PacketSerial_<COBS, 0, 512> myPacketSerial;
I've read in the code where I'm supposed to be able to set a larger buffer size:
https://github.com/bakercp/PacketSerial/blob/master/src/PacketSerial.h#L27
I'll admit that I'm not familiar with this template concept and am unable to figure out the proper syntax in my code with the constructor to include these parameters.
Do you have an example of how to provide these two parameters?