diff --git a/ui/hand_acid_mainboard_ui.HMI b/ui/hand_acid_mainboard_ui.HMI index 86aa7e1..d6420f0 100644 Binary files a/ui/hand_acid_mainboard_ui.HMI and b/ui/hand_acid_mainboard_ui.HMI differ diff --git a/usrc/service/page/Page_main.cpp b/usrc/service/page/Page_main.cpp index 24039b0..208ea18 100644 --- a/usrc/service/page/Page_main.cpp +++ b/usrc/service/page/Page_main.cpp @@ -7,6 +7,15 @@ using namespace iflytop; #define ADMIN_MENU_ID pg_menuAdmin2 #define USR_MENU_ID pg_menuUsr +static const char* fmt(const char* fmt, ...) { + static char buf[128]; + va_list args; + va_start(args, fmt); + vsnprintf(buf, sizeof(buf), fmt, args); + va_end(args); + return buf; +} + static CfgItermCache cfgcache; /** * @brief @@ -167,7 +176,7 @@ void Page_main::processAcidevalUpdateEvent(uint8_t bid, const char* text, int ch return; } else if (add_ml > CS->getInt(kcfg_echDitrUpLi)) { UIS->setVal(PAGE, bid, CS->getStr(cfgid, &cfgcache)); // 恢复数值 - UIS->alert("设定值不能大于%d", CS->getInt(kcfg_echDitrUpLi)); + UIS->alert(fmt("设定值不能大于%d", CS->getInt(kcfg_echDitrUpLi))); return; } ZLOGI(TAG, "set acid ch%d:%s", ch, text);