|
|
@@ -1843,20 +1843,27 @@ static void *cmd_thread(void *arg)
|
|
|
if (pcmd->chId == 0xff)
|
|
|
{
|
|
|
int sendAddr = 0;
|
|
|
+ uint8_t saddr_flag[128] = {0};
|
|
|
+
|
|
|
for (i = 0; i < info->cnt; i++)
|
|
|
{
|
|
|
- if (info->ch[i].product_ch_addr > 0)
|
|
|
+ if (info->ch[i].product_saddr > 0)
|
|
|
{
|
|
|
- if (info->ch[i].product_ch_addr == sendAddr)
|
|
|
- {
|
|
|
+ // if (info->ch[i].product_ch_addr == sendAddr)
|
|
|
+ // {
|
|
|
+ // continue;
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // {
|
|
|
+ // sendAddr = info->ch[i].product_ch_addr;
|
|
|
+
|
|
|
+ // }
|
|
|
+ if(saddr_flag[info->ch[i].product_saddr])
|
|
|
continue;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- sendAddr = info->ch[i].product_ch_addr;
|
|
|
- }
|
|
|
-
|
|
|
- t = g_switch_set_all_ctrl(&dm->_globalRelaySampManger, info->ch[i].product_ch_type, info->ch[i].product_ch_addr, flag);
|
|
|
+ saddr_flag[info->ch[i].product_saddr] = 1;
|
|
|
+
|
|
|
+ t = g_switch_set_all_ctrl(&dm->_globalRelaySampManger, info->ch[i].product_ch_type, info->ch[i].product_saddr, flag);
|
|
|
+ LOGD("close or open addr %d \n",info->ch[i].product_ch_addr);
|
|
|
if (t < 0)
|
|
|
{
|
|
|
LOGE("___ %d %s failed\n", info->ch[i].product_ch_addr, (pcmd->cmd == CASCADE_CMD_OPEN) ? "open" : "close");
|