Skip to content

Commit a67e776

Browse files
authored
Fix issues in URLStream when compiling in ESP IDF (#1693)
* 1. Fix incorrect delay implementation causing UrlStream to take 50 seconds to start instead of 50ms 2. Add missing semi colon's 3. Remove duplicate micros declaration * Add missing initializer to get rid of compile warning * remove dodgy fix for warning. Don't have a good solution for now
1 parent 767563b commit a67e776

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/AudioHttp/HttpRequest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ class HttpRequest {
288288
if (isChunked()) {
289289
write(nullptr, 0);
290290
}
291-
LOGI("Request written ... waiting for reply")
291+
LOGI("Request written ... waiting for reply");
292292
// Commented out because this breaks the RP2040 W
293293
// client_ptr->flush();
294294
reply_header.read(*client_ptr);

src/AudioHttp/URLStream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class URLStream : public AbstractURLStream {
231231
TRACED();
232232
uint32_t end = millis() + timeout;
233233
if (request.available() == 0) {
234-
LOGI("Request written ... waiting for reply")
234+
LOGI("Request written ... waiting for reply");
235235
while (request.available() == 0) {
236236
if (millis() > end) break;
237237
// stop waiting if we got an error

src/AudioTools/AudioRuntime.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// delay and millis is needed by this framework
99
#define DESKTOP_MILLIS_DEFINED
1010

11-
inline void delay(uint32_t ms){ vTaskDelay(ms * 1000 / portTICK_PERIOD_MS);}
11+
inline void delay(uint32_t ms){ vTaskDelay(ms / portTICK_PERIOD_MS);}
1212
inline uint32_t millis() {return (xTaskGetTickCount() * portTICK_PERIOD_MS);}
1313
inline void delayMicroseconds(uint32_t ms) {esp_rom_delay_us(ms);}
1414
//inline uint64_t micros() { return xTaskGetTickCount();}
15-
extern uint64_t micros();
15+
// extern uint64_t micros();
1616

1717
#endif
1818

0 commit comments

Comments
 (0)