Skip to content

Commit

Permalink
Merge branch 'master' of github.com:tttapa/MIDI_controller
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Mar 4, 2019
2 parents 629564b + e895a51 commit 815c869
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions DFU scripts/Linux/Serial - Arduino-Uno-DFU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

cd "$(dirname "${BASH_SOURCE}")"

read -p "Are you sure you want to flash your ATmega16U2 with the Arduino Uno Serial firmware? [Y/n]: " confirm
read -p "Are you sure you want to flash your ATmega16U2 with the Arduino Uno Serial firmware? [y/N]: " confirm
if [ "$confirm" = y ] || [ "$confirm" = Y ]
then
if [ ! -e Arduino-usbserial-atmega16u2-Uno-Rev3.hex ]
then
echo "Downloading firmware: Arduino-usbserial-atmega16u2-Uno-Rev3.hex ..."
wget --quiet "https://raw.githubusercontent.com/arduino/Arduino/master/hardware/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial/Arduino-usbserial-atmega16u2-Uno-Rev3.hex"
# wget --quiet "https://raw.githubusercontent.com/arduino/Arduino/master/hardware/arduino/avr/firmwares/atmegaxxu2/arduino-usbserial/Arduino-usbserial-atmega16u2-Uno-Rev3.hex"
wget --quiet "https://raw.githubusercontent.com/arduino/ArduinoCore-avr/master/firmwares/atmegaxxu2/arduino-usbserial/Arduino-usbserial-atmega16u2-Uno-Rev3.hex"
fi
echo "Erasing ..."
sudo dfu-programmer atmega16u2 erase
Expand Down
4 changes: 2 additions & 2 deletions keywords.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ MIDI_CC KEYWORD1
#######################################
refresh KEYWORD2

setDefault
getDefault
setDefault KEYWORD2
getDefault KEYWORD2

average KEYWORD2
map KEYWORD2
Expand Down
4 changes: 2 additions & 2 deletions src/MIDI_Outputs/ButtonMatrix.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void ButtonMatrix<nb_rows, nb_cols>::refresh()
if (state != getPrevState(col, row)) // if the state changed since last time
{
// send it over MIDI
uint8_t note = addresses[col][row];
uint8_t note = addresses[row][col];
MIDI_Controller.MIDI()->send(state ? NOTE_OFF : NOTE_ON, channel + channelOffset * channelsPerBank, note + addressOffset * channelsPerBank, velocity);
setPrevState(col, row, state); // remember the state
}
Expand Down Expand Up @@ -101,4 +101,4 @@ void ButtonMatrix<nb_rows, nb_cols>::setPrevState(uint8_t col, uint8_t row, bool
prevStates[bitsToIndex(bits)] &= ~bitsToBitmask(bits);
}

#endif // BUTTONMATRIX_IPP_
#endif // BUTTONMATRIX_IPP_

0 comments on commit 815c869

Please sign in to comment.