fixes!
This commit is contained in:
parent
69f48d65cd
commit
057cce2096
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "SimpleSerialProtocol",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"description": "Easy-to-use serial protocol system for arduino type devices.",
|
||||
"keywords": "Serial, Connectivity, USB, Simple",
|
||||
"repository":
|
||||
|
@ -21,9 +21,9 @@
|
||||
class SerialConnection
|
||||
{
|
||||
private:
|
||||
byte serialBufferSize = 300;
|
||||
char serialBuffer[300];
|
||||
char serialData[300] = {0};
|
||||
int serialBufferSize = 1024;
|
||||
char serialBuffer[1024];
|
||||
char serialData[1024] = {0};
|
||||
|
||||
const char packetStartMarker = '<';
|
||||
const char packetEndMarker = '>';
|
||||
@ -55,20 +55,26 @@ void SerialConnection::init(int serialIndex, unsigned long serialBaud) {
|
||||
serialRefrence = &Serial;
|
||||
}
|
||||
|
||||
#ifdef Serial1
|
||||
else if (serialIndex == 1) {
|
||||
Serial1.begin(serialBaud);
|
||||
serialRefrence = &Serial1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef Serial2
|
||||
else if (serialIndex == 2) {
|
||||
Serial2.begin(serialBaud);
|
||||
serialRefrence = &Serial2;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef Serial3
|
||||
else if (serialIndex == 3) {
|
||||
Serial3.begin(serialBaud);
|
||||
serialRefrence = &Serial3;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
char* SerialConnection::handle() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user