|
@@ -608,8 +608,7 @@ static bool onButtonClick_FunctionButton(ZKButton *pButton) {
|
|
|
else if (_functionText == "绿色") {
|
|
|
StoragePreferences::putInt(STORE_THEME, 3);
|
|
|
}
|
|
|
- sync();
|
|
|
- reboot(RB_AUTOBOOT);
|
|
|
+ deviceReboot();
|
|
|
}
|
|
|
else if (_functionWindows == "mode") {
|
|
|
if (_functionText == "模式1") {
|
|
@@ -618,8 +617,7 @@ static bool onButtonClick_FunctionButton(ZKButton *pButton) {
|
|
|
else if (_functionText == "模式2") {
|
|
|
StoragePreferences::putInt(STORE_MODE, 2);
|
|
|
}
|
|
|
- sync();
|
|
|
- reboot(RB_AUTOBOOT);
|
|
|
+ deviceReboot();
|
|
|
|
|
|
}
|
|
|
|
|
@@ -757,14 +755,10 @@ static bool onButtonClick_ServerConfirmButton(ZKButton *pButton) {
|
|
|
|
|
|
StoragePreferences::putString(STORE_GATEWAY, mServerIpEditTextPtr->getText().c_str());
|
|
|
StoragePreferences::putInt(STORE_HTTP_PORT, std::atoi(mServerPortEditTextPtr->getText().c_str()));
|
|
|
+ StoragePreferences::putString(STORE_TCP_LOCAL_IP, mServerIpEditTextPtr->getText().c_str());
|
|
|
+ StoragePreferences::putInt(STORE_TCP_PORT, std::atoi(mServerPortEditTextPtr->getText().c_str()));
|
|
|
|
|
|
- const char* req = "-1";
|
|
|
- TcpClient::instance()->sendMsg(req);
|
|
|
-
|
|
|
- lightControl("CALLLED", "000F");
|
|
|
- //重启
|
|
|
- sync();
|
|
|
- reboot(RB_AUTOBOOT);
|
|
|
+ deviceReboot();
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -777,13 +771,7 @@ static bool onButtonClick_ServerCancelButton(ZKButton *pButton) {
|
|
|
}
|
|
|
static bool onButtonClick_RebootDeviceButton(ZKButton *pButton) {
|
|
|
LOGD(" ButtonClick RebootDeviceButton !!!\n");
|
|
|
- const char* req = "-1";
|
|
|
- TcpClient::instance()->sendMsg(req);
|
|
|
-
|
|
|
- lightControl("CALLLED", "000F");
|
|
|
- //重启
|
|
|
- sync();
|
|
|
- reboot(RB_AUTOBOOT);
|
|
|
+ deviceReboot();
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -798,7 +786,7 @@ static bool onButtonClick_RebootLineButton(ZKButton *pButton) {
|
|
|
tcpModel.type = TcpType::DEVICE;
|
|
|
tcpModel.action = DeviceAction::POWER_RESET;
|
|
|
tcpModel.from_id = StoragePreferences::getInt(STORE_DEVICE_ID,0);
|
|
|
- tcpModel.to_id = NULL;
|
|
|
+ tcpModel.to_id = 0;
|
|
|
|
|
|
std::string req = getTcpModelString(tcpModel);
|
|
|
LOGD("TCP DEVICE : %s",req.c_str());
|
|
@@ -806,3 +794,8 @@ static bool onButtonClick_RebootLineButton(ZKButton *pButton) {
|
|
|
TcpClient::instance()->sendMsg(req.c_str());
|
|
|
return false;
|
|
|
}
|
|
|
+static bool onButtonClick_FunctionBackButton(ZKButton *pButton) {
|
|
|
+ LOGD(" ButtonClick FunctionBackButton !!!\n");
|
|
|
+ EASYUICONTEXT->closeActivity("functionActivity");
|
|
|
+ return false;
|
|
|
+}
|