Fixed some warnings in the MIDI examples

This commit is contained in:
Kristian Sloth Lauszus 2016-04-24 02:02:33 +02:00
parent 412c6665e2
commit 738adc67f6
6 changed files with 11 additions and 10 deletions

View file

@ -68,9 +68,10 @@ install:
#
# Libraries from PlatformIO Library Registry:
#
# http://platformio.org/#!/lib/show/416/TinyGPS
# http://platformio.org/#!/lib/show/417/SPI4Teensy3
- platformio lib install 416 417
# http://platformio.org/lib/show/62/MIDI
# http://platformio.org/lib/show/416/TinyGPS
# http://platformio.org/lib/show/417/SPI4Teensy3
- platformio lib install 62 416 417
script:
- platformio ci --board=uno --board=teensy31 --board=due --lib="."

View file

@ -43,10 +43,10 @@ void setup()
void loop()
{
unsigned long t1;
//unsigned long t1;
Usb.Task();
t1 = micros();
//t1 = micros();
if ( Usb.getUsbTaskState() == USB_STATE_RUNNING )
{
MIDI_poll();
@ -69,7 +69,7 @@ void MIDI_poll()
pid = Midi.pid;
}
if (Midi.RecvData( &rcvd, bufMidi) == 0 ) {
sprintf(buf, "%08X: ", millis());
sprintf(buf, "%08lX: ", millis());
Serial.print(buf);
Serial.print(rcvd);
Serial.print(':');

View file

@ -81,7 +81,7 @@ void doDelay(unsigned long t1, unsigned long t2, unsigned long delayTime)
unsigned long t3;
if ( t1 > t2 ) {
t3 = (4294967295 - t1 + t2);
t3 = (0xFFFFFFFF - t1 + t2);
} else {
t3 = t2 - t1;
}

View file

@ -89,7 +89,7 @@ void doDelay(unsigned long t1, unsigned long t2, unsigned long delayTime)
unsigned long t3;
if ( t1 > t2 ) {
t3 = (4294967295 - t1 + t2);
t3 = (0xFFFFFFFF - t1 + t2);
} else {
t3 = t2 - t1;
}

View file

@ -99,7 +99,7 @@ void doDelay(unsigned long t1, unsigned long t2, unsigned long delayTime)
unsigned long t3;
if ( t1 > t2 ) {
t3 = (4294967295 - t1 + t2);
t3 = (0xFFFFFFFF - t1 + t2);
} else {
t3 = t2 - t1;
}

View file

@ -69,7 +69,7 @@ void MIDI_poll()
Midi.SendSysEx(exdata, sizeof(exdata));
delay(500);
}
uint8_t size = Midi.RecvData(inBuf);
Midi.RecvData(inBuf);
}
//note On