瀏覽代碼

BLUECELL BTN set 수정 / CRC 인덱스 변수명으로 변경 / TX RX ON OFF 이미지 추가

YJ 6 年之前
父節點
當前提交
ccdc9c30a5

+ 188 - 72
Basic_Terminal/Func/Bluecell_BootProtocol.cs

@@ -74,10 +74,10 @@ namespace RF_TRIO_PLL_ZIG
74 74
         PLL_2_1G_DL2_H,
75 75
         PLL_2_1G_DL2_L,
76 76
 
77
-        PLL_3_5G_DL1_H,
78
-        PLL_3_5G_DL1_L,
79
-        PLL_3_5G_DL2_H,
80
-        PLL_3_5G_DL2_L,
77
+        PLL_3_5G_DL_H,
78
+        PLL_3_5G_DL_L,
79
+        PLL_3_5G_UL_H,
80
+        PLL_3_5G_UL_L,
81 81
 
82 82
         PLL_LD_6_BIT,
83 83
 
@@ -156,15 +156,19 @@ namespace RF_TRIO_PLL_ZIG
156 156
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + 1]     = BLUECELL_TAILER;
157 157
             this.serial.Serial_DataSend(temp_buf, temp_buf.Length);
158 158
         }
159
-        const byte BLUECELL_DATA_SET_LENGTH = 62;
160
-        public void Bluecell_BtnSet(object serial,object main_form)
159
+        const byte BLUECELL_DATA_SET_LENGTH = 76;
160
+        Main_Form main_Form;
161
+        public void Bluecell_BtnSet(object serial, object main_form)
161 162
         {
162
-            Main_Form main_Form = (Main_Form)main_form;
163
+            this.main_Form = (Main_Form)main_form;
163 164
             this.serial = (Serial)serial;
164 165
             byte[] temp_buf = new byte[BLUECELL_DATA_SET_LENGTH];
165
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Header]   = BLUECELL_HEADER;
166
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Type]     = (byte)Bluecell_Prot_t.TYPE_BLUECELL_SET;
167
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Length]   = BLUECELL_RESET_LENGTH - BLUECELL_FIX_DATA_LENGTH;
166
+
167
+
168
+            /* * * * * * FIX DATA * * * * * */
169
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Header] = BLUECELL_HEADER;
170
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Type] = (byte)Bluecell_Prot_t.TYPE_BLUECELL_SET;
171
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_Length] = BLUECELL_DATA_SET_LENGTH - BLUECELL_FIX_DATA_LENGTH;
168 172
             temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_CrcIndex] = (byte)BLUECELL_DATA_SET_LENGTH - 2;
169 173
 
170 174
 
@@ -182,69 +186,181 @@ namespace RF_TRIO_PLL_ZIG
182 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);
183 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);
184 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);
185
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_DL] =
186
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_UL] =
187
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_COM1] =
188
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_COM2] =
189
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ATT_3_5G_COM3] =
190
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL1_H] =
191
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL1_L] =
192
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL2_H] =
193
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_1_8G_DL2_L] =
194
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL1_H] =
195
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL1_L] =
196
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL2_H] =
197
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_2_1G_DL2_L] =
198
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_DL1_H] =
199
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_DL1_L] =
200
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_DL2_H] =
201
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_3_5G_DL2_L] =
202
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_LD_6_BIT] =
203
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_DL_IN_H] =
204
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_DL_IN_L] =
205
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_DL_OUT_H] =
206
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_DL_OUT_L] =
207
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_UL_IN_H] =
208
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_UL_IN_L] =
209
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_UL_OUT_H] =
210
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_UL_OUT_L] =
211
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_DL_IN_H] =
212
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_DL_IN_L] =
213
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_DL_OUT_H] =
214
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_DL_OUT_L] =
215
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_UL_IN_H] =
216
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_UL_IN_L] =
217
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_UL_OUT_H] =
218
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_UL_OUT_L] =
219
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_DL_IN_H] =
220
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_DL_IN_L] =
221
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_DL_OUT_L] =
222
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_DL_OUT_H] =
223
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_UL_IN_H] =
224
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_UL_IN_L] =
225
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_UL_OUT_H] =
226
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_UL_OUT_L] =
227
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.RFU_TEMP_H] =
228
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.RFU_TEMP_L] =
229
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t._28V_DET_H] =
230
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t._28V_DET_L] =
231
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ALARM_AC] =
232
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ALARM_DC] =
233
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_1_8G_DL] =
234
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_1_8G_UL] =
235
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_2_1G_DL] =
236
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_2_1G_UL] =
237
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_3_5G_L] =
238
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_3_5G_H] =
239
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_3_5G_DL] =
240
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_3_5G_UL] =
241
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_ON_OFF_3_5G_H] =
242
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PLL_ON_OFF_3_5G_L] =
243
-            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_RESET_LENGTH - 3);
244
-
245
-            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + 1] = BLUECELL_TAILER;
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));
206
+            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
+            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
+            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);
209
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_DL_OUT_H] = 0;
210
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_DL_OUT_L] = 0;
211
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_UL_IN_H] = 0;
212
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_UL_IN_L] = 0;
213
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_UL_OUT_H] = 0;
214
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_1_8G_UL_OUT_L] = 0;
215
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_DL_IN_H] = 0;
216
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_DL_IN_L] = 0;
217
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_DL_OUT_H] = 0;
218
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_DL_OUT_L] = 0;
219
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_UL_IN_H] = 0;
220
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_UL_IN_L] = 0;
221
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_UL_OUT_H] = 0;
222
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_2_1G_UL_OUT_L] = 0;
223
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_DL_IN_H] = 0;
224
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_DL_IN_L] = 0;
225
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_DL_OUT_L] = 0;
226
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_DL_OUT_H] = 0;
227
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_UL_IN_H] = 0;
228
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_UL_IN_L] = 0;
229
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_UL_OUT_H] = 0;
230
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.DET_3_5G_UL_OUT_L] = 0;
231
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.RFU_TEMP_H] = 0;
232
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.RFU_TEMP_L] = 0;
233
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t._28V_DET_H] = 0;
234
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t._28V_DET_L] = 0;
235
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ALARM_AC] = 0;
236
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.ALARM_DC] = 0;
237
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_1_8G_DL] = Convert.ToByte(PATH_1_8G_DL_Get_Func());
238
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_1_8G_UL] = Convert.ToByte(PATH_1_8G_UL_Get_Func()); 
239
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_2_1G_DL] = Convert.ToByte(PATH_2_1G_DL_Get_Func());
240
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_2_1G_UL] = Convert.ToByte(PATH_2_1G_UL_Get_Func());
241
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_3_5G_L]  = Convert.ToByte(Path_3_5G_L_Get_Func());
242
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_3_5G_H]  = Convert.ToByte(Path_3_5G_H_Get_Func());
243
+            temp_buf[(int)Bluecell_ProtIndex_p.Bluecell_data + (int)Bluecell_TypeIndex_t.PATH_EN_3_5G_DL] = Convert.ToByte(PATH_3_5G_DL_Get_Func());
244
+            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
+            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
+            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());
247
+            /* * * * * * 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;
246 250
             this.serial.Serial_DataSend(temp_buf, temp_buf.Length);
247 251
         }
252
+        bool PATH_1_8G_UL_Get_Func()
253
+        {
254
+            bool ret = false;
255
+            if (this.main_Form.pictureBox_PATH_1_8G_UL_OFF.Visible == true)
256
+                ret = false;
257
+            else
258
+                ret = true;
259
+            return ret;
260
+        }
261
+        bool PATH_1_8G_DL_Get_Func()
262
+        {
263
+            bool ret = false;
264
+            if (this.main_Form.pictureBox_PATH_1_8G_DL_OFF.Visible == true)
265
+                ret = false;
266
+            else
267
+                ret = true;
268
+            return ret;
269
+        }
270
+        bool PATH_2_1G_UL_Get_Func()
271
+        {
272
+            bool ret = false;
273
+            if (this.main_Form.pictureBox_PATH_2_1G_UL_OFF.Visible == true)
274
+                ret = false;
275
+            else
276
+                ret = true;
277
+            return ret;
278
+        }
279
+        bool PATH_2_1G_DL_Get_Func()
280
+        {
281
+            bool ret = false;
282
+            if (this.main_Form.pictureBox_PATH_2_1G_DL_OFF.Visible == true)
283
+                ret = false;
284
+            else
285
+                ret = true;
286
+            return ret;
287
+        }
288
+
289
+        bool Path_3_5G_L_Get_Func()
290
+        {
291
+            bool ret = false;
292
+            if (this.main_Form.pictureBox_PATH_3_5G_L_OFF.Visible == true)
293
+                ret = false;
294
+            else
295
+                ret = true;
296
+
297
+            return ret;
298
+        }
299
+        bool Path_3_5G_H_Get_Func()
300
+        {
301
+            bool ret = false;
302
+            if (this.main_Form.pictureBox_PATH_3_5G_H_OFF.Visible == true)
303
+                ret = false;
304
+            else
305
+                ret = true;
306
+            return ret;
307
+        }
308
+        bool PLL_ON_OFF_3_5G_L_Get_Func()
309
+        {
310
+            bool ret = false;
311
+            if (this.main_Form.pictureBox_PLL_ON_OFF_3_5G_L_OFF.Visible == true)
312
+                ret = false;
313
+            else
314
+                ret = true;
315
+            return ret;
316
+        }
317
+        bool PLL_ON_OFF_3_5G_H_Get_Func()
318
+        {
319
+            bool ret = false;
320
+            if (this.main_Form.pictureBox_PLL_ON_OFF_3_5G_H_OFF.Visible == true)
321
+                ret = false;
322
+            else
323
+                ret = true;
324
+            return ret;
325
+        }
326
+        bool PATH_3_5G_UL_Get_Func()
327
+        {
328
+            bool ret = false;
329
+            if (this.main_Form.pictureBox_PATH_3_5G_UL_OFF.Visible == true)
330
+                ret = false;
331
+            else
332
+                ret = true;
333
+            return ret;
334
+        }
335
+        bool PATH_3_5G_DL_Get_Func()
336
+        {
337
+            bool ret = false;
338
+            if (this.main_Form.pictureBox_PATH_3_5G_DL_OFF.Visible == true)
339
+                ret = false;
340
+            else
341
+                ret = true;
342
+            return ret;
343
+        }
344
+       
345
+        /*        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_L_OFF;
346
+public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_H_OFF;
347
+public System.Windows.Forms.PictureBox pictureBox_PLL_ON_OFF_3_5G_L_OFF;
348
+public System.Windows.Forms.PictureBox pictureBox_PLL_ON_OFF_3_5G_H_OFF;
349
+
350
+
351
+
352
+public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_UL_OFF;
353
+public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_DL_OFF;
354
+public System.Windows.Forms.PictureBox pictureBox_PATH_2_1G_UL_OFF;
355
+public System.Windows.Forms.PictureBox pictureBox_PATH_2_1G_DL_OFF;
356
+public System.Windows.Forms.PictureBox pictureBox_PATH_1_8G_UL_OFF;
357
+public System.Windows.Forms.PictureBox pictureBox_PATH_1_8G_DL_OFF;
358
+*/
359
+
360
+
361
+
362
+
363
+
248 364
 #if false
249 365
         public int Bluecell_Firmupdate_sendlength() {
250 366
             return bluecell_Firmupdate_sendlength;
@@ -315,4 +431,4 @@ namespace RF_TRIO_PLL_ZIG
315 431
 
316 432
 #endif
317 433
     }
318
-    }
434
+}

+ 1 - 1
Basic_Terminal/Func/Crc16.cs

@@ -146,7 +146,7 @@ namespace RF_TRIO_PLL_ZIG
146 146
             byte bit;        // bit mask
147 147
             int crc = 0xFF; // calculated checksum
148 148
             byte byteCtr;    // byte counter
149
-            byte index = 1;
149
+            byte index = (int)Bluecell_ProtIndex_p.Bluecell_Type;
150 150
             // calculates 8-Bit checksum with given polynomial
151 151
             for (byteCtr = 0; byteCtr < nbrOfBytes; byteCtr++)
152 152
             {

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

@@ -60,6 +60,46 @@ namespace Basic_Terminal.Properties {
60 60
             }
61 61
         }
62 62
         
63
+        /// <summary>
64
+        ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
65
+        /// </summary>
66
+        internal static System.Drawing.Bitmap OFF_IMAGE {
67
+            get {
68
+                object obj = ResourceManager.GetObject("OFF_IMAGE", resourceCulture);
69
+                return ((System.Drawing.Bitmap)(obj));
70
+            }
71
+        }
72
+        
73
+        /// <summary>
74
+        ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
75
+        /// </summary>
76
+        internal static System.Drawing.Bitmap ON_IMAGE {
77
+            get {
78
+                object obj = ResourceManager.GetObject("ON_IMAGE", resourceCulture);
79
+                return ((System.Drawing.Bitmap)(obj));
80
+            }
81
+        }
82
+        
83
+        /// <summary>
84
+        ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
85
+        /// </summary>
86
+        internal static System.Drawing.Bitmap RX_IMAGE {
87
+            get {
88
+                object obj = ResourceManager.GetObject("RX_IMAGE", resourceCulture);
89
+                return ((System.Drawing.Bitmap)(obj));
90
+            }
91
+        }
92
+        
93
+        /// <summary>
94
+        ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
95
+        /// </summary>
96
+        internal static System.Drawing.Bitmap TX_IMAGE {
97
+            get {
98
+                object obj = ResourceManager.GetObject("TX_IMAGE", resourceCulture);
99
+                return ((System.Drawing.Bitmap)(obj));
100
+            }
101
+        }
102
+        
63 103
         /// <summary>
64 104
         ///   System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
65 105
         /// </summary>

+ 16 - 4
Basic_Terminal/Properties/Resources.resx

@@ -121,16 +121,28 @@
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="그림13" type="System.Resources.ResXFileRef, System.Windows.Forms">
125
+    <value>..\Resources\그림11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126
+  </data>
124 127
   <data name="그림1" type="System.Resources.ResXFileRef, System.Windows.Forms">
125 128
     <value>..\Resources\그림1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
126 129
   </data>
127
-  <data name="그림13" type="System.Resources.ResXFileRef, System.Windows.Forms">
128
-    <value>..\Resources\그림11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
130
+  <data name="그림2" type="System.Resources.ResXFileRef, System.Windows.Forms">
131
+    <value>..\Resources\그림2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
132
+  </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>
135
+  </data>
136
+  <data name="OFF_IMAGE" type="System.Resources.ResXFileRef, System.Windows.Forms">
137
+    <value>..\Resources\OFF_IMAGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
129 138
   </data>
130 139
   <data name="그림11" type="System.Resources.ResXFileRef, System.Windows.Forms">
131 140
     <value>..\Resources\그림11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
132 141
   </data>
133
-  <data name="그림2" type="System.Resources.ResXFileRef, System.Windows.Forms">
134
-    <value>..\Resources\그림2.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
142
+  <data name="ON_IMAGE" type="System.Resources.ResXFileRef, System.Windows.Forms">
143
+    <value>..\Resources\ON_IMAGE.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
144
+  </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>
135 147
   </data>
136 148
 </root>

+ 12 - 0
Basic_Terminal/RF_TRIO_PLL_ZIG.csproj

@@ -115,5 +115,17 @@
115 115
   <ItemGroup>
116 116
     <None Include="Resources\그림2.png" />
117 117
   </ItemGroup>
118
+  <ItemGroup>
119
+    <None Include="Resources\OFF_IMAGE.png" />
120
+  </ItemGroup>
121
+  <ItemGroup>
122
+    <None Include="Resources\ON_IMAGE.png" />
123
+  </ItemGroup>
124
+  <ItemGroup>
125
+    <None Include="Resources\TX_IMAGE.png" />
126
+  </ItemGroup>
127
+  <ItemGroup>
128
+    <None Include="Resources\RX_IMAGE.png" />
129
+  </ItemGroup>
118 130
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
119 131
 </Project>

二進制
Basic_Terminal/Resources/OFF_IMAGE.png


二進制
Basic_Terminal/Resources/ON_IMAGE.png


二進制
Basic_Terminal/Resources/RX_IMAGE.png


二進制
Basic_Terminal/Resources/TX_IMAGE.png


文件差異過大導致無法顯示
+ 646 - 404
Basic_Terminal/Wnd/Main_Form.Designer.cs


+ 36 - 2
Basic_Terminal/Wnd/Main_Form.cs

@@ -17,7 +17,7 @@ namespace RF_TRIO_PLL_ZIG
17 17
     public partial class Main_Form : Form
18 18
     {
19 19
         Serial serial = new Serial(); // Uart Open
20
-        Bluecell_BootProtocol bluecell_BootProtocol = new Bluecell_BootProtocol;
20
+        Bluecell_BootProtocol bluecell_BootProtocol = new Bluecell_BootProtocol();
21 21
         Update_Serial file = new Update_Serial();
22 22
         public Main_Form()
23 23
         {
@@ -85,7 +85,41 @@ namespace RF_TRIO_PLL_ZIG
85 85
 
86 86
         private void button_Set_Click(object sender, EventArgs e)
87 87
         {
88
-            bluecell_BootProtocol.Bluecell_BtnSet(this.serial);
88
+            bluecell_BootProtocol.Bluecell_BtnSet(this.serial,this);
89
+        }
90
+
91
+        private void Main_Form_Load(object sender, EventArgs e)
92
+        {
93
+            pictureBox_PATH_1_8G_DL_ON.Visible      = false;
94
+            pictureBox_PATH_1_8G_UL_ON.Visible      = false; 
95
+            pictureBox_PATH_2_1G_DL_ON.Visible      = false; 
96
+            pictureBox_PATH_2_1G_UL_ON.Visible      = false; 
97
+            pictureBox_PATH_3_5G_L_ON.Visible       = false; 
98
+            pictureBox_PATH_3_5G_H_ON.Visible       = false; 
99
+            pictureBox_PLL_ON_OFF_3_5G_L_ON.Visible = false; 
100
+            pictureBox_PLL_ON_OFF_3_5G_H_ON.Visible = false; 
101
+            pictureBox_PATH_3_5G_UL_ON.Visible      = false; 
102
+            pictureBox_PATH_3_5G_DL_ON.Visible      = false;
103
+            /*        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_L_OFF;
104
+        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_H_OFF;
105
+        public System.Windows.Forms.PictureBox pictureBox_PLL_ON_OFF_3_5G_L_OFF;
106
+        public System.Windows.Forms.PictureBox pictureBox_PLL_ON_OFF_3_5G_H_OFF;
107
+        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_UL_OFF;
108
+        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_DL_OFF;
109
+        public System.Windows.Forms.PictureBox pictureBox_PATH_2_1G_UL_OFF;
110
+        public System.Windows.Forms.PictureBox pictureBox_PATH_2_1G_DL_OFF;
111
+        public System.Windows.Forms.PictureBox pictureBox_PATH_1_8G_UL_OFF;
112
+        public System.Windows.Forms.PictureBox pictureBox_PATH_1_8G_DL_OFF;
113
+        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_L_ON;
114
+        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_H_ON;
115
+        public System.Windows.Forms.PictureBox pictureBox_PLL_ON_OFF_3_5G_L_ON;
116
+        public System.Windows.Forms.PictureBox pictureBox_PLL_ON_OFF_3_5G_H_ON;
117
+        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_UL_ON;
118
+        public System.Windows.Forms.PictureBox pictureBox_PATH_3_5G_DL_ON;
119
+        public System.Windows.Forms.PictureBox pictureBox_PATH_2_1G_UL_ON;
120
+        public System.Windows.Forms.PictureBox pictureBox_PATH_2_1G_DL_ON;
121
+        public System.Windows.Forms.PictureBox pictureBox_PATH_1_8G_UL_ON;;*/
122
+
89 123
         }
90 124
     }
91 125
 }

文件差異過大導致無法顯示
+ 919 - 530
Basic_Terminal/Wnd/Main_Form.resx