build and code cleanup
Mockband / build (push) Successful in 25s Details

This commit is contained in:
Neale Pickett 2024-01-04 22:59:14 -07:00
parent 855ad3ba60
commit 5fa607d6b0
2 changed files with 5 additions and 7 deletions

View File

@ -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

View File

@ -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;
}