Compare commits

..

No commits in common. "cc806cbe521383db3df68345f788157cbb00ee5b" and "64faaa94272297319623c6dfc718fb5f7b9eb6f7" have entirely different histories.

13 changed files with 5 additions and 49 deletions

View File

@ -32,13 +32,11 @@ 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,9 +20,6 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -32,13 +32,11 @@ 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,9 +20,6 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -32,13 +32,11 @@ 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,9 +20,6 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -32,13 +32,11 @@ 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,9 +20,6 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -32,13 +32,11 @@ 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,9 +20,6 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';

View File

@ -34,7 +34,6 @@ CanonBLERemote canon_ble(name_remote);
McopySerial mc;
volatile boolean connected = false;
volatile boolean bleInit = false;
volatile long now;
volatile long last = -1;
@ -45,18 +44,13 @@ volatile char cmdChar = 'z';
void setup()
{
esp_log_level_set("*", ESP_LOG_NONE);
esp_log_level_set("*", ESP_LOG_INFO);
pins();
mc.begin(mc.CAMERA_IDENTIFIER);
canon_ble.init();
digitalWrite(RED_LED, HIGH);
digitalWrite(GREEN_LED, HIGH);
delay(42);
digitalWrite(RED_LED, LOW);
digitalWrite(GREEN_LED, LOW);
delay(1000);
}
void pins () {
@ -94,7 +88,7 @@ void loop()
cmd(cmdChar);
// Shutter
if (digitalRead(SHUTTTER_BTN) == LOW && connected){
if (digitalRead(SHUTTTER_BTN) == LOW && last + 1000 < now){
camera();
}
@ -102,15 +96,7 @@ void loop()
connected = false;
}
if (!bleInit && mc.connected && mc.identified) {
mc.log("Initializing BLE...");
canon_ble.init();
bleInit = true;
delay(1000);
}
if (!connected && mc.connected && mc.identified) {
mc.log("Connecting BLE...");
if (!connected) {
connectBLE();
}
}

View File

@ -32,13 +32,11 @@ 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,9 +20,6 @@ class McopySerial {
public:
volatile bool connected = false;
volatile bool identified = false;
/* CMD FLAGS */
const char BLACK = 'b';
const char CAMERA = 'c';