Parcourir la source

控制板读阈值寄存器

liyi il y a 1 an
Parent
commit
50fc5205af

+ 2 - 2
control/PDU-AC-COMBINE/App/Main/board_cfg.h

@@ -4,7 +4,7 @@
 
 
 #define  	PRJ_4_BASE                0
-#define 	PRJ_4_ALL_O_ALL_C					0
+#define 	PRJ_4_ALL_O_ALL_C					1
 #define   PRJ_4_SELF_LOCK_SWITCH    0
 #define 	PRJ_6_BASE								0
 #define 	PRJ_8_BASE								0
@@ -12,7 +12,7 @@
 #define   PRJ_1_SELF_LOCK_SWITCH    0
 #define   PRJ_TWIN_FIRE             0
 #define 	PRJ_ITK_8_CHANNEL					0
-#define   PRJ_2_2_BASE              1
+#define   PRJ_2_2_BASE              0
 #define   PRJ_8_NEW									0
 
 

+ 5 - 0
control/PDU-AC-COMBINE/App/Modbus/BARE/port/port.c

@@ -219,6 +219,11 @@ eMBRegHoldingCB( UCHAR * pucRegBuffer, USHORT usAddress, USHORT usNRegs, eMBRegi
 							uint32_t * base = (uint32_t *)(&AC_Ele_ReadReg_All);
 							base += base_addr;
 							memcpy(&usRegHoldBuf[iRegIndex],base,usNRegs*2);
+						}else if((usAddress>=AC_Sing_Thr_SmaAddr)&&(usAddress<=AC_Sing_Thr_SmaAddr+AC_Sing_Thr_SmaQua))
+						{
+								WeeiRegIndex = (int)(usAddress - AC_Sing_Thr_SmaAddr);
+								Chal_num = (usAddress-AC_Sing_Thr_SmaAddr)/16;
+								memcpy(&usRegHoldBuf[WiRegIndex],&EE_ACDC_ThresVal_ReadReg[Chal_num],WusNRegs*2);
 						}