|
@@ -47,20 +47,22 @@ int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
|
|
|
OpenXML("D:\\SAT\\resource\\RCU\\TW\\demo.xml");
|
|
|
std::string data = GetSignalsName();
|
|
|
|
|
|
- int time = 1500;
|
|
|
- SendKey("setting");
|
|
|
+ int time = 200;
|
|
|
+ //SendKey("POWER");
|
|
|
+ //Sleep(time);
|
|
|
+ SendKey("SETTING");
|
|
|
Sleep(time);
|
|
|
- SendKey("ok");
|
|
|
+ SendKey("OK");
|
|
|
Sleep(time);
|
|
|
- SendKey("down");
|
|
|
+ SendKey("DOWN");
|
|
|
Sleep(time);
|
|
|
- SendKey("down");
|
|
|
+ SendKey("DOWN");
|
|
|
Sleep(time);
|
|
|
- SendKey("up");
|
|
|
+ SendKey("UP");
|
|
|
Sleep(time);
|
|
|
- SendKey("left");
|
|
|
+ SendKey("LEFT");
|
|
|
Sleep(time);
|
|
|
- SendKey("right");
|
|
|
+ SendKey("RIGHT");
|
|
|
Sleep(time);
|
|
|
|
|
|
CloseDevice();
|
|
@@ -347,7 +349,7 @@ TESTWIZARD_API int Save2XML(LPCTSTR lpXMLPath)
|
|
|
// 打开串口;
|
|
|
TESTWIZARD_API BOOL OpenDevice(int nPort, DWORD dwBaudrate, BYTE ByteSize, BYTE Parity, BYTE StopBits)
|
|
|
{
|
|
|
-#if 0
|
|
|
+#if 1
|
|
|
// 关闭打开的;
|
|
|
if ( g_synSerial.IsOpen() )
|
|
|
g_synSerial.CloseSerialPort();
|
|
@@ -368,7 +370,7 @@ TESTWIZARD_API BOOL OpenDevice(int nPort, DWORD dwBaudrate, BYTE ByteSize, BYTE
|
|
|
// 关闭串口;
|
|
|
TESTWIZARD_API void CloseDevice()
|
|
|
{
|
|
|
-#if 0
|
|
|
+#if 1
|
|
|
if ( g_synSerial.IsOpen() )
|
|
|
g_synSerial.CloseSerialPort();
|
|
|
#else
|
|
@@ -379,7 +381,7 @@ TESTWIZARD_API void CloseDevice()
|
|
|
|
|
|
TESTWIZARD_API bool SendKey(LPCTSTR lpKeyName)
|
|
|
{
|
|
|
-#if 0
|
|
|
+#if 1
|
|
|
if ( !g_synSerial.IsOpen() )
|
|
|
return false;
|
|
|
|