|
|
@@ -1372,12 +1372,23 @@ static int power_update(cascade_handle_t *cas)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
if (!list_empty(&dm2->_globalPowerManger.list))
|
|
|
{
|
|
|
cnt = 0;
|
|
|
list_for_each_entry(tmp, &dm2->_globalPowerManger.list, list)
|
|
|
{
|
|
|
tmp->_PowerInfo = info->ch[cnt].chinfo;
|
|
|
+ tmp->product_ch_id = info->ch[cnt].product_ch_id; // 通道号
|
|
|
+ tmp->product_ch_addr = info->ch[cnt].product_ch_addr; // 通道号实际地址
|
|
|
+ tmp->product_ch_type = info->ch[cnt].product_ch_type; // 通道类型
|
|
|
+ tmp->product_ch_status = info->ch[cnt].product_ch_status; // 通道状态
|
|
|
+ tmp->product_ch_NF_status = info->ch[cnt].product_ch_NF_status; // 通道零线状态(三相)
|
|
|
+ tmp->product_ch_start_delay = info->ch[cnt].start_delay; // 通道延时
|
|
|
+ tmp->product_ch_stop_delay = info->ch[cnt].stop_delay; // 通道延时
|
|
|
+
|
|
|
if (tmp->product_ch_type == TREE_AC_TYPE || tmp->product_ch_type == DOUBLE_AC_TYPE || info->prod.product_pwr_type == SmartPDU_Tree_AC_One_B)
|
|
|
{
|
|
|
if (list_empty(&tmp->list_Tree_AC))
|
|
|
@@ -1388,7 +1399,15 @@ static int power_update(cascade_handle_t *cas)
|
|
|
int cnt2 = 0;
|
|
|
list_for_each_entry(tmp3, &tmp->list_Tree_AC, list_Tree_AC)
|
|
|
{
|
|
|
- tmp3->_PowerInfo = info->ch[cnt].pinfo[cnt2++].power;
|
|
|
+ if (cnt2 >= 0 && cnt2 < 3)
|
|
|
+ {
|
|
|
+ tmp3->_PowerInfo = info->ch[cnt].pinfo[cnt2].power;
|
|
|
+ tmp3->product_ph_id = info->ch[cnt].pinfo[cnt2].phase.product_ph_id; // 产品通道号
|
|
|
+ tmp3->product_ph_type = info->ch[cnt].pinfo[cnt2].phase.product_ph_type; // 0:A相 1:B相 2:C相
|
|
|
+ tmp3->product_ph_outputType = info->ch[cnt].pinfo[cnt2].phase.product_ph_outputType; // 三相控制方式1,三项2单项
|
|
|
+ tmp3->product_ph_outputStatus = info->ch[cnt].pinfo[cnt2].phase.product_ph_outputStatus; // 该相是否输出,1输出2不输出
|
|
|
+ }
|
|
|
+ cnt2++;
|
|
|
}
|
|
|
}
|
|
|
cnt++;
|