重启设备命令尝试3次

hdrplus
Matthew 11 months ago
parent bed0f7ac7b
commit 2e736d81c0

@ -77,7 +77,12 @@ Java_com_xypower_mpmaster_MpMasterService_setInt(JNIEnv* env, jclass cls, jint c
extern "C" JNIEXPORT void JNICALL
Java_com_xypower_mpmaster_MpMasterService_rebootDevice(JNIEnv* env, jclass cls) {
// setInt(CMD_SET_SYSTEM_RESET, 1);
Java_com_xypower_mpmaster_MpMasterService_setInt(env, cls, 202, 1);
for (int idx = 0; idx < 3; idx++) {
if (Java_com_xypower_mpmaster_MpMasterService_setInt(env, cls, 202, 1) == 0) {
break;
}
}
}
extern "C" JNIEXPORT jintArray JNICALL

Loading…
Cancel
Save