From 1750e3a5afe77dc784887639b04ccfc54e22c76e Mon Sep 17 00:00:00 2001 From: Francois Best Date: Thu, 13 Feb 2014 22:13:09 +0100 Subject: [PATCH] Fixed build. --- .../MIDI_LibValidator/MIDI_LibValidator.ino | 1 + .../midi_ValidatorInstances.ino | 2 +- .../MIDI_LibValidator/midi_ValidatorLCD.ino | 8 +-- .../MIDI_LibValidator/midi_ValidatorLEDs.h | 2 +- .../MIDI_LibValidator/midi_ValidatorLEDs.ino | 1 + .../midi_ValidatorSerialDebug.ino | 1 + .../midi_ValidatorTester.ino | 2 +- .../MIDI_LibValidator/midi_ValidatorTests.ino | 56 +++++++++---------- 8 files changed, 38 insertions(+), 35 deletions(-) diff --git a/res/Examples/MIDI_LibValidator/MIDI_LibValidator.ino b/res/Examples/MIDI_LibValidator/MIDI_LibValidator.ino index 6740f1a4..a1f63e6a 100644 --- a/res/Examples/MIDI_LibValidator/MIDI_LibValidator.ino +++ b/res/Examples/MIDI_LibValidator/MIDI_LibValidator.ino @@ -3,6 +3,7 @@ #include #include +#include #include "midi_ValidatorSerialDebug.h" #include "midi_ValidatorLCD.h" #include "midi_ValidatorLEDs.h" diff --git a/res/Examples/MIDI_LibValidator/midi_ValidatorInstances.ino b/res/Examples/MIDI_LibValidator/midi_ValidatorInstances.ino index 4ec241b6..31db157f 100644 --- a/res/Examples/MIDI_LibValidator/midi_ValidatorInstances.ino +++ b/res/Examples/MIDI_LibValidator/midi_ValidatorInstances.ino @@ -1,4 +1,4 @@ - +#include #include "midi_ValidatorInstances.h" // ----------------------------------------------------------------------------- diff --git a/res/Examples/MIDI_LibValidator/midi_ValidatorLCD.ino b/res/Examples/MIDI_LibValidator/midi_ValidatorLCD.ino index c985a739..85e82653 100644 --- a/res/Examples/MIDI_LibValidator/midi_ValidatorLCD.ino +++ b/res/Examples/MIDI_LibValidator/midi_ValidatorLCD.ino @@ -1,4 +1,4 @@ - +#include #include "midi_ValidatorLCD.h" #define LCD_D4 8 @@ -10,7 +10,7 @@ // ----------------------------------------------------------------------------- -byte progressChar[6][8] = +byte progressChar[6][8] = { { B00000, B00000, B00000, B00000, B00000, B00000, B00000, B00000 }, { B10000, B10000, B10000, B10000, B10000, B10000, B10000, B10000 }, @@ -28,7 +28,7 @@ void setupLCD() { for (byte i = 0; i < 6; ++i) lcd.createChar(i, progressChar[i]); - + lcd.begin(16,2); } @@ -41,7 +41,7 @@ void setProgressBar(unsigned inProgress, unsigned inTotal) const unsigned progress = (inProgress * numCols* numPix) / inTotal; const byte cursorX = progress / numPix; const byte charIndex = progress % numPix; - + lcd.setCursor(cursorX, 1); lcd.write(charIndex); } diff --git a/res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.h b/res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.h index 0c6bf817..be7deaa7 100644 --- a/res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.h +++ b/res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.h @@ -32,7 +32,7 @@ inline void setLedsFinal(bool inSuccess) { digitalWrite(LED_PASS, HIGH); digitalWrite(LED_FAIL, LOW); - } + } else { digitalWrite(LED_FAIL, HIGH); diff --git a/res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.ino b/res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.ino index 44a2406f..616d72c8 100644 --- a/res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.ino +++ b/res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.ino @@ -1,3 +1,4 @@ +#include #include "midi_ValidatorLEDs.h" // ----------------------------------------------------------------------------- diff --git a/res/Examples/MIDI_LibValidator/midi_ValidatorSerialDebug.ino b/res/Examples/MIDI_LibValidator/midi_ValidatorSerialDebug.ino index 7caf39d8..844fbe39 100644 --- a/res/Examples/MIDI_LibValidator/midi_ValidatorSerialDebug.ino +++ b/res/Examples/MIDI_LibValidator/midi_ValidatorSerialDebug.ino @@ -1,3 +1,4 @@ +#include #include "midi_ValidatorSerialDebug.h" void setupSerialDebug() diff --git a/res/Examples/MIDI_LibValidator/midi_ValidatorTester.ino b/res/Examples/MIDI_LibValidator/midi_ValidatorTester.ino index 8cabb071..cf066606 100644 --- a/res/Examples/MIDI_LibValidator/midi_ValidatorTester.ino +++ b/res/Examples/MIDI_LibValidator/midi_ValidatorTester.ino @@ -1,4 +1,4 @@ - +#include #include "midi_ValidatorTester.h" #include "midi_ValidatorInstances.h" #include "midi_ValidatorTests.h" diff --git a/res/Examples/MIDI_LibValidator/midi_ValidatorTests.ino b/res/Examples/MIDI_LibValidator/midi_ValidatorTests.ino index f00287fc..e15b325e 100644 --- a/res/Examples/MIDI_LibValidator/midi_ValidatorTests.ino +++ b/res/Examples/MIDI_LibValidator/midi_ValidatorTests.ino @@ -1,4 +1,4 @@ - +#include #include "midi_ValidatorTests.h" // ----------------------------------------------------------------------------- @@ -7,9 +7,9 @@ IMPLEMENT_MIDI_TEST(testNoteOn, inMidi) { inMidi.sendNoteOn(12, 42, 3); while (inMidi.read() == false) { } - - bool result = inMidi.getType() == midi::NoteOn && - inMidi.getData1() == 12 && + + bool result = inMidi.getType() == midi::NoteOn && + inMidi.getData1() == 12 && inMidi.getData2() == 42 && inMidi.getChannel() == 3; return result; @@ -19,9 +19,9 @@ IMPLEMENT_MIDI_TEST(testNoteOff, inMidi) { inMidi.sendNoteOff(12, 42, 3); while (inMidi.read() == false) { } - - bool result = inMidi.getType() == midi::NoteOff && - inMidi.getData1() == 12 && + + bool result = inMidi.getType() == midi::NoteOff && + inMidi.getData1() == 12 && inMidi.getData2() == 42 && inMidi.getChannel() == 3; return result; @@ -31,9 +31,9 @@ IMPLEMENT_MIDI_TEST(testControlChange, inMidi) { inMidi.sendControlChange(12, 42, 3); while (inMidi.read() == false) { } - - bool result = inMidi.getType() == midi::ControlChange && - inMidi.getData1() == 12 && + + bool result = inMidi.getType() == midi::ControlChange && + inMidi.getData1() == 12 && inMidi.getData2() == 42 && inMidi.getChannel() == 3; return result; @@ -43,9 +43,9 @@ IMPLEMENT_MIDI_TEST(testProgramChange, inMidi) { inMidi.sendProgramChange(12, 3); while (inMidi.read() == false) { } - - bool result = inMidi.getType() == midi::ProgramChange && - inMidi.getData1() == 12 && + + bool result = inMidi.getType() == midi::ProgramChange && + inMidi.getData1() == 12 && inMidi.getData2() == 0 && inMidi.getChannel() == 3; return result; @@ -55,9 +55,9 @@ IMPLEMENT_MIDI_TEST(testAftertouchMono, inMidi) { inMidi.sendAfterTouch(12, 3); while (inMidi.read() == false) { } - - bool result = inMidi.getType() == midi::AfterTouchChannel && - inMidi.getData1() == 12 && + + bool result = inMidi.getType() == midi::AfterTouchChannel && + inMidi.getData1() == 12 && inMidi.getData2() == 0 && inMidi.getChannel() == 3; return result; @@ -67,9 +67,9 @@ IMPLEMENT_MIDI_TEST(testAftertouchPoly, inMidi) { inMidi.sendPolyPressure(12, 42, 3); while (inMidi.read() == false) { } - - bool result = inMidi.getType() == midi::AfterTouchPoly && - inMidi.getData1() == 12 && + + bool result = inMidi.getType() == midi::AfterTouchPoly && + inMidi.getData1() == 12 && inMidi.getData2() == 42 && inMidi.getChannel() == 3; return result; @@ -90,8 +90,8 @@ IMPLEMENT_MIDI_TEST(testPitchBend, inMidi) pitchBendMemory = 0; inMidi.sendPitchBend((int)1234, 3); while (inMidi.read() == false) { } - - bool result = inMidi.getType() == midi::PitchBend && + + bool result = inMidi.getType() == midi::PitchBend && pitchBendMemory == 1234 && inMidi.getChannel() == 3; return result; @@ -108,7 +108,7 @@ IMPLEMENT_MIDI_TEST(testSysEx, inMidi) }; inMidi.sendSysEx(13, testData); - + while (inMidi.read() == false) { } bool result = inMidi.getSysExArrayLength() == 15 && // 13 + F0 + F7 @@ -170,7 +170,7 @@ IMPLEMENT_MIDI_TEST(testTimeCode, inMidi) inMidi.setHandleTimeCodeQuarterFrame(timeCodeCallback); inMidi.sendTimeCodeQuarterFrame(0x07, 0x0F); while (inMidi.read() == false) { } - bool result = inMidi.getType() == midi::TimeCodeQuarterFrame && + bool result = inMidi.getType() == midi::TimeCodeQuarterFrame && timeCodeMemory == 0x7F && inMidi.getChannel() == 0; return result; @@ -182,9 +182,9 @@ IMPLEMENT_MIDI_TEST(testSongSelect, inMidi) { inMidi.sendSongSelect(12); while (inMidi.read() == false) { } - - bool result = inMidi.getType() == midi::SongSelect && - inMidi.getData1() == 12 && + + bool result = inMidi.getType() == midi::SongSelect && + inMidi.getData1() == 12 && inMidi.getData2() == 0 && inMidi.getChannel() == 0; return result; @@ -205,8 +205,8 @@ IMPLEMENT_MIDI_TEST(testSongPosition, inMidi) inMidi.setHandleSongPosition(songPositionCallback); inMidi.sendSongPosition(12345); while (inMidi.read() == false) { } - - bool result = inMidi.getType() == midi::SongPosition && + + bool result = inMidi.getType() == midi::SongPosition && songPositionMemory == 12345 && inMidi.getChannel() == 0; return result;