Skip to content

Commit

Permalink
fix for compile error: 'ets_printf' was not declared in this scope
Browse files Browse the repository at this point in the history
  • Loading branch information
softhack007 authored Jun 13, 2024
1 parent 6d2540d commit 05d9257
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/AsyncEventSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,12 @@ void AsyncEventSourceClient::_queueMessage(AsyncEventSourceMessage *dataMessage)
return;
}
if(_messageQueue.length() >= SSE_MAX_QUEUED_MESSAGES){
#if defined(ESP_IDF_VERSION) && ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
log_e("ERROR: Too many messages queued\n");
#else
ets_printf("ERROR: Too many messages queued\n");
delete dataMessage;
#endif
delete dataMessage;
} else {
_messageQueue.add(dataMessage);
}
Expand Down

1 comment on commit 05d9257

@softhack007
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related:

Could also be solved by

#ifdef ARDUINO_ARCH_ESP32
#include "rom/ets_sys.h"
#endif

Please sign in to comment.