canon_ble #82

Merged
mattmcw merged 149 commits from canon_ble into main 2023-08-01 03:38:52 +00:00
4 changed files with 18 additions and 0 deletions
Showing only changes of commit e09fe7d42f - Show all commits

View File

@ -8,6 +8,8 @@ McopySerial::McopySerial (char identity) {
void McopySerial::begin () {
Serial.begin(baud);
Serial.flush();
Serial.setTimeout(serialDelay);
}
char McopySerial::loop () {
@ -52,6 +54,10 @@ void McopySerial::debug (bool state) {
debugOn = state;
}
void McopySerial::confirm (char cmd) {
Serial.println(cmd);
}
void McopySerial::log (String message) {
if (debugOn) {
Serial.println(message);

View File

@ -6,6 +6,8 @@
class McopySerial {
private:
const int serialDelay = 5;
volatile int baud = 57600;
volatile bool debugOn = false;
volatile char cmdChar = 'z';
@ -67,6 +69,7 @@ class McopySerial {
void setBaud(int baudRate);
void setIdentity(char identity);
char loop();
void confirm(char cmd);
void debug (bool state);
void log (String message);

View File

@ -8,6 +8,8 @@ McopySerial::McopySerial (char identity) {
void McopySerial::begin () {
Serial.begin(baud);
Serial.flush();
Serial.setTimeout(serialDelay);
}
char McopySerial::loop () {
@ -52,6 +54,10 @@ void McopySerial::debug (bool state) {
debugOn = state;
}
void McopySerial::confirm (char cmd) {
Serial.println(cmd);
}
void McopySerial::log (String message) {
if (debugOn) {
Serial.println(message);

View File

@ -6,6 +6,8 @@
class McopySerial {
private:
const int serialDelay = 5;
volatile int baud = 57600;
volatile bool debugOn = false;
volatile char cmdChar = 'z';
@ -67,6 +69,7 @@ class McopySerial {
void setBaud(int baudRate);
void setIdentity(char identity);
char loop();
void confirm(char cmd);
void debug (bool state);
void log (String message);