Add connected and identified member booleans to determine when fully connected to mcopy.
This commit is contained in:
parent
64faaa9427
commit
8f7a40075a
|
@ -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()");
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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()");
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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()");
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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()");
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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()");
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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()");
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue