Explorar o código

#IQRV #comment 优化高拍仪日志

80374374 hai 4 meses
pai
achega
48ff5c4434
Modificáronse 1 ficheiros con 31 adicións e 21 borrados
  1. 31 21
      Module/mod_HSPScanner/HSPScannerFSM.cpp

+ 31 - 21
Module/mod_HSPScanner/HSPScannerFSM.cpp

@@ -35,38 +35,49 @@ const char* EvtTypeToString(int nEvtType)
 	{
 		T_STRINGY(USER_EVT_STARTPREVIEW)
 			T_STRINGY(USER_EVT_STARTPREVIEW_FINISHED)
+			T_STRINGY(USER_EVT_SETPROPERTYINVIEW_FINISHED)
+
+			T_STRINGY(USER_EVT_STARTPREVIEW_JS)
+			T_STRINGY(USER_EVT_STARTPREVIEW_JS_DONE)
+
+			T_STRINGY(USER_EVT_CANCELPREVIEW_JS)
+			T_STRINGY(USER_EVT_CANCELPREVIEW_JS_DONE)
+
+			T_STRINGY(USER_EVT_SCANIMAGE_JS)
+			T_STRINGY(USER_EVT_SCANIMAGE_JS_DONE)
+
+			T_STRINGY(USER_EVT_SETPARAM_JS)
+
 			T_STRINGY(USER_EVT_STOPPREVIEW)
+			T_STRINGY(USER_EVT_HIDEPREVIEW)
 			T_STRINGY(USER_EVT_STOPPREVIEW_FINISHED)
+
 			T_STRINGY(USER_EVT_SETWINPOS)
 			T_STRINGY(USER_EVT_SETWINPOSFINISHED)
-			T_STRINGY(USER_EVT_SCANIMAGE)
-			T_STRINGY(USER_EVT_SCANIMAGE_EX)
-			T_STRINGY(USER_EVT_SCANIMAGEFINISHED)
+
+			T_STRINGY(USER_EVT_SHOWPROPERTY)
+			T_STRINGY(USER_EVT_SHOWPROPERTY_FINISHED)
+
 			T_STRINGY(USER_EVT_SETPROPERTY)
 			T_STRINGY(USER_EVT_SETPROPERTY_FINISHED)
+
 			T_STRINGY(USER_EVT_GETSTATUS)
 			T_STRINGY(USER_EVT_GETINFO)
+
 			T_STRINGY(USER_EVT_DISCONNECT)
-			T_STRINGY(USER_EVT_EXIT)
-			T_STRINGY(USER_EVT_QUIT)
 			T_STRINGY(USER_EVT_RESET)
+			T_STRINGY(USER_EVT_EXIT)
 			T_STRINGY(USER_EVT_EXIT_FINISHED)
-			T_STRINGY(USER_EVT_SHOWPROPERTY)
-			T_STRINGY(USER_EVT_SHOWPROPERTY_FINISHED)
-			T_STRINGY(EVT_TIMER)
-			T_STRINGY(USER_EVT_SETPROPERTYINVIEW_FINISHED)
-			T_STRINGY(USER_EVT_HIDEPREVIEW)
+
 			T_STRINGY(USER_EVT_GOTOHELL)
-			T_STRINGY(USER_EVT_STARTPREVIEW_JS)
-			T_STRINGY(USER_EVT_STARTPREVIEW_JS_DONE)
-			T_STRINGY(USER_EVT_CANCELPREVIEW_JS)
-			T_STRINGY(USER_EVT_CANCELPREVIEW_JS_DONE)
-			T_STRINGY(USER_EVT_SCANIMAGE_JS)
-			T_STRINGY(USER_EVT_SCANIMAGE_JS_DONE)
-			T_STRINGY(USER_EVT_SETPARAM_JS)
-			T_STRINGY(EVT_MAINPAGE_DISPLAY)
+			T_STRINGY(USER_EVT_QUIT)
 			T_STRINGY(USER_EVT_INIT)
 			T_STRINGY(USER_EVT_INIT_FINISHED)
+
+			T_STRINGY(EVT_INTERNAL)
+			T_STRINGY(EVT_TIMER)
+			T_STRINGY(EVT_MAINPAGE_DISPLAY)
+			T_STRINGY(EVT_USER)
 	default:
 		return "Unknown EventType";
 		break;
@@ -351,7 +362,7 @@ unsigned int CHSPScannerFSM::s0_Idle_on_event(FSMEvent* e)
 		break;
 	default:
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("%s::UnHandle event ! %d", __FUNCTION__, e->iEvt);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("%s::UnHandle event ! %s", __FUNCTION__, EvtTypeToString(e->iEvt));
 		}
 		break;
 	}
@@ -1342,9 +1353,8 @@ unsigned int CHSPScannerFSM::s7_Exit_on_event(FSMEvent* e)
 		break;
 	default:
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("%s::UnHandle event ! %d", __FUNCTION__, e->iEvt);
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("%s::UnHandle event ! %s", __FUNCTION__, EvtTypeToString(e->iEvt));
 			break;
-
 		}
 	}
 	return uRet;