mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-28 13:16:32 +00:00
Add Hosted MCU message at restart
This commit is contained in:
parent
042fe21d9d
commit
c49d794649
@ -987,7 +987,7 @@ void CmndStatus(void)
|
||||
",\"" D_JSON_COREVERSION "\":\"" ARDUINO_CORE_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\","
|
||||
"\"CpuFrequency\":%d,\"Hardware\":\"%s\""
|
||||
#ifdef CONFIG_ESP_WIFI_REMOTE_ENABLED
|
||||
",\"HostedMCU\":{\"Hardware\":\"" CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET"\",\"Version\":\"%s\"}"
|
||||
",\"HostedMCU\":{\"Hardware\":\"%s\",\"Version\":\"%s\"}"
|
||||
#endif // CONFIG_ESP_WIFI_REMOTE_ENABLED
|
||||
"%s}}"),
|
||||
TasmotaGlobal.version, TasmotaGlobal.image_name, GetCodeCores().c_str(), GetBuildDateAndTime().c_str()
|
||||
@ -997,7 +997,7 @@ void CmndStatus(void)
|
||||
, ESP.getSdkVersion(),
|
||||
ESP.getCpuFreqMHz(), GetDeviceHardwareRevision().c_str(),
|
||||
#ifdef CONFIG_ESP_WIFI_REMOTE_ENABLED
|
||||
GetHostedMCUFwVersion().c_str(),
|
||||
GetHostedMCU().c_str(), GetHostedMCUFwVersion().c_str(),
|
||||
#endif // CONFIG_ESP_WIFI_REMOTE_ENABLED
|
||||
GetStatistics().c_str());
|
||||
CmndStatusResponse(2);
|
||||
|
@ -24,6 +24,14 @@
|
||||
#include "esp_hosted_api_types.h"
|
||||
#include "esp_hosted_ota.h"
|
||||
|
||||
String GetHostedMCU(void) {
|
||||
// Function is not yet implemented in Arduino Core so emulate it here
|
||||
if (0 == strcasecmp_P(CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET, PSTR("esp32c6"))) {
|
||||
return String("ESP32-C6");
|
||||
}
|
||||
return String("Unknown");
|
||||
}
|
||||
|
||||
int GetFwVersionNumber(void) {
|
||||
// Function is not yet implemented in Arduino Core so emulate it here
|
||||
return 0x0200000E; // v2.0.14
|
||||
|
@ -1120,6 +1120,11 @@ void PerformEverySecond(void)
|
||||
|
||||
Settings->last_module = Settings->module;
|
||||
|
||||
#ifndef SOC_WIFI_SUPPORTED
|
||||
// Needs to be delayed after Tasmota restart because of HostedMCU reset by Core
|
||||
AddLog(LOG_LEVEL_INFO, PSTR("HDW: %s Hosted MCU v%s"), GetHostedMCU().c_str(), GetHostedMCUFwVersion().c_str());
|
||||
#endif
|
||||
|
||||
#ifdef USE_DEEPSLEEP
|
||||
if (!(DeepSleepEnabled() && !Settings->flag3.bootcount_update)) { // SetOption76 - (Deepsleep) Enable incrementing bootcount (1) when deepsleep is enabled
|
||||
#endif
|
||||
|
@ -2984,7 +2984,7 @@ void HandleInformation(void) {
|
||||
}
|
||||
WSContentSeparatorIFat();
|
||||
#ifdef CONFIG_ESP_WIFI_REMOTE_ENABLED
|
||||
WSContentSend_P(PSTR("}1 Hosted MCU }2 " CONFIG_ESP_HOSTED_IDF_SLAVE_TARGET ""));
|
||||
WSContentSend_P(PSTR("}1 Hosted MCU }2%s"), GetHostedMCU().c_str());
|
||||
WSContentSend_P(PSTR("}1 Hosted Remote Fw }2%s"), GetHostedMCUFwVersion().c_str());
|
||||
WSContentSeparatorIFat();
|
||||
#endif // CONFIG_ESP_WIFI_REMOTE_ENABLED
|
||||
|
Loading…
x
Reference in New Issue
Block a user