diff --git a/mpmaster/src/main/cpp/mpmaster.cpp b/mpmaster/src/main/cpp/mpmaster.cpp index 7b9c71d8..e4cb8591 100644 --- a/mpmaster/src/main/cpp/mpmaster.cpp +++ b/mpmaster/src/main/cpp/mpmaster.cpp @@ -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