Fixed a bazillion errors
This commit is contained in:
parent
1af412dd4b
commit
07ae3f86be
1 changed files with 13 additions and 13 deletions
|
@ -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();
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue