61 |
break; |
break; |
62 |
} |
} |
63 |
Sleep(10); |
Sleep(10); |
64 |
parent->UpdateClient(); |
parent->UpdateClient(this); |
65 |
} |
} |
66 |
catch (std::exception e) |
catch (std::exception e) |
67 |
{ |
{ |
83 |
const int timer = 10; |
const int timer = 10; |
84 |
|
|
85 |
Sleep(timer); |
Sleep(timer); |
86 |
Tmp = parent->H7Serial.readTarget(0); |
mLed3 = parent->H7Serial.readTarget(0); |
87 |
if( Tmp == 0 ) |
if( mLed3 == 0 ) |
88 |
output = "110|"; |
output = "110|"; |
89 |
else if( Tmp == 1) |
else if( mLed3 == 1) |
90 |
output = "111|"; |
output = "111|"; |
91 |
Send(output,output.GetLength(),0); |
Send(output,output.GetLength(),0); |
92 |
|
|
93 |
Sleep(timer); |
Sleep(timer); |
94 |
|
|
95 |
Tmp = parent->H7Serial.readTarget(1); |
mLed4 = parent->H7Serial.readTarget(1); |
96 |
if( Tmp == 0 ) |
if( mLed4 == 0 ) |
97 |
output = "120|"; |
output = "120|"; |
98 |
else if( Tmp == 1) |
else if( mLed4 == 1) |
99 |
output = "121|"; |
output = "121|"; |
100 |
Send(output,output.GetLength(),0); |
Send(output,output.GetLength(),0); |
101 |
|
|
102 |
Sleep(timer); |
Sleep(timer); |
103 |
|
|
104 |
Tmp = parent->H7Serial.readTarget(2); |
mLed5 = parent->H7Serial.readTarget(2); |
105 |
if( Tmp == 0 ) |
if( mLed5 == 0 ) |
106 |
output = "130|"; |
output = "130|"; |
107 |
else if( Tmp == 1) |
else if( mLed5 == 1) |
108 |
output = "131|"; |
output = "131|"; |
109 |
Send(output,output.GetLength(),0); |
Send(output,output.GetLength(),0); |
110 |
Sleep(timer); |
Sleep(timer); |
111 |
|
|
112 |
Tmp = parent->H7Serial.readTarget(3); |
mSw2 = parent->H7Serial.readTarget(3); |
113 |
if( Tmp == 0 ) |
if( mSw2 == 0 ) |
114 |
output = "140|"; |
output = "140|"; |
115 |
else if( Tmp == 1 ) |
else if( mSw2 == 1 ) |
116 |
output = "141|"; |
output = "141|"; |
117 |
Send(output,output.GetLength(),0); |
Send(output,output.GetLength(),0); |
118 |
Sleep(timer); |
Sleep(timer); |
119 |
|
|
120 |
Tmp = parent->H7Serial.readTarget(4); |
mSw3 = parent->H7Serial.readTarget(4); |
121 |
if( Tmp == 0 ) |
if( mSw3 == 0 ) |
122 |
output = "150|"; |
output = "150|"; |
123 |
else if( Tmp == 1 ) |
else if( mSw3 == 1 ) |
124 |
output = "151|"; |
output = "151|"; |
125 |
Send(output,output.GetLength(),0); |
Send(output,output.GetLength(),0); |
126 |
Sleep(timer); |
Sleep(timer); |
127 |
|
|
128 |
Tmp = parent->H7Serial.readTarget(5); |
mPot = parent->H7Serial.readTarget(5); |
129 |
Tmp += 2000; |
format.Format("%d|",mPot + 2000); |
|
format.Format("%d|",Tmp); |
|
130 |
Send(format,format.GetLength(),0); |
Send(format,format.GetLength(),0); |
131 |
Sleep(timer); |
Sleep(timer); |
132 |
|
|
133 |
Tmp = parent->H7Serial.readTarget(6); |
mTemp = parent->H7Serial.readTarget(6); |
134 |
Tmp += 4000; |
format.Format("%d|",mTemp + 4000); |
|
format.Format("%d|",Tmp); |
|
135 |
Send(format,format.GetLength(),0); |
Send(format,format.GetLength(),0); |
136 |
Sleep(timer); |
Sleep(timer); |
137 |
} |
} |