canon_ble #82

Merged
mattmcw merged 149 commits from canon_ble into main 2023-08-01 03:38:52 +00:00
6 changed files with 45 additions and 1 deletions
Showing only changes of commit 78450e9e6a - Show all commits

View File

@ -0,0 +1,20 @@
#include "mcopy_serial.h"
void McopySerial::begin (int baudRate) {
baud = baudRate;
begin();
}
void McopySerial::begin () {
}
void McopySerial::debug (bool state) {
debugOn = state;
}
void McopySerial::log (String message) {
if (debugOn) {
Serial.println(message);
}
}

View File

@ -0,0 +1,20 @@
#ifndef MCOPY_SERIAL
#define MCOPY_SERIAL
#include "Arduino.h"
class McopySerial {
private:
volatile int baud = 57600;
volatile bool debugOn = false;
public:
void begin();
void begin(int baudRate);
void debug (bool state);
void log (String message);
};
#endif

View File

@ -1 +1,2 @@
debug* debug*
bin

View File

@ -17,6 +17,7 @@
#include "CanonBLERemote.h" #include "CanonBLERemote.h"
#include <Arduino.h> #include <Arduino.h>
#include "TickTwo.h" #include "TickTwo.h"
#include "mcopy_serial.h"
#define LOG_LOCAL_LEVEL ESP_LOG_INFO #define LOG_LOCAL_LEVEL ESP_LOG_INFO
#include "esp_log.h" #include "esp_log.h"

View File

@ -0,0 +1 @@
ino/lib/mcopy_serial/mcopy_serial.cpp

View File

@ -0,0 +1 @@
ino/lib/mcopy_serial/mcopy_serial.h