void RebootPresenter::OnStop(void) {}
+extern "C" {
+ uint32_t mcu_os_sys_reset(uint8_t *para, uint32_t para_len);
+ void uapi_sys_shipmode(uint32_t arg);
+}
bool RebootPresenter::OnClick(UIView& view, const ClickEvent& event)
{
UNUSED(event);
} else if (strcmp(view.GetViewId(), REBOOTDEVICE_BUTTON) == 0) {
// 重启
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "REBOOTDEVICE_BUTTON OnClick");
- //GetPMSDefaultInterface()->RebootDevice(NULL, NULL);
+ mcu_os_sys_reset(NULL,NULL);
+
} else if (strcmp(view.GetViewId(), SHUTDOWNDEVICE_BUTTON) == 0) {
// 关机
WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SHUTDOWNDEVICE_BUTTON OnClick");
- //GetPMSDefaultInterface()->ShutDownDevice(NULL, NULL);
+ // GetPMSDefaultInterface()->ShutDownDevice(NULL, NULL);
+ uapi_sys_shipmode(0);
+
}
return true;
}