mirror of
https://github.com/esphome/esphome.git
synced 2026-06-02 02:31:14 +08:00
[logger] fix crash on zephyr (#16330)
This commit is contained in:
@@ -243,6 +243,9 @@ void Logger::dump_config() {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef USE_ZEPHYR
|
#ifdef USE_ZEPHYR
|
||||||
dump_crash_();
|
dump_crash_();
|
||||||
|
if (!device_is_ready(this->uart_dev_)) {
|
||||||
|
ESP_LOGE(TAG, " %s is not ready.", LOG_STR_ARG(get_uart_selection_()));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
// Warn users that VERBOSE/VERY_VERBOSE logging impacts performance.
|
// Warn users that VERBOSE/VERY_VERBOSE logging impacts performance.
|
||||||
// Only the compiled log level matters — all log calls up to this level
|
// Only the compiled log level matters — all log calls up to this level
|
||||||
|
|||||||
@@ -74,9 +74,7 @@ void Logger::pre_setup() {
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (!device_is_ready(uart_dev)) {
|
if (device_is_ready(uart_dev)) {
|
||||||
ESP_LOGE(TAG, "%s is not ready.", LOG_STR_ARG(get_uart_selection_()));
|
|
||||||
} else {
|
|
||||||
this->uart_dev_ = uart_dev;
|
this->uart_dev_ = uart_dev;
|
||||||
#if defined(USE_LOGGER_WAIT_FOR_CDC) && defined(USE_LOGGER_UART_SELECTION_USB_CDC)
|
#if defined(USE_LOGGER_WAIT_FOR_CDC) && defined(USE_LOGGER_UART_SELECTION_USB_CDC)
|
||||||
uint32_t dtr = 0;
|
uint32_t dtr = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user