Ver código fonte

PLL DL1/DL2 잘못된 enum 선언 수정 / ATTEN GUI 에서 계산 후 지그로 넘기도록 수정 / UI에서 입력한 값 받은후 Uart로 넘길 수 있도록 변수에 값 PUSH

TX RX Uart 이미지 추가  TDD 이미지 visible -> true false 추가
YJ 6 anos atrás
pai
commit
e9b838186c

+ 151 - 41
Basic_Terminal/Func/Bluecell_BootProtocol.cs

@@ -64,15 +64,15 @@ namespace RF_TRIO_PLL_ZIG
64 64
         ATT_3_5G_COM2,
65 65
         ATT_3_5G_COM3,
66 66
 
67
-        PLL_1_8G_DL1_H,
68
-        PLL_1_8G_DL1_L,
69
-        PLL_1_8G_DL2_H,
70
-        PLL_1_8G_DL2_L,
67
+        PLL_1_8G_DL_H,
68
+        PLL_1_8G_DL_L,
69
+        PLL_1_8G_UL_H,
70
+        PLL_1_8G_UL_L,
71 71
 
72
-        PLL_2_1G_DL1_H,
73
-        PLL_2_1G_DL1_L,
74
-        PLL_2_1G_DL2_H,
75
-        PLL_2_1G_DL2_L,
72
+        PLL_2_1G_DL_H,
73
+        PLL_2_1G_DL_L,
74
+        PLL_2_1G_UL_H,
75
+        PLL_2_1G_UL_L,
76 76
 
77 77
         PLL_3_5G_DL_H,
78 78
         PLL_3_5G_DL_L,
@@ -121,6 +121,10 @@ namespace RF_TRIO_PLL_ZIG
121 121
         PATH_EN_3_5G_UL,
122 122
         PLL_ON_OFF_3_5G_H,
123 123
         PLL_ON_OFF_3_5G_L,
124
+        T_SYNC_DL,
125
+        _T_SYNC_DL,
126
+        T_SYNC_UL,
127
+        _T_SYNC_UL,
124 128
     };
125 129
     class Bluecell_BootProtocol
126 130
     {
@@ -156,14 +160,100 @@ namespace RF_TRIO_PLL_ZIG
156 160
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + 1]     = BLUECELL_TAILER;
157 161
             this.serial.Serial_DataSend(temp_buf, temp_buf.Length);
158 162
         }
159
-        const byte BLUECELL_DATA_SET_LENGTH = 76;
163
+        private byte Bluecell_BDA4601_Calc(double data)
164
+        {
165
+            byte ret = 0;
166
+            
167
+            if (data == 31.5)
168
+                ret = 0x3F;
169
+
170
+            if (data >= 16) {
171
+                ret |= 0x01;
172
+                data -= 16;
173
+            }
174
+            if (data >= 8)
175
+            {
176
+                ret |= 0x02;
177
+                data -= 8;
178
+            }
179
+            if (data >= 4)
180
+            {
181
+                ret |= 0x04;
182
+                data -= 4;
183
+
184
+            }
185
+            if (data >= 2)
186
+            {
187
+                ret |= 0x08;
188
+                data -= 2;
189
+            }
190
+            if (data >= 1)
191
+            {
192
+                ret |= 0x10;
193
+                data -= 1;
194
+            }
195
+            if (data >= 0.5)
196
+            {
197
+                ret |= 0x20;
198
+                data -= 0.5;
199
+            }
200
+            return ret;
201
+
202
+        }
203
+        private byte Bluecell_PE43711_Calc(double data)
204
+        {
205
+            byte ret = 0;
206
+
207
+            if (data == 31.75)
208
+                ret = 0x7F;
209
+
210
+            if (data >= 16)
211
+            {
212
+                ret |= 0x40;
213
+                data -= 16;
214
+            }
215
+            if (data >= 8)
216
+            {
217
+                ret |= 0x20;
218
+                data -= 8;
219
+            }
220
+            if (data >= 4)
221
+            {
222
+                ret |= 0x10;
223
+                data -= 4;
224
+
225
+            }
226
+            if (data >= 2)
227
+            {
228
+                ret |= 0x08;
229
+                data -= 2;
230
+            }
231
+            if (data >= 1)
232
+            {
233
+                ret |= 0x04;
234
+                data -= 1;
235
+            }
236
+            if (data >= 0.5)
237
+            {
238
+                ret |= 0x02;
239
+                data -= 0.5;
240
+            }
241
+            if (data >= 0.25)
242
+            {
243
+                ret |= 0x01;
244
+                data -= 0.25;
245
+            }
246
+            return ret;
247
+
248
+        }
249
+        const byte BLUECELL_DATA_SET_LENGTH = 80;
160 250
         Main_Form main_Form;
161 251
         public void Bluecell_BtnSet(object serial, object main_form)
162 252
         {
163 253
             this.main_Form = (Main_Form)main_form;
164 254
             this.serial = (Serial)serial;
165 255
             byte[] temp_buf = new byte[BLUECELL_DATA_SET_LENGTH];
166
-
256
+            UInt32 temp_val = 0;
167 257
 
168 258
             /* * * * * * FIX DATA * * * * * */
169 259
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Header] = BLUECELL_HEADER;
@@ -174,35 +264,49 @@ namespace RF_TRIO_PLL_ZIG
174 264
 
175 265
 
176 266
 
177
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_DL1] = Convert.ToByte(main_Form.numericUpDown_ATT_1_8G_DL1.Text);
178
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_DL2] = Convert.ToByte(main_Form.numericUpDown_ATT_1_8G_DL2.Text);
179
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_UL1] = Convert.ToByte(main_Form.numericUpDown_ATT_1_8G_UL1.Text);
180
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_UL2] = Convert.ToByte(main_Form.numericUpDown_ATT_1_8G_UL2.Text);
181
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_UL3] = Convert.ToByte(main_Form.numericUpDown_ATT_1_8G_UL3.Text);
182
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_UL4] = Convert.ToByte(main_Form.numericUpDown_ATT_1_8G_UL4.Text);
183
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_DL1] = Convert.ToByte(main_Form.numericUpDown_ATT_2_1G_DL1.Text);
184
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_DL2] = Convert.ToByte(main_Form.numericUpDown_ATT_2_1G_DL2.Text);
185
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_UL1] = Convert.ToByte(main_Form.numericUpDown_ATT_2_1G_UL1.Text);
186
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_UL2] = Convert.ToByte(main_Form.numericUpDown_ATT_2_1G_UL2.Text);
187
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_UL3] = Convert.ToByte(main_Form.numericUpDown_ATT_2_1G_UL3.Text);
188
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_UL4] = Convert.ToByte(main_Form.numericUpDown_ATT_2_1G_UL4.Text);
189
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_DL] = Convert.ToByte(main_Form.numericUpDown_ATT_3_5G_DL.Text);
190
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_UL] = Convert.ToByte(main_Form.numericUpDown_ATT_3_5G_UL.Text);
191
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_COM1] = Convert.ToByte(main_Form.numericUpDown_ATT_3_5G_COM1.Text);
192
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_COM2] = Convert.ToByte(main_Form.numericUpDown_ATT_3_5G_COM2.Text);
193
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_COM3] = Convert.ToByte(main_Form.numericUpDown_ATT_3_5G_COM3.Text);
194
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL1_H] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_1_8G_DL1.Text) & 0xFF00) >> 8);
195
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL1_L] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_1_8G_DL1.Text) & 0x00FF));
196
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL2_H] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_1_8G_DL2.Text) & 0xFF00) >> 8);
197
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL2_L] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_1_8G_DL2.Text) & 0x00FF));
198
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL1_H] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_2_1G_DL1.Text) & 0xFF00) >> 8);
199
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL1_L] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_2_1G_DL1.Text) & 0x00FF));
200
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL2_H] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_2_1G_DL2.Text) & 0xFF00) >> 8);
201
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL2_L] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_2_1G_DL2.Text) & 0x00FF));
202
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_DL_H] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_3_5G_DL.Text) & 0xFF00) >> 8);
203
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_DL_L] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_3_5G_DL.Text) & 0x00FF));
204
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_UL_H] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_3_5G_UL.Text) & 0xFF00) >> 8);
205
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_UL_L] = Convert.ToByte((Convert.ToUInt16(main_Form.numericUpDown_PLL_3_5G_UL.Text) & 0x00FF));
267
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_DL1] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_1_8G_DL1.Text));
268
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_DL2] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_1_8G_DL2.Text));
269
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_UL1] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_1_8G_UL1.Text));
270
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_UL2] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_1_8G_UL2.Text));
271
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_UL3] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_1_8G_UL3.Text));
272
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_1_8G_UL4] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_1_8G_UL4.Text));
273
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_DL1] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_2_1G_DL1.Text));
274
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_DL2] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_2_1G_DL2.Text));
275
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_UL1] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_2_1G_UL1.Text));
276
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_UL2] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_2_1G_UL2.Text));
277
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_UL3] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_2_1G_UL3.Text));
278
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_2_1G_UL4] = Bluecell_BDA4601_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_2_1G_UL4.Text));
279
+
280
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_DL] = Bluecell_PE43711_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_3_5G_DL.Text));
281
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_UL] = Bluecell_PE43711_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_3_5G_UL.Text));
282
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_COM1] = Bluecell_PE43711_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_3_5G_COM1.Text));
283
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_COM2] = Bluecell_PE43711_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_3_5G_COM2.Text));
284
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_COM3] = Bluecell_PE43711_Calc(Convert.ToDouble(main_Form.numericUpDown_ATT_3_5G_COM3.Text));
285
+
286
+            temp_val = Convert.ToUInt32(Convert.ToDouble(main_Form.numericUpDown_PLL_1_8G_DL.Text) * 10);
287
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL_H] = Convert.ToByte((temp_val & 0xFF00) >> 8);
288
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL_L] = Convert.ToByte((temp_val & 0x00FF));
289
+
290
+            temp_val = Convert.ToUInt32(Convert.ToDouble(main_Form.numericUpDown_PLL_1_8G_UL.Text) * 10);
291
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_UL_H] = Convert.ToByte((temp_val & 0xFF00) >> 8);
292
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_UL_L] = Convert.ToByte((temp_val & 0x00FF));
293
+
294
+            temp_val = Convert.ToUInt32(Convert.ToDouble(main_Form.numericUpDown_PLL_2_1G_DL.Text) * 10);
295
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL_H] = Convert.ToByte((temp_val & 0xFF00) >> 8);
296
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL_L] = Convert.ToByte((temp_val & 0x00FF));
297
+
298
+            temp_val = Convert.ToUInt32(Convert.ToDouble(main_Form.numericUpDown_PLL_2_1G_UL.Text) * 10);
299
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_UL_H] = Convert.ToByte((temp_val & 0xFF00) >> 8);
300
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_UL_L] = Convert.ToByte((temp_val & 0x00FF));
301
+
302
+            temp_val = Convert.ToUInt32(Convert.ToDouble(main_Form.numericUpDown_PLL_3_5G_DL.Text) * 10);
303
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_DL_H] = Convert.ToByte((temp_val & 0xFF00) >> 8);
304
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_DL_L] = Convert.ToByte((temp_val & 0x00FF));
305
+
306
+            temp_val = Convert.ToUInt32(Convert.ToDouble(main_Form.numericUpDown_PLL_3_5G_UL.Text) * 10);
307
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_UL_H] = Convert.ToByte((temp_val & 0xFF00) >> 8);
308
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_UL_L] = Convert.ToByte((temp_val & 0x00FF));
309
+
206 310
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_LD_6_BIT] = 0;//Convert.ToByte(main_Form.numericUpDown_ATT_3_5G_COM1.Text);
207 311
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_DL_IN_H] = 0;// Convert.ToByte(main_Form.numericUpDown_ATT_3_5G_COM1.Text);
208 312
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_DL_IN_L] = 0;// Convert.ToByte(main_Form.numericUpDown_ATT_3_5G_COM1.Text);
@@ -244,9 +348,15 @@ namespace RF_TRIO_PLL_ZIG
244 348
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_3_5G_UL] = Convert.ToByte(PATH_3_5G_DL_Get_Func());
245 349
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_ON_OFF_3_5G_H] = Convert.ToByte(PLL_ON_OFF_3_5G_H_Get_Func());
246 350
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_ON_OFF_3_5G_L] = Convert.ToByte(PLL_ON_OFF_3_5G_L_Get_Func());
351
+
352
+
353
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.T_SYNC_DL] = main_Form.Tdd_T_Sync;//Convert.ToByte(PATH_3_5G_DL_Get_Func());
354
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t._T_SYNC_DL] = main_Form.Tdd_T_Sync;//Convert.ToByte(PATH_3_5G_DL_Get_Func());
355
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.T_SYNC_UL] = main_Form.Tdd_T_Sync;//Convert.ToByte(PLL_ON_OFF_3_5G_H_Get_Func());
356
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t._T_SYNC_UL] = main_Form.Tdd_T_Sync;//Convert.ToByte(PLL_ON_OFF_3_5G_L_Get_Func());
247 357
             /* * * * * * FIX DATA * * * * * */
248
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_ON_OFF_3_5G_L + 1] = crc16.STH30_CreateCrc(temp_buf, BLUECELL_DATA_SET_LENGTH -  3);
249
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_ON_OFF_3_5G_L + 2] = BLUECELL_TAILER;
358
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t._T_SYNC_UL + 1] = crc16.STH30_CreateCrc(temp_buf, BLUECELL_DATA_SET_LENGTH -  3);
359
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t._T_SYNC_UL + 2] = BLUECELL_TAILER;
250 360
             this.serial.Serial_DataSend(temp_buf, temp_buf.Length);
251 361
         }
252 362
         bool PATH_1_8G_UL_Get_Func()

+ 20 - 0
Basic_Terminal/Properties/Resources.Designer.cs

@@ -80,6 +80,16 @@ namespace Basic_Terminal.Properties {
80 80
             }
81 81
         }
82 82
         
83
+        /// <summary>
84
+        ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
85
+        /// </summary>
86
+        internal static System.Drawing.Bitmap RX_GREEN_IMAGE {
87
+            get {
88
+                object obj = ResourceManager.GetObject("RX_GREEN_IMAGE", resourceCulture);
89
+                return ((System.Drawing.Bitmap)(obj));
90
+            }
91
+        }
92
+        
83 93
         /// <summary>
84 94
         ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
85 95
         /// </summary>
@@ -100,6 +110,16 @@ namespace Basic_Terminal.Properties {
100 110
             }
101 111
         }
102 112
         
113
+        /// <summary>
114
+        ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
115
+        /// </summary>
116
+        internal static System.Drawing.Bitmap TX_Red_Image {
117
+            get {
118
+                object obj = ResourceManager.GetObject("TX_Red_Image", resourceCulture);
119
+                return ((System.Drawing.Bitmap)(obj));
120
+            }
121
+        }
122
+        
103 123
         /// <summary>
104 124
         ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
105 125
         /// </summary>

+ 12 - 6
Basic_Terminal/Properties/Resources.resx

@@ -121,17 +121,20 @@
121 121
   <data name="그림12" type="System.Resources.ResXFileRef, System.Windows.Forms">
122 122
     <value>..\Resources\그림1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
123 123
   </data>
124
+  <data name="그림1" type="System.Resources.ResXFileRef, System.Windows.Forms">
125
+    <value>..\Resources\그림1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126
+  </data>
124 127
   <data name="그림13" type="System.Resources.ResXFileRef, System.Windows.Forms">
125 128
     <value>..\Resources\그림11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126 129
   </data>
127
-  <data name="그림1" type="System.Resources.ResXFileRef, System.Windows.Forms">
128
-    <value>..\Resources\그림1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
130
+  <data name="TX_IMAGE" type="System.Resources.ResXFileRef, System.Windows.Forms">
131
+    <value>..\Resources\TX_IMAGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
129 132
   </data>
130 133
   <data name="그림2" type="System.Resources.ResXFileRef, System.Windows.Forms">
131 134
     <value>..\Resources\그림2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
132 135
   </data>
133
-  <data name="TX_IMAGE" type="System.Resources.ResXFileRef, System.Windows.Forms">
134
-    <value>..\Resources\TX_IMAGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
136
+  <data name="RX_IMAGE" type="System.Resources.ResXFileRef, System.Windows.Forms">
137
+    <value>..\Resources\RX_IMAGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
135 138
   </data>
136 139
   <data name="OFF_IMAGE" type="System.Resources.ResXFileRef, System.Windows.Forms">
137 140
     <value>..\Resources\OFF_IMAGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -142,7 +145,10 @@
142 145
   <data name="ON_IMAGE" type="System.Resources.ResXFileRef, System.Windows.Forms">
143 146
     <value>..\Resources\ON_IMAGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
144 147
   </data>
145
-  <data name="RX_IMAGE" type="System.Resources.ResXFileRef, System.Windows.Forms">
146
-    <value>..\Resources\RX_IMAGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
148
+  <data name="TX_Red_Image" type="System.Resources.ResXFileRef, System.Windows.Forms">
149
+    <value>..\Resources\TX_Red_Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
150
+  </data>
151
+  <data name="RX_GREEN_IMAGE" type="System.Resources.ResXFileRef, System.Windows.Forms">
152
+    <value>..\Resources\RX_GREEN_IMAGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
147 153
   </data>
148 154
 </root>

+ 6 - 0
Basic_Terminal/RF_TRIO_PLL_ZIG.csproj

@@ -127,5 +127,11 @@
127 127
   <ItemGroup>
128 128
     <None Include="Resources\RX_IMAGE.png" />
129 129
   </ItemGroup>
130
+  <ItemGroup>
131
+    <None Include="Resources\TX_Red_Image.png" />
132
+  </ItemGroup>
133
+  <ItemGroup>
134
+    <None Include="Resources\RX_GREEN_IMAGE.png" />
135
+  </ItemGroup>
130 136
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
131 137
 </Project>

BIN
Basic_Terminal/Resources/RX_GREEN_IMAGE.png


BIN
Basic_Terminal/Resources/RX_IMAGE.png


BIN
Basic_Terminal/Resources/TX_IMAGE.png


BIN
Basic_Terminal/Resources/TX_Red_Image.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 614 - 328
Basic_Terminal/Wnd/Main_Form.Designer.cs


+ 26 - 0
Basic_Terminal/Wnd/Main_Form.cs

@@ -19,6 +19,7 @@ namespace RF_TRIO_PLL_ZIG
19 19
         Serial serial = new Serial(); // Uart Open
20 20
         Bluecell_BootProtocol bluecell_BootProtocol = new Bluecell_BootProtocol();
21 21
         Update_Serial file = new Update_Serial();
22
+        public byte Tdd_T_Sync = 0;
22 23
         public Main_Form()
23 24
         {
24 25
             InitializeComponent();
@@ -100,6 +101,8 @@ namespace RF_TRIO_PLL_ZIG
100 101
             pictureBox_PLL_ON_OFF_3_5G_H_ON.Visible = false; 
101 102
             pictureBox_PATH_3_5G_UL_ON.Visible      = false; 
102 103
             pictureBox_PATH_3_5G_DL_ON.Visible      = false;
104
+            pictureBox_G_RX.Visible                 = false;
105
+            pictureBox_G_TX.Visible                 = false;
103 106
             /*        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_L_OFF;
104 107
         public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_H_OFF;
105 108
         public System.Windows.Forms.PictureBox pictureBox_PLL_ON_OFF_3_5G_L_OFF;
@@ -121,5 +124,28 @@ namespace RF_TRIO_PLL_ZIG
121 124
         public System.Windows.Forms.PictureBox pictureBox_PATH_1_8G_UL_ON;;*/
122 125
 
123 126
         }
127
+
128
+        private void ATT_Enter(object sender, KeyEventArgs e)
129
+        {
130
+            if (e.KeyCode == Keys.Enter)
131
+            {
132
+                button_Set_Click(sender, e);
133
+                //to do
134
+            }
135
+            else
136
+            {
137
+                return;
138
+            }
139
+        }
140
+        
141
+        private void TDD_T_SYNC_Click(object sender, EventArgs e)
142
+        {
143
+            PictureBox pictureBox = (PictureBox)sender;
144
+            Tdd_T_Sync = Convert.ToByte(pictureBox.Tag);
145
+            bluecell_BootProtocol.Bluecell_BtnSet(this.serial, this);
146
+  
147
+            pictureBox_TDD_T_SYNC_UL_ON.Visible = !pictureBox_TDD_T_SYNC_UL_ON.Visible;
148
+            pictureBox_TDD_T_SYNC_DL_OFF.Visible = !pictureBox_TDD_T_SYNC_DL_OFF.Visible;
149
+        }
124 150
     }
125 151
 }