Kaynağa Gözat

온도 테이블 온도 Offset 값 테이블로 사용

PYJ 4 yıl önce
ebeveyn
işleme
255f278853

BIN
.vs/Jdas_Mbic/v15/.suo


BIN
.vs/Jdas_Mbic/v15/Server/sqlite3/storage.ide-shm


BIN
.vs/Jdas_Mbic/v15/Server/sqlite3/storage.ide-wal


+ 43 - 2
Jdas_Mbic/Hidden.cs

@@ -87,7 +87,7 @@ namespace Jdas_Mbic
87 87
                 dataGridView_TableSetting.Rows.Add();
88 88
                 tempstr = string.Format("{0:0}", Temp_Data);
89 89
                 dataGridView_TableSetting[0, i].Value = Convert.ToString(tempstr) + " ℃";
90
-                Temp_Data = Temp_Data - 5;
90
+                Temp_Data = Temp_Data + 5;
91 91
                 dataGridView_TableSetting[1, i].Value = "0";
92 92
 
93 93
             }
@@ -290,7 +290,42 @@ namespace Jdas_Mbic
290 290
                 temp_buf[(int)(Bluecell_ProtIndex_p.Bluecell_data + 1) + a + 3] = Convert.ToByte(CRCRET & 0x00FF);
291 291
                 ((JdasMbic)(this.Owner)).serial.Serial_DataSend(temp_buf, JdasMbic.DET_TableMaxLength);
292 292
             }
293
-            else
293
+            else if (comboBox_TableName.Text.Contains("TEMP") == true)
294
+            {
295
+                Length = Convert.ToByte(JdasMbic.ATT_TableMaxLength - 4);
296
+
297
+                temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Length_H] = Convert.ToByte((Length & 0xFF00) >> 8);
298
+                temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Length_L] = Convert.ToByte((Length & 0x00FF));
299
+                //for (i = 0; i < dataGridView_TableSetting.RowCount; i++)
300
+                for (i = 0; i < 0x40; i++)
301
+                {
302
+                    try
303
+                    {
304
+                        attret = Convert.ToByte(Convert.ToSByte(Convert.ToDouble(dataGridView_TableSetting[1, i].Value) * 4) & 0xFF);
305
+
306
+                        temp_buf[(int)(Bluecell_ProtIndex_p.Bluecell_data + 1) + i] = (attret);
307
+                    }
308
+                    catch { }
309
+                }
310
+
311
+                for (a = i; a < i + 30; a++)
312
+                {
313
+                    attret = 0;
314
+
315
+                    temp_buf[(int)(Bluecell_ProtIndex_p.Bluecell_data + 1) + i] = (attret);
316
+                }
317
+                sbyte tmpdata = (sbyte)(numericUpDown_TableRef.Value);
318
+                byte data = Convert.ToByte(tmpdata & 0xFF);
319
+                temp_buf[(int)(Bluecell_ProtIndex_p.Bluecell_data + 1) + a + 0] = data;
320
+                temp_buf[(int)(Bluecell_ProtIndex_p.Bluecell_data + 1) + a + 1] = Convert.ToByte(numericUpDown_TableLength.Value);
321
+
322
+                UInt16 CRCRET = ((JdasMbic)(this.Owner)).crc.CRC16_Generate(temp_buf, temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Length_L]);
323
+                temp_buf[(int)(Bluecell_ProtIndex_p.Bluecell_data + 1) + a + 2] = Convert.ToByte((CRCRET & 0xFF00) >> 8);
324
+                temp_buf[(int)(Bluecell_ProtIndex_p.Bluecell_data + 1) + a + 3] = Convert.ToByte(CRCRET & 0x00FF);
325
+                ((JdasMbic)(this.Owner)).serial.Serial_DataSend(temp_buf, JdasMbic.ATT_TableMaxLength);
326
+
327
+            }
328
+            else 
294 329
             {
295 330
                 Length = Convert.ToByte(JdasMbic.ATT_TableMaxLength - 4);
296 331
 
@@ -445,6 +480,12 @@ namespace Jdas_Mbic
445 480
 
446 481
 
447 482
 
483
+                }
484
+                else if (data.Contains("TEMP") == true)
485
+                {
486
+                    tempdata = (SByte)((buf[(int)(Bluecell_ProtIndex_p.Bluecell_data + 1) + i]));//Convert.ToSByte((buf[(int)(Bluecell_ProtIndex_p.Bluecell_data + 1) + i]));
487
+
488
+                    ret = Convert.ToDouble(tempdata) / 4;
448 489
                 }
449 490
                 else
450 491
                 {

+ 1 - 1
Jdas_Mbic/Main.cs

@@ -32,7 +32,7 @@ namespace Jdas_Mbic
32 32
         public const double Table_Dbm_DefaultValue = 0;//31.5;
33 33
         public const int Table_DL_DefaultValue = 7;
34 34
         public const int Table_UL_DefaultValue = -15;
35
-        public const int Table_Temp_DefaultValue = 10;
35
+        public const int Table_Temp_DefaultValue = -10;
36 36
         public Serial serial = new Serial(); // Uart Open
37 37
 
38 38
         const byte ALARM_DLI_P4_LEVEL_LOW = 0x80;

BIN
Jdas_Mbic/bin/Debug/Jdas_Mbic.exe


BIN
Jdas_Mbic/bin/Debug/Jdas_Mbic.pdb


BIN
Jdas_Mbic/obj/Debug/Jdas_Mbic.csproj.GenerateResource.cache


BIN
Jdas_Mbic/obj/Debug/Jdas_Mbic.exe


BIN
Jdas_Mbic/obj/Debug/Jdas_Mbic.pdb