diff --git a/partitions-4m-factory.csv b/partitions-4m-factory.csv index 0c867ea..91ac885 100644 --- a/partitions-4m-factory.csv +++ b/partitions-4m-factory.csv @@ -1,4 +1,5 @@ # Name, Type, SubType, Offset, Size, Flags -nvs, data, nvs, 0x9000, 0x6000, -phy_init, data, phy, 0xf000, 0x1000, -factory, app, factory, 0x10000, 4M \ No newline at end of file +nvs, data, nvs, 0x9000, 0x5000, +otadata, data, ota, 0xE000, 0x2000, +app0, app, factory, 0x10000, 0x3E0000, +coredump, data, coredump,0x3F0000,0x10000, \ No newline at end of file diff --git a/platformio.ini b/platformio.ini index 86936a8..6e4eca8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -2,10 +2,15 @@ platform = espressif32 board = esp32dev framework = arduino +upload_port = /dev/ttyUSB0 +upload_speed = 921600 +monitor_port = /dev/ttyUSB0 +monitor_speed = 115200 board_build.partitions = partitions-4m-factory.csv lib_deps = https://github.com/pschatzmann/arduino-snapclient https://github.com/pschatzmann/arduino-audio-tools https://github.com/pschatzmann/arduino-audio-driver https://github.com/pschatzmann/arduino-libopus https://github.com/bblanchon/ArduinoJson - https://github.com/pschatzmann/arduino-libhelix \ No newline at end of file + https://github.com/pschatzmann/arduino-libhelix + https://github.com/me-no-dev/ESPAsyncWebServer \ No newline at end of file diff --git a/src/audio.cpp b/src/audio.cpp index e7729ca..d5e9646 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -42,7 +42,7 @@ void audioStop() { opusDecoder.end(); icy.end(); file.close(); - snap.end(); + // snap.end(); // TODO } bool audioPlayInit(const Entry &entry) { diff --git a/src/playlist.cpp b/src/playlist.cpp index 64ad7a6..b0bf880 100644 --- a/src/playlist.cpp +++ b/src/playlist.cpp @@ -7,7 +7,7 @@ bool playlistRepeatOne = false; -bool playlistRepeatAll = false; +bool playlistRepeatAll = true; bool playlistRandom = false; diff --git a/src/wifi.cpp b/src/wifi.cpp index cbbb7cc..40f87ac 100644 --- a/src/wifi.cpp +++ b/src/wifi.cpp @@ -19,12 +19,16 @@ void wifiLoop() { wifiLastMillis = 0; Serial.printf("WIFI connected: %s\n", WiFi.localIP().toString().c_str()); } else if (wifiLastMillis == 0 || millis() - wifiLastMillis > 10000) { + WiFi.disconnect(); + yield(); if (wifiLastMillis != 0) { Serial.printf("WIFI connect timeout!\n"); } wifiLastMillis = max(1UL, millis()); - Serial.printf("WIFI connecting: %s\n", WiFi.SSID().c_str()); - WiFi.begin("HappyNet", "1Grausame!Sackratte7"); + const auto ssid = "HappyNet"; + Serial.printf("WIFI connecting: %s\n", ssid); + WiFi.begin(ssid, "1Grausame!Sackratte7"); + yield(); } else { // connecting }