Skip to content

Commit

Permalink
3.1.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
joshnishikawa committed Jun 14, 2024
1 parent 051d525 commit 95439c6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
8 changes: 5 additions & 3 deletions src/MIDIcontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
#include "MIDIpot.h"
#include "MIDIenc.h"
#include "MIDIdrum.h"
#if ! defined(__IMXRT1062__)

// Include the MIDItouch class only if the board has capacitive touch pins
// Teensy 3.6 Teensy 3.2 Teensy 3.0 Teensy LC
#if defined(__MK66FX1M0__) || defined(__MK20DX256__) || defined(__MK20DX128__) || defined(__MKL26Z64__)
#include "MIDItouch.h"
#endif

#define FORCE true

// Bounce, Encoder and Flicker libraries are also required
// Bounce2, Encoder and Flicker libraries are also required
// github.com/joshnishikawa/Flicker

#endif

4 changes: 0 additions & 4 deletions src/MIDIdrum.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@

#include "Arduino.h"

#if ! defined(__IMXRT1062__)
#include "Flicker.h"
#endif

extern byte MIDIchannel;

class MIDIdrum{
Expand Down
8 changes: 4 additions & 4 deletions src/MIDIswitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MIDIswitch::MIDIswitch(int p, uint8_t num) : Bounce(p, 10){
}
}

#if ! defined(__IMXRT1062__)
#if defined(__MK66FX1M0__) || defined(__MK20DX256__) || defined(__MK20DX128__) || defined(__MKL26Z64__)
MIDIswitch::MIDIswitch(int p, uint8_t num, uint8_t x) : Bounce(p, 10), TouchSwitch(p, 0){
#else
MIDIswitch::MIDIswitch(int p, uint8_t num, uint8_t x) : Bounce(p, 10){
Expand Down Expand Up @@ -53,7 +53,7 @@ MIDIswitch::MIDIswitch(int p, uint8_t num, uint8_t x) : Bounce(p, 10){
}


#if ! defined(__IMXRT1062__)
#if defined(__MK66FX1M0__) || defined(__MK20DX256__) || defined(__MK20DX128__) || defined(__MKL26Z64__)
MIDIswitch::MIDIswitch(int p, uint8_t num, uint8_t m, uint8_t t) : Bounce(0, 0), TouchSwitch(p, 0){
#else
MIDIswitch::MIDIswitch(int p, uint8_t num, uint8_t m, uint8_t t) : Bounce(p, 10){
Expand Down Expand Up @@ -97,7 +97,7 @@ MIDIswitch::MIDIswitch(int p, uint8_t num, uint8_t m, uint8_t t) : Bounce(p, 10)
MIDIswitch::~MIDIswitch(){};


#if ! defined(__IMXRT1062__)
#if defined(__MK66FX1M0__) || defined(__MK20DX256__) || defined(__MK20DX128__) || defined(__MKL26Z64__)
void MIDIswitch::setThreshold(){
TouchSwitch::setThreshold();
}
Expand All @@ -119,7 +119,7 @@ int MIDIswitch::read(){
}
else{ return -1; }
}
#if ! defined(__IMXRT1062__)
#if defined(__MK66FX1M0__) || defined(__MK20DX256__) || defined(__MK20DX128__) || defined(__MKL26Z64__)
else if (inputType == TOUCH){
TouchSwitch::update();
inputState = TouchSwitch::read();
Expand Down
6 changes: 3 additions & 3 deletions src/MIDIswitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "Arduino.h"
#include "Bounce2.h"

#if ! defined(__IMXRT1062__)
#if defined(__MK66FX1M0__) || defined(__MK20DX256__) || defined(__MK20DX128__) || defined(__MKL26Z64__)
#include "Flicker.h"
#endif

Expand All @@ -23,7 +23,7 @@

extern byte MIDIchannel;

#if ! defined(__IMXRT1062__)
#if defined(__MK66FX1M0__) || defined(__MK20DX256__) || defined(__MK20DX128__) || defined(__MKL26Z64__)
class MIDIswitch: public Bounce, public TouchSwitch{
#else
class MIDIswitch: public Bounce{
Expand All @@ -47,7 +47,7 @@ class MIDIswitch: public Bounce{
// destructor
~MIDIswitch();

#if ! defined(__IMXRT1062__)
#if defined(__MK66FX1M0__) || defined(__MK20DX256__) || defined(__MK20DX128__) || defined(__MKL26Z64__)
// setThreshold() is only used for Capacitive Touch inputs. It assumes the
// input is NOT being touched and automatically calculates a threshold
// using a call to touchRead(). Use in setup().
Expand Down

0 comments on commit 95439c6

Please sign in to comment.