canon_ble #82

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

View File

@ -0,0 +1,3 @@
#!/bin/bash
cp mcopy_serial.* ../../mcopy_cam_canon/

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