#include "MusicPlayerModel.h"
#include "goal_notification.h"
+// #include "AlarmClockModel.h"
//#include "AlarmClockModel.h"
#ifdef __cplusplus
#include "alipay_feature.h"
#include "transmitting.h"
+void set_ota_upgrade(void)
+{
+ OHOS::ConfigModel *p_ConfigModel = OHOS::ConfigModel::GetInstance();
+ p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_OTA_UPGRADE,1);
+}
+
+// void test_paly(uint8_t falg)
+// {
+// if(falg)
+// {
+// AlarmClockModel::GetInstance()->testPlayerStart("/music/ring/ring.mp3");
+// }
+// else
+// {
+// AlarmClockModel::GetInstance()->AlarmPlayerStop();
+// }
+
+// }
bool get_training_spead_path(char *path ,uint32_t time,uint32_t max_len)
{
std::string str= OHOS::TraingModel::GetInstance()->GetPaceTablePath(time);
else
p_ConfigModel->set_condigData_Int(OHOS::ConfigModel::CONFIGMODEL_ITEM_24HOUR,12);
+
+
SendMsgToUIService(UI_UPDATE_GOAL, 0, nullptr, 0);
}
void set_goal_step_notification(uint8_t data);
+void set_ota_upgrade(void);
+
#ifdef __cplusplus
#if __cplusplus
}
static UILabelButtonExt *buttonok_ = nullptr;
static UIImageAnimatorView *imageAnimator{nullptr};
static const ImageInfo **winimageInfos;
- static ImageAnimatorInfo winimageAnimatorInfo[94]{0};
+ static ImageAnimatorInfo *winimageAnimatorInfo{nullptr};
static std::string winbasePath = "/user/res/Training/training_GIF/win/";
void Freegoalview(void)
FreeImageInfoArray(winimageInfos, winbasePath.c_str(), 94);
delete imageAnimator;
imageAnimator = nullptr;
+
+ delete [] winimageAnimatorInfo;
+ winimageAnimatorInfo = nullptr;
}
if(labelgettag)
{
// 初始化图片数组以及动画
winimageInfos = CreateImageInfoArray(winbasePath.c_str(), 94);
+ winimageAnimatorInfo = new ImageAnimatorInfo[94];
InitImageAnimatorSource(imageAnimator, winimageAnimatorInfo, winimageInfos,
94, 173, 100, 120, 120, "imageAnimator1", 10);
imageAnimator->Start();
#include "custom_runtime.h"
#include "PhoneService.h"
#include "ConfigModelC.h"
+#include "ConfigModel.h"
namespace OHOS
{
static UIImageView *imageCharge = nullptr;
{
sprintf_s(updata_fail_str,32,"%d_%d",(int)upg_result,last_image_index);
TRANSMIT_DATA=OTA_UPDATA_FAIL;
- CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1);
+ if(ConfigModel::GetInstance()->get_configData_int(ConfigModel::CONFIGMODEL_ITEM_OTA_UPGRADE))
+ {
+ CustomEventPublish(TOPIC_EVENT_BLE_TRANSMIT,&TRANSMIT_DATA,1);
+ ConfigModel::GetInstance()->set_condigData_Int(ConfigModel::CONFIGMODEL_ITEM_OTA_UPGRADE,0);
+ }
}
}
CONFIGMODEL_ITEM_BLE_IOS_OR_ANDROID,//绑定设备为安卓或者ios 0:安卓 1:苹果
CONFIGMODEL_ITEM_BR_PAIR,//br第一次绑定
+ CONFIGMODEL_ITEM_OTA_UPGRADE,//ota升级过
+
// flashlight
CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_INDEX, // color index
CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_VALUE, // color value
{ConfigDataType::DATATYPE_STRING, "applist_style", "list" }, //CONFIGMODEL_ITEM_APPLIST_STYLE
{ConfigDataType::DATATYPE_INT, "android_or_ios", "0" },//CONFIGMODEL_ITEM_BLE_IOS_OR_ANDROID
{ConfigDataType::DATATYPE_INT, "br_pari" , "0"},
+ {ConfigDataType::DATATYPE_INT, "ota_upgrade" , "0"},// CONFIGMODEL_ITEM_OTA_UPGRADE
{ConfigDataType::DATATYPE_INT, "color_index", "0" }, // CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_INDEX, // color index
{ConfigDataType::DATATYPE_INT, "color_value", "0" }, // CONFIGMODEL_ITEM_FLASHLIGHT_COLOR_VALUE, // color value
{ConfigDataType::DATATYPE_INT, "flashing_level", "0" }, // CONFIGMODEL_ITEM_FLASHLIGHT_FLASHING_LEVEL, // flashing level
}
break;
case CUSTOM_CMD_MSG_TYPE_STARTOTA:
+ set_ota_upgrade();
uaip_cmd_update_request();
break;
case CUSTOM_CMD_MSG_TYPE_LCD_TEST: