/* 注册表盘map */
void SetDialModel::RegisterDial(uint16_t ID, const char *dialname)
{
+ if(ID==0 || strlen(dialname)==0)
+ return;
registeredDials[ID] = std::string(dialname); // 唯一性
- WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RegisterDial %s is ok!", dialname);
-
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "RegisterDial %d %s is ok!",ID, dialname);
+
LoadAllDial();
saveDialfile();
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "UninstallDial the dial %d is ok", ID);
registeredDials.erase(ID);
+ LoadAllDial();
+
return true;
}