led_builtin_255_by_default
This commit is contained in:
@@ -198,6 +198,7 @@ void encoder2Loop() {
|
||||
|
||||
#if IR_PIN!=255
|
||||
void irBlink() {
|
||||
if(LED_BUILTIN==255) return;
|
||||
if (player.mode == STOPPED) {
|
||||
for (byte i = 0; i < 7; i++) {
|
||||
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
|
||||
|
||||
@@ -68,7 +68,7 @@ void Network::begin() {
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
Serial.print(".");
|
||||
delay(500);
|
||||
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
|
||||
if(LED_BUILTIN!=255) digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
|
||||
errcnt++;
|
||||
if (errcnt > 16) {
|
||||
errcnt = 0;
|
||||
@@ -87,7 +87,7 @@ void Network::begin() {
|
||||
}
|
||||
}
|
||||
Serial.println(".");
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
if(LED_BUILTIN!=255) digitalWrite(LED_BUILTIN, LOW);
|
||||
status = CONNECTED;
|
||||
WiFi.setSleep(false);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef options_h
|
||||
#define options_h
|
||||
|
||||
#define VERSION "0.8.131"
|
||||
#define VERSION "0.8.133"
|
||||
|
||||
/*******************************************************
|
||||
DO NOT EDIT THIS FILE.
|
||||
@@ -227,7 +227,7 @@ The connection tables are located here https://github.com/e2002/yoradio#connecti
|
||||
|
||||
/* ESP DEVBOARD */
|
||||
#ifndef LED_BUILTIN
|
||||
#define LED_BUILTIN 2
|
||||
#define LED_BUILTIN 255
|
||||
#endif
|
||||
|
||||
/* Other settings. You can overwrite them in the myoptions.h file */
|
||||
|
||||
@@ -118,7 +118,7 @@ void Player::zeroRequest() {
|
||||
}
|
||||
|
||||
void Player::setOutputPins(bool isPlaying) {
|
||||
digitalWrite(LED_BUILTIN, LED_INVERT?!isPlaying:isPlaying);
|
||||
if(LED_BUILTIN!=255) digitalWrite(LED_BUILTIN, LED_INVERT?!isPlaying:isPlaying);
|
||||
if(MUTE_PIN!=255) digitalWrite(MUTE_PIN, isPlaying?!MUTE_VAL:MUTE_VAL);
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ extern __attribute__((weak)) void yoradio_on_setup();
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
pinMode(LED_BUILTIN, OUTPUT);
|
||||
if(LED_BUILTIN!=255) pinMode(LED_BUILTIN, OUTPUT);
|
||||
if (yoradio_on_setup) yoradio_on_setup();
|
||||
config.init();
|
||||
display.init();
|
||||
|
||||
Reference in New Issue
Block a user