mirror of
https://github.com/esphome/esphome.git
synced 2026-09-24 13:34:07 +00:00
bot nits
This commit is contained in:
@@ -172,7 +172,7 @@ class Logger : public Component {
|
||||
#ifdef USE_ESPHOME_TASK_LOG_BUFFER
|
||||
void init_log_buffer(size_t total_buffer_size);
|
||||
#endif
|
||||
#if defined(USE_ESPHOME_TASK_LOG_BUFFER) || (defined(USE_ZEPHYR) && defined(USE_LOGGER_USB_CDC)) || defined(USE_HOST)
|
||||
#if defined(USE_ESPHOME_TASK_LOG_BUFFER) || (defined(USE_ZEPHYR) && defined(USE_LOGGER_USB_CDC))
|
||||
void loop() override;
|
||||
#endif
|
||||
/// Manually set the baud rate for serial, set to 0 to disable.
|
||||
|
||||
@@ -22,10 +22,14 @@ button:
|
||||
static void *thread_func(void *arg) {
|
||||
int thread_id = *static_cast<int *>(arg);
|
||||
|
||||
// Set thread name (macOS only takes 1 arg)
|
||||
// Set thread name (different signatures on macOS vs Linux)
|
||||
char thread_name[16];
|
||||
snprintf(thread_name, sizeof(thread_name), "LogThread%d", thread_id);
|
||||
#ifdef __APPLE__
|
||||
pthread_setname_np(thread_name);
|
||||
#else
|
||||
pthread_setname_np(pthread_self(), thread_name);
|
||||
#endif
|
||||
|
||||
// Log messages with different log levels
|
||||
for (int i = 0; i < MESSAGES_PER_THREAD; i++) {
|
||||
|
||||
Reference in New Issue
Block a user