mirror of
https://github.com/esphome/esphome.git
synced 2024-12-27 17:28:01 +01:00
[debug] Add framework type to debug info
This adds the framework type ("Arduino" or "ESP-IDF") to both the log (on dump config) and also to the text sensor on debug. This makes easier to troubleshoot by providing the info about the framework type used.
This commit is contained in:
parent
387bde665e
commit
102a550332
@ -276,6 +276,19 @@ void DebugComponent::get_device_info_(std::string &device_info) {
|
||||
device_info += " Cores:" + to_string(info.cores);
|
||||
device_info += " Revision:" + to_string(info.revision);
|
||||
|
||||
// Framework detection
|
||||
device_info += "|Framework: ";
|
||||
#ifdef USE_ARDUINO
|
||||
ESP_LOGD(TAG, "Framework: Arduino");
|
||||
device_info += "Arduino";
|
||||
#elif defined(USE_ESP_IDF)
|
||||
ESP_LOGD(TAG, "Framework: ESP-IDF");
|
||||
device_info += "ESP-IDF";
|
||||
#else
|
||||
ESP_LOGW(TAG, "Framework: UNKNOWN");
|
||||
device_info += "UNKNOWN";
|
||||
#endif
|
||||
|
||||
ESP_LOGD(TAG, "ESP-IDF Version: %s", esp_get_idf_version());
|
||||
device_info += "|ESP-IDF: ";
|
||||
device_info += esp_get_idf_version();
|
||||
|
Loading…
Reference in New Issue
Block a user