#include <cwm_lib.h>
#include <cwm_lib_dml.h>
#include "cywee_hal.h"
+#include "power_display_service.h"
#define AP_ENABLE_DML_SDO_LISTEN
break;
case IDX_ALGO_WATCH_HANDUP:
CWM_OS_dbgPrintf("HANDUP_DOWN MSG [%d]\n",(int)sensorEVT->fData[1]);
-
+ #if defined(SUPPORT_POWER_MANAGER)
+ const power_display_svr_api_t *display_api = power_display_svr_get_api();
+ #endif
+ if ((int)sensorEVT->fData[1] == 2)
+ {
+ #if defined(SUPPORT_POWER_MANAGER)
+ display_api->set_screen_set_keepon_timeout(0);
+ CWM_OS_dbgPrintf("[cwyee] turn_off_screen");
+ #endif
+ }else if ((int)sensorEVT->fData[1] == 1)
+ {
+ #if defined(SUPPORT_POWER_MANAGER)
+ if (display_api->get_screen_state() != SCREEN_ON) {
+ CWM_OS_dbgPrintf("[cwyee] turn_on_screen");
+ display_api->turn_on_screen();
+ }
+ display_api->set_screen_set_keepon_timeout(5000);
+ #endif
+ }
break;
case IDX_ALGO_SLEEP:
CWM_OS_dbgPrintf("IDX_ALGO_SLEEP\n");