diff --git a/.gitea/build.sh b/.gitea/build.sh index 508a252..b5a4e8d 100755 --- a/.gitea/build.sh +++ b/.gitea/build.sh @@ -16,9 +16,6 @@ while read variant vid pid flags; do log Building $vid $pid $product log - rm -rf build/ - mkdir -p build/cache/ - # We can overload build.extra_flags from boards.txt, # so just specify the -D flags to gcc flags="$flags -DUSB_VID=$vid -DUSB_PID=$pid" @@ -26,6 +23,10 @@ while read variant vid pid flags; do flags="$flags \"-DUSB_PRODUCT=\"Mockband $variant\"\"" # wtf quoting flags="$flags -DCDC_DISABLED" + # Arduino gets cranky when it tries to use its own cache + rm -rf build/ + mkdir -p build/cache/ + arduino-builder \ -build-path $(pwd)/build/ \ -build-cache $(pwd)/build/cache/ \ @@ -36,7 +37,6 @@ while read variant vid pid flags; do -compile MockBand.ino mv build/MockBand.ino.hex out/MockBand.$variant.hex - find out build/cache done << EOD guitar 0x1bad 0x0004 guitar-wammy 0x1bad 0x0004 -DWAMMY diff --git a/MockBand.ino b/MockBand.ino index 9860fef..31f1b28 100644 --- a/MockBand.ino +++ b/MockBand.ino @@ -96,9 +96,6 @@ void loop() { uint16_t silence[npins] = {0}; while (1) { -#ifdef WAMMY - unsigned long now = millis(); -#endif uint16_t edge = 0; samples++; @@ -115,6 +112,7 @@ void loop() { // We've sampled everything. Is it time to do calculations and USB? #ifdef WAMMY + unsigned long now = millis(); if (!edge && (next > now)) { continue; }