Add connected and identified member booleans to determine when fully connected to mcopy.

This commit is contained in:
Matt McWilliams 2023-04-20 22:37:37 -04:00
parent 64faaa9427
commit 8f7a40075a
12 changed files with 30 additions and 0 deletions

View File

@ -32,11 +32,13 @@ void McopySerial::_internal () {
}
void McopySerial::_connect () {
connected = true;
Serial.println(CONNECT);
log("connect()");
}
void McopySerial::_identify () {
identified = true;
Serial.println(id);
log("identify()");
}

View File

@ -20,6 +20,9 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -32,11 +32,13 @@ void McopySerial::_internal () {
}
void McopySerial::_connect () {
connected = true;
Serial.println(CONNECT);
log("connect()");
}
void McopySerial::_identify () {
identified = true;
Serial.println(id);
log("identify()");
}

View File

@ -20,6 +20,9 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -32,11 +32,13 @@ void McopySerial::_internal () {
}
void McopySerial::_connect () {
connected = true;
Serial.println(CONNECT);
log("connect()");
}
void McopySerial::_identify () {
identified = true;
Serial.println(id);
log("identify()");
}

View File

@ -20,6 +20,9 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -32,11 +32,13 @@ void McopySerial::_internal () {
}
void McopySerial::_connect () {
connected = true;
Serial.println(CONNECT);
log("connect()");
}
void McopySerial::_identify () {
identified = true;
Serial.println(id);
log("identify()");
}

View File

@ -20,6 +20,9 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -32,11 +32,13 @@ void McopySerial::_internal () {
}
void McopySerial::_connect () {
connected = true;
Serial.println(CONNECT);
log("connect()");
}
void McopySerial::_identify () {
identified = true;
Serial.println(id);
log("identify()");
}

View File

@ -20,6 +20,9 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -32,11 +32,13 @@ void McopySerial::_internal () {
}
void McopySerial::_connect () {
connected = true;
Serial.println(CONNECT);
log("connect()");
}
void McopySerial::_identify () {
identified = true;
Serial.println(id);
log("identify()");
}

View File

@ -20,6 +20,9 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';