Skip to content

Commit

Permalink
Fixed build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Francois Best committed Feb 13, 2014
1 parent dbc9d97 commit 1750e3a
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 35 deletions.
1 change: 1 addition & 0 deletions res/Examples/MIDI_LibValidator/MIDI_LibValidator.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <MIDI.h>
#include <LiquidCrystal.h>

#include <Arduino.h>
#include "midi_ValidatorSerialDebug.h"
#include "midi_ValidatorLCD.h"
#include "midi_ValidatorLEDs.h"
Expand Down
2 changes: 1 addition & 1 deletion res/Examples/MIDI_LibValidator/midi_ValidatorInstances.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#include <Arduino.h>
#include "midi_ValidatorInstances.h"

// -----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions res/Examples/MIDI_LibValidator/midi_ValidatorLCD.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#include <Arduino.h>
#include "midi_ValidatorLCD.h"

#define LCD_D4 8
Expand All @@ -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 },
Expand All @@ -28,7 +28,7 @@ void setupLCD()
{
for (byte i = 0; i < 6; ++i)
lcd.createChar(i, progressChar[i]);

lcd.begin(16,2);
}

Expand All @@ -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);
}
2 changes: 1 addition & 1 deletion res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inline void setLedsFinal(bool inSuccess)
{
digitalWrite(LED_PASS, HIGH);
digitalWrite(LED_FAIL, LOW);
}
}
else
{
digitalWrite(LED_FAIL, HIGH);
Expand Down
1 change: 1 addition & 0 deletions res/Examples/MIDI_LibValidator/midi_ValidatorLEDs.ino
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <Arduino.h>
#include "midi_ValidatorLEDs.h"

// -----------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <Arduino.h>
#include "midi_ValidatorSerialDebug.h"

void setupSerialDebug()
Expand Down
2 changes: 1 addition & 1 deletion res/Examples/MIDI_LibValidator/midi_ValidatorTester.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#include <Arduino.h>
#include "midi_ValidatorTester.h"
#include "midi_ValidatorInstances.h"
#include "midi_ValidatorTests.h"
Expand Down
56 changes: 28 additions & 28 deletions res/Examples/MIDI_LibValidator/midi_ValidatorTests.ino
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#include <Arduino.h>
#include "midi_ValidatorTests.h"

// -----------------------------------------------------------------------------
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 1750e3a

Please sign in to comment.