adafruit / Adafruit_CircuitPlayground

library for Circuit Playground board
171 stars 77 forks source link

Fix speaker enable pin for CPX #43

Closed caternuson closed 5 years ago

caternuson commented 5 years ago

For #42. Simple fix. Just add the pin config line from Adafruit_CPlay_Speaker::begin() to Adafruit_CircuitPlayground::begin().

See #41 for reasoning behind removal of call to speaker.begin().

caternuson commented 5 years ago

Any idea what's going on with Travis?

ladyada commented 5 years ago

i dunno - whats the error?

caternuson commented 5 years ago

Tons of output with lots of warnings. Not sure how much of that can be ignored. The first error is waaaayyyy down the trace: https://travis-ci.com/adafruit/Adafruit_CircuitPlayground/builds/119831663#L1271 and looks suspiciously related to the last commit. https://github.com/adafruit/Adafruit_CircuitPlayground/commit/412d9775aea73af8c1924f0c61a7d532b058a2fd

ladyada commented 5 years ago

did you try compiling the PR with the latest IDE + CPX?

caternuson commented 5 years ago

Yep. Tested. This now makes no noise:

#include <Adafruit_CircuitPlayground.h>

void setup() {
  CircuitPlayground.begin();
  CircuitPlayground.speaker.off();
}

void loop() {
  CircuitPlayground.playTone(500, 100);
  delay(1000);
}
ladyada commented 5 years ago

no compilation error? maybe its using the bult in CPX library? whats travis say

caternuson commented 5 years ago

I got no compile errors.

Does this path from Travis log indicate it's using built in CPX lib?

/home/travis/arduino_ide/libraries/Adafruit_Circuit_Playground/utility/talkie.cpp:15:73: error: narrowing conversion of '33472' from 'int' to 'int16_t {aka short int}' inside { } [-Wnarrowing]
                  0x1440,0x2740,0x38C0,0x47C0,0x5480,0x5EC0,0x6700,0x6D40},

It's basically acting like it's using something that doesn't have that change from int16_t to uint16_t.

ladyada commented 5 years ago

yeah sneaky. please have travis delete that directory!

caternuson commented 5 years ago

Would that be something to add to install script? Like maybe after here: https://github.com/adafruit/travis-ci-arduino/blob/master/install.sh#L66 add:

rm -rf $HOME/arduino_ide/libraries/Adafruit_Circuit_Playground

or just add it to .travis.yml?

ladyada commented 5 years ago

yep just do that right after installing the new library

caternuson commented 5 years ago

There!

ladyada commented 5 years ago

yay

caternuson commented 5 years ago

yay

Want me to version bump/release?

ladyada commented 5 years ago

yep!