canon_ble #82

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

View File

@ -1,13 +1,27 @@
/// mcopy Serial Library
#include "McopySerial.h"
McopySerial::McopySerial () {
}
void McopySerial::on()
void McopySerial::begin () {
Serial.begin(baud);
}
void McopySerial::loop () {
if (Serial.available()) {
cmdChar = (char) Serial.read();
}
if (cmdChar != 'z') {
//cmd(cmdChar);
cmdChar = 'z';
}
}
void McopySerial::setBaud (int baudRate) {
baud = baudRate;
}

View File

@ -3,17 +3,21 @@
#include "Arduino.h"
typedef void (*mcopy_callback)(void);
class McopySerial {
private:
volatile int baud = 57600;
volatile bool debugOn = false;
volatile char cmdChar = 'z';
public:
McopySerial();
void begin();
void setBaud(int baudRate);
void loop();
void debug (bool state);
void log (String message);

View File

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

View File

@ -1,13 +1,27 @@
/// mcopy Serial Library
#include "McopySerial.h"
McopySerial::McopySerial () {
}
void McopySerial::on()
void McopySerial::begin () {
Serial.begin(baud);
}
void McopySerial::loop () {
if (Serial.available()) {
cmdChar = (char) Serial.read();
}
if (cmdChar != 'z') {
//cmd(cmdChar);
cmdChar = 'z';
}
}
void McopySerial::setBaud (int baudRate) {
baud = baudRate;
}

View File

@ -3,17 +3,21 @@
#include "Arduino.h"
typedef void (*mcopy_callback)(void);
class McopySerial {
private:
volatile int baud = 57600;
volatile bool debugOn = false;
volatile char cmdChar = 'z';
public:
McopySerial();
void begin();
void setBaud(int baudRate);
void loop();
void debug (bool state);
void log (String message);