Update McopySerial usage in both scripts that use it.

This commit is contained in:
Matt McWilliams 2023-03-21 20:38:45 -04:00
parent 4e0149e752
commit 231c354cb1
2 changed files with 7 additions and 7 deletions

View File

@ -7,7 +7,7 @@
SoftwareSerial pixieSerial(-1, PIXIEPIN);
Adafruit_Pixie light = Adafruit_Pixie(NUMPIXELS, &pixieSerial);
McopySerial mc(McopySerial::LIGHT_IDENTIFIER);
McopySerial mc;
String color = "000,000,000";
@ -28,7 +28,7 @@ volatile char cmd = 'z';
void setup () {
mc.begin();
mc.begin(mc.LIGHT_IDENTIFIER);
pixieSerial.begin(115200); // Pixie REQUIRES this baud rate
light.setPixelColor(0, 0, 0, 0);
light.show();
@ -41,10 +41,10 @@ void loop () {
now = millis();
cmd = mc.loop();
if (cmd == McopySerial::LIGHT) {
if (cmd == mc.LIGHT) {
color = mc.getString();
parseColorString();
mc.confirm(McopySerial::LIGHT);
mc.confirm(mc.LIGHT);
}
//send light signal to pixie every second

View File

@ -33,7 +33,7 @@ volatile bool ledState;
const String name_remote = "mcopy";
CanonBLERemote canon_ble(name_remote);
TickTwo blinker(blink, 500);
McopySerial mc(McopySerial::CAMERA_IDENTIFIER);
McopySerial mc;
volatile boolean connected = false;
@ -83,7 +83,7 @@ void loop()
now = millis();
cmd = mc.loop();
if (cmd == McopySerial::CAMERA && last + 1000 < now) {
if (cmd == mc.CAMERA && last + 1000 < now) {
shutter();
}
@ -114,5 +114,5 @@ void shutter () {
blinker.pause();
digitalWrite(LED, HIGH);
last = millis();
mc.confirm(McopySerial::CAMERA);
mc.confirm(mc.CAMERA);
}