Compare commits
No commits in common. "13825855d3baeb456fa9577b224625d0c0e2f3b3" and "63bd0672500631b8c47f24f041693e642ab32533" have entirely different histories.
13825855d3
...
63bd067250
|
@ -16,11 +16,6 @@ for path in "$@"; do
|
||||||
fn=$(basename "$path")
|
fn=$(basename "$path")
|
||||||
echo "=== Upload $VERSION/$fn"
|
echo "=== Upload $VERSION/$fn"
|
||||||
|
|
||||||
curl \
|
|
||||||
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
|
|
||||||
--request DELETE \
|
|
||||||
$BASE/$fn
|
|
||||||
|
|
||||||
curl \
|
curl \
|
||||||
--fail \
|
--fail \
|
||||||
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
|
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
|
||||||
|
|
5
Makefile
5
Makefile
|
@ -15,11 +15,6 @@ firmwares: build/MockBand.drums.hex
|
||||||
build/MockBand.drums.hex: VID=0x1bad
|
build/MockBand.drums.hex: VID=0x1bad
|
||||||
build/MockBand.drums.hex: PID=0x3110
|
build/MockBand.drums.hex: PID=0x3110
|
||||||
|
|
||||||
firmwares: build/MockBand.drums1.hex
|
|
||||||
build/MockBand.drums1.hex: VID=0x1bad
|
|
||||||
build/MockBand.drums1.hex: PID=00005
|
|
||||||
|
|
||||||
|
|
||||||
build/MockBand.%.hex: MockBand.ino
|
build/MockBand.%.hex: MockBand.ino
|
||||||
mkdir -p build/cache
|
mkdir -p build/cache
|
||||||
rm -f build/build.options.json
|
rm -f build/build.options.json
|
||||||
|
|
14
MockBand.ino
14
MockBand.ino
|
@ -142,8 +142,8 @@ void loop() {
|
||||||
}
|
}
|
||||||
#else // DRUMS
|
#else // DRUMS
|
||||||
buttonState.buttons |= (buttons >> 10) & 0b01011; // Cymbals
|
buttonState.buttons |= (buttons >> 10) & 0b01011; // Cymbals
|
||||||
bitWrite(buttonState.buttons, 10, (buttons >> 0) & 0b01111); // Drum pad modifier
|
bitWrite(buttonState.buttons, 10, buttons & (0b01111 << 0)); // Drum pad modifier
|
||||||
bitWrite(buttonState.buttons, 11, (buttons >> 10) & 0b01011); // Cymbals modifier
|
bitWrite(buttonState.buttons, 11, buttons & (0b01011 << 10)); // Cymbals modifier
|
||||||
buttonState.axis[3] = bitRead(buttons, 12)?255:0; // High hat
|
buttonState.axis[3] = bitRead(buttons, 12)?255:0; // High hat
|
||||||
|
|
||||||
// rbdrum2midi wants these set
|
// rbdrum2midi wants these set
|
||||||
|
@ -152,8 +152,14 @@ void loop() {
|
||||||
buttonState.velocity[2] = bitRead(buttonState.buttons, 1)?127:0; // G
|
buttonState.velocity[2] = bitRead(buttonState.buttons, 1)?127:0; // G
|
||||||
buttonState.velocity[3] = bitRead(buttonState.buttons, 0)?127:0; // B
|
buttonState.velocity[3] = bitRead(buttonState.buttons, 0)?127:0; // B
|
||||||
|
|
||||||
// Say the D-pad is centered
|
// Use the cymbals for up and down, since I don't have a D-pad
|
||||||
buttonState.hatAndConstant = 8;
|
if bitRead(buttons, 13) {
|
||||||
|
buttonState.hatAndConstant = 0; // up
|
||||||
|
} else if bitRead(buttons, 10) {
|
||||||
|
buttonState.hatAndConstant = 4; // down
|
||||||
|
} else {
|
||||||
|
buttonState.hatAndConstant = 8; // nothing
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DPAD
|
#ifdef DPAD
|
||||||
|
|
|
@ -70,19 +70,13 @@ Here's what each bit means:
|
||||||
hatAndConstant
|
hatAndConstant
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
The HAT switch reports its position like a clock.
|
Here's what the values mean:
|
||||||
|
|
||||||
7 0 1
|
* 2: right
|
||||||
|
* 6: left
|
||||||
6 8 2
|
* 0: up
|
||||||
|
* 4: down
|
||||||
5 4 3
|
* 8: nothing
|
||||||
|
|
||||||
0 is up,
|
|
||||||
2 is right,
|
|
||||||
4 is down,
|
|
||||||
6 is left,
|
|
||||||
and 8 is centered.
|
|
||||||
|
|
||||||
|
|
||||||
velocity
|
velocity
|
||||||
|
|
Loading…
Reference in New Issue