From 07ae3f86be3f4d4894c07b09c775248db50741c7 Mon Sep 17 00:00:00 2001 From: KaraBun Date: Sat, 21 Jan 2023 00:44:47 -0500 Subject: [PATCH] Fixed a bazillion errors --- TrigorMortse.ino | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/TrigorMortse.ino b/TrigorMortse.ino index ed1d827..ddd8f61 100644 --- a/TrigorMortse.ino +++ b/TrigorMortse.ino @@ -22,9 +22,9 @@ const int DisplaySpi = 0; //todo: find spi port ## from library Encoder LeftEnc( Enc1P1, Enc1P2); Encoder RightEnc( Enc2P1, Enc2P2); -MortseUi Ui(DisplaySpi); +//MortseUi Ui(DisplaySpi); -String TestText = "Momento Mortse" +String TestText = "Momento Mortse"; int E1 = 0; int E2 = 0; @@ -34,7 +34,7 @@ bool E1Btn = false; bool E2Btn = false; bool ClockState = false; bool Beat = false; -unsigned int Channel1Trig = 0, Channel2Trig = 0; Channel3Trig = 0; +unsigned int Channel1Trig = 0, Channel2Trig = 0, Channel3Trig = 0; bool E1Prev, E2Prev, CDPrev, E1Click, E2Click, CDIn = false, Channel1State = false, Channel2State = false, Channel3State = false; unsigned int E1Bounce, E2Bounce, CDBounce = 0, BeatBounce = 0; unsigned long ClockPrev = 0, ClockInPrev = 0, LastBeat = 0; @@ -58,8 +58,8 @@ void setup() { pinMode(ClockIn, INPUT); pinMode(ClockDetect, INPUT_PULLUP); pinMode(Channel1, OUTPUT); - PinMode(Channel2, OUTPUT); - PinMode(Channel3, OUTPUT); + pinMode(Channel2, OUTPUT); + pinMode(Channel3, OUTPUT); E1Btn = digitalRead(Enc1Btn); E1Prev = E1Btn; @@ -124,9 +124,9 @@ void loop() { ClockPrev = tmpClock; if (abs(ClockInPrev - clkInTick) > 500){ - Clock = = ((1.0/(clkInTick/1000000.0)) * 60.0)/(float)PpQN; + Clock = ((1.0/(clkInTick/1000000.0)) * 60.0)/(float)PpQN; String outputBPM = "New BPM: "; - outputBPM.concat(newBPM); + outputBPM.concat(Clock); Serial.println(outputBPM); outputBPM = "Clock Tick: "; outputBPM.concat(clkInTick); @@ -175,18 +175,18 @@ void loop() { if (!BeatBounce){ //Insert Beat Output here! - char outputChar = TestString[Channel1Index]; - if (outputChar == '/0'){ + char outputChar = TestText[Channel1Index]; + if (outputChar == '\0' ){ Channel1Index = 0; - outputChar = TestString[Channel1Index]; + outputChar = TestText[Channel1Index]; } - byte morselength = MorseTable[((int)outputChar - 32)]; + byte morseLength = MorseTable[((int)outputChar - 32)]; byte morsePattern = morseLength; bool trigger = (morsePattern >> MorseIndex) & 1; if (MorseIndex == 0){ Channel1Index++; - outputChar = TestString[Channel1Index]; + outputChar = TestText[Channel1Index]; MorseIndex = ((MorseTable[((int)outputChar - 32)]) >> 5) - 1; } @@ -212,7 +212,7 @@ void loop() { Channel3State = false; } - Ui.tick(); + //Ui.tick(); }