Sync actual files

This commit is contained in:
Matt McWilliams 2023-03-04 19:01:35 -05:00
parent 52acb97e08
commit 9b298ac676
3 changed files with 43 additions and 0 deletions

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