Переглянути джерело

DAC 제어 소수점 둘째자리 까지 제어 할 수 있도록 수정

YJ 6 роки тому
батько
коміт
10fd85c0f6
2 змінених файлів з 35 додано та 32 видалено
  1. 16 16
      Basic_Terminal/Wnd/Main_Form.Designer.cs
  2. 19 16
      Basic_Terminal/Wnd/Main_Form.cs

+ 16 - 16
Basic_Terminal/Wnd/Main_Form.Designer.cs

@@ -2087,12 +2087,12 @@
2087 2087
             // 
2088 2088
             // numericUpDown_DAC_VoltCtrl_A
2089 2089
             // 
2090
-            this.numericUpDown_DAC_VoltCtrl_A.DecimalPlaces = 1;
2090
+            this.numericUpDown_DAC_VoltCtrl_A.DecimalPlaces = 2;
2091 2091
             this.numericUpDown_DAC_VoltCtrl_A.Increment = new decimal(new int[] {
2092 2092
             1,
2093 2093
             0,
2094 2094
             0,
2095
-            65536});
2095
+            131072});
2096 2096
             this.numericUpDown_DAC_VoltCtrl_A.Location = new System.Drawing.Point(95, 55);
2097 2097
             this.numericUpDown_DAC_VoltCtrl_A.Maximum = new decimal(new int[] {
2098 2098
             4,
@@ -2108,12 +2108,12 @@
2108 2108
             // 
2109 2109
             // numericUpDown_DAC_VoltCtrl_E
2110 2110
             // 
2111
-            this.numericUpDown_DAC_VoltCtrl_E.DecimalPlaces = 1;
2111
+            this.numericUpDown_DAC_VoltCtrl_E.DecimalPlaces = 2;
2112 2112
             this.numericUpDown_DAC_VoltCtrl_E.Increment = new decimal(new int[] {
2113 2113
             1,
2114 2114
             0,
2115 2115
             0,
2116
-            65536});
2116
+            131072});
2117 2117
             this.numericUpDown_DAC_VoltCtrl_E.Location = new System.Drawing.Point(95, 84);
2118 2118
             this.numericUpDown_DAC_VoltCtrl_E.Maximum = new decimal(new int[] {
2119 2119
             4,
@@ -2223,12 +2223,12 @@
2223 2223
             // 
2224 2224
             // numericUpDown_DAC_VoltCtrl_H
2225 2225
             // 
2226
-            this.numericUpDown_DAC_VoltCtrl_H.DecimalPlaces = 1;
2226
+            this.numericUpDown_DAC_VoltCtrl_H.DecimalPlaces = 2;
2227 2227
             this.numericUpDown_DAC_VoltCtrl_H.Increment = new decimal(new int[] {
2228 2228
             1,
2229 2229
             0,
2230 2230
             0,
2231
-            65536});
2231
+            131072});
2232 2232
             this.numericUpDown_DAC_VoltCtrl_H.Location = new System.Drawing.Point(836, 84);
2233 2233
             this.numericUpDown_DAC_VoltCtrl_H.Maximum = new decimal(new int[] {
2234 2234
             4,
@@ -2244,12 +2244,12 @@
2244 2244
             // 
2245 2245
             // numericUpDown_DAC_VoltCtrl_F
2246 2246
             // 
2247
-            this.numericUpDown_DAC_VoltCtrl_F.DecimalPlaces = 1;
2247
+            this.numericUpDown_DAC_VoltCtrl_F.DecimalPlaces = 2;
2248 2248
             this.numericUpDown_DAC_VoltCtrl_F.Increment = new decimal(new int[] {
2249 2249
             1,
2250 2250
             0,
2251 2251
             0,
2252
-            65536});
2252
+            131072});
2253 2253
             this.numericUpDown_DAC_VoltCtrl_F.Location = new System.Drawing.Point(342, 84);
2254 2254
             this.numericUpDown_DAC_VoltCtrl_F.Maximum = new decimal(new int[] {
2255 2255
             4,
@@ -2265,12 +2265,12 @@
2265 2265
             // 
2266 2266
             // numericUpDown_DAC_VoltCtrl_G
2267 2267
             // 
2268
-            this.numericUpDown_DAC_VoltCtrl_G.DecimalPlaces = 1;
2268
+            this.numericUpDown_DAC_VoltCtrl_G.DecimalPlaces = 2;
2269 2269
             this.numericUpDown_DAC_VoltCtrl_G.Increment = new decimal(new int[] {
2270 2270
             1,
2271 2271
             0,
2272 2272
             0,
2273
-            65536});
2273
+            131072});
2274 2274
             this.numericUpDown_DAC_VoltCtrl_G.Location = new System.Drawing.Point(589, 84);
2275 2275
             this.numericUpDown_DAC_VoltCtrl_G.Maximum = new decimal(new int[] {
2276 2276
             4,
@@ -2286,12 +2286,12 @@
2286 2286
             // 
2287 2287
             // numericUpDown_DAC_VoltCtrl_D
2288 2288
             // 
2289
-            this.numericUpDown_DAC_VoltCtrl_D.DecimalPlaces = 1;
2289
+            this.numericUpDown_DAC_VoltCtrl_D.DecimalPlaces = 2;
2290 2290
             this.numericUpDown_DAC_VoltCtrl_D.Increment = new decimal(new int[] {
2291 2291
             1,
2292 2292
             0,
2293 2293
             0,
2294
-            65536});
2294
+            131072});
2295 2295
             this.numericUpDown_DAC_VoltCtrl_D.Location = new System.Drawing.Point(836, 55);
2296 2296
             this.numericUpDown_DAC_VoltCtrl_D.Maximum = new decimal(new int[] {
2297 2297
             4,
@@ -2307,12 +2307,12 @@
2307 2307
             // 
2308 2308
             // numericUpDown_DAC_VoltCtrl_B
2309 2309
             // 
2310
-            this.numericUpDown_DAC_VoltCtrl_B.DecimalPlaces = 1;
2310
+            this.numericUpDown_DAC_VoltCtrl_B.DecimalPlaces = 2;
2311 2311
             this.numericUpDown_DAC_VoltCtrl_B.Increment = new decimal(new int[] {
2312 2312
             1,
2313 2313
             0,
2314 2314
             0,
2315
-            65536});
2315
+            131072});
2316 2316
             this.numericUpDown_DAC_VoltCtrl_B.Location = new System.Drawing.Point(342, 55);
2317 2317
             this.numericUpDown_DAC_VoltCtrl_B.Maximum = new decimal(new int[] {
2318 2318
             4,
@@ -2328,12 +2328,12 @@
2328 2328
             // 
2329 2329
             // numericUpDown_DAC_VoltCtrl_C
2330 2330
             // 
2331
-            this.numericUpDown_DAC_VoltCtrl_C.DecimalPlaces = 1;
2331
+            this.numericUpDown_DAC_VoltCtrl_C.DecimalPlaces = 2;
2332 2332
             this.numericUpDown_DAC_VoltCtrl_C.Increment = new decimal(new int[] {
2333 2333
             1,
2334 2334
             0,
2335 2335
             0,
2336
-            65536});
2336
+            131072});
2337 2337
             this.numericUpDown_DAC_VoltCtrl_C.Location = new System.Drawing.Point(589, 55);
2338 2338
             this.numericUpDown_DAC_VoltCtrl_C.Maximum = new decimal(new int[] {
2339 2339
             4,

+ 19 - 16
Basic_Terminal/Wnd/Main_Form.cs

@@ -336,64 +336,67 @@ namespace RF_TRIO_PLL_ZIG
336 336
                     temp_val = data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_H] << 8;
337 337
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.PLL_3_5G_UL_L]) / 10);
338 338
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_PLL_3_5G_UL, temp_val.ToString());
339
-
339
+                    /***********************DAC A Sector**********************************/
340 340
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_H] << 8;
341 341
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_A_L]) );
342 342
                     ret = (temp_val & 0x0FFF) * 4;
343 343
                     ret = ret / 4095;
344
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
344
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
345 345
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_A, ret.ToString());
346
-
346
+                    /***********************DAC B Sector**********************************/
347 347
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_B_H] << 8;
348 348
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_B_L]) );
349 349
                     ret = (temp_val & 0x0FFF) * 4;
350 350
                     ret = ret / 4095;
351
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
351
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
352 352
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_B, ret.ToString());
353
-
353
+                    /***********************DAC C Sector**********************************/
354 354
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_C_H] << 8;
355 355
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_C_L]) );
356 356
                     ret = (temp_val & 0x0FFF) * 4;
357 357
                     ret = ret / 4095;
358
-                    ret = Math.Round(Convert.ToDouble(ret ), 1);
358
+                    ret = Math.Round(Convert.ToDouble(ret ), 2);
359 359
 
360 360
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_C, ret.ToString());
361
-
361
+                    /***********************DAC D Sector**********************************/
362 362
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_D_H] << 8;
363 363
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_D_L]) );
364 364
                     ret = (temp_val & 0x0FFF) * 4;
365 365
                     ret = ret / 4095;
366
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
366
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
367 367
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_D, ret.ToString());
368
-
368
+                    /***********************DAC E Sector**********************************/
369 369
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_E_H] << 8;
370 370
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_E_L]) );
371 371
                     ret = (temp_val & 0x0FFF) * 4;
372 372
                     ret = ret / 4095;
373
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
373
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
374 374
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_E, ret.ToString());
375
-
375
+                    /***********************DAC F Sector**********************************/
376 376
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_F_H] << 8;
377 377
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_F_L]) );
378 378
                     ret = (temp_val & 0x0FFF) * 4;
379 379
                     ret = ret / 4095;
380
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
380
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
381 381
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_F, ret.ToString());
382
-
382
+                    /***********************DAC G Sector**********************************/
383 383
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_G_H] << 8;
384 384
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_G_L]) );
385 385
                     ret = (temp_val & 0x0FFF) * 4;
386 386
                     ret = ret / 4095;
387
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
387
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
388 388
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_G, ret.ToString());
389
-
389
+                    /***********************DAC H Sector**********************************/
390 390
                     temp_val = data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_H_H] << 8;
391 391
                     temp_val = ((temp_val | data[(int)Bluecell_TypeIndex_t.DAC_VCtrl_H_L]) );
392 392
                     ret = (temp_val & 0x0FFF) * 4;
393 393
                     ret = ret / 4095;
394
-                    ret = Math.Round(Convert.ToDouble(ret), 1);
394
+                    ret = Math.Round(Convert.ToDouble(ret), 2);
395 395
                     this.Invoke(new StringSend(numeric_Text_Set), numericUpDown_DAC_VoltCtrl_H, ret.ToString());
396 396
 
397
+
398
+
399
+
397 400
                     PictureBox pic_on;
398 401
                     PictureBox pic_off;
399 402
                     pic_on = pictureBox_PATH_1_8G_DL_ON;