forked from xiaozhi/xiaozhi-esp32
feat: build default assets instead of downloading and v2 tables for esp-hi, echoear (#1203)
* fix: call flush ready on io ready * eachear: update to v2 partition table but disable class Assets currently * stop gif if previewing an image * feat: build default assets instead of downloading * version updates * fix None error * delay 1s before enter wifi config mode * fix compiling with v1 partition table --------- Co-authored-by: Xiaoxia <terrence.huang@tenclass.com>
This commit is contained in:
@@ -287,20 +287,18 @@ void McpServer::AddUserOnlyTools() {
|
||||
#endif // HAVE_LVGL
|
||||
|
||||
// Assets download url
|
||||
auto assets = Board::GetInstance().GetAssets();
|
||||
if (assets) {
|
||||
if (assets->partition_valid()) {
|
||||
AddUserOnlyTool("self.assets.set_download_url", "Set the download url for the assets",
|
||||
PropertyList({
|
||||
Property("url", kPropertyTypeString)
|
||||
}),
|
||||
[assets](const PropertyList& properties) -> ReturnValue {
|
||||
auto url = properties["url"].value<std::string>();
|
||||
Settings settings("assets", true);
|
||||
settings.SetString("download_url", url);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
auto& assets = Assets::GetInstance();
|
||||
if (assets.partition_valid()) {
|
||||
AddUserOnlyTool("self.assets.set_download_url", "Set the download url for the assets",
|
||||
PropertyList({
|
||||
Property("url", kPropertyTypeString)
|
||||
}),
|
||||
[](const PropertyList& properties) -> ReturnValue {
|
||||
auto url = properties["url"].value<std::string>();
|
||||
Settings settings("assets", true);
|
||||
settings.SetString("download_url", url);
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user