|
|
@@ -476,8 +476,8 @@ void switch_recode()
|
|
|
{
|
|
|
handle_status[i] = EE_ACDC_State_ReadReg[i].ACDC_Cha_On_Off_State;
|
|
|
EE_ACDC_State_ReadReg[i].ACDC_Cha_On_Off_State = false;
|
|
|
- AT24CxxWrite(Eepr_AC_Sing_State_SmaWAddr+k*2,(uint8_t *)&EE_ACDC_State_ReadReg[k],2);
|
|
|
- RelayState_ch(k);
|
|
|
+ AT24CxxWrite(Eepr_AC_Sing_State_SmaWAddr+i*2,(uint8_t *)&EE_ACDC_State_ReadReg[i],2);
|
|
|
+ RelayState_ch(i);
|
|
|
}
|
|
|
handle_detection[0] = 0;
|
|
|
}
|
|
|
@@ -489,7 +489,7 @@ void switch_recode()
|
|
|
EE_ACDC_State_ReadReg[0].ACDC_ALLCha_On_State=true;
|
|
|
for(int i = 0;i < RelaySlaveChaNum;i++){
|
|
|
EE_ACDC_State_ReadReg[i].ACDC_Cha_On_Off_State=handle_status[i];
|
|
|
- AT24CxxWrite(Eepr_AC_Sing_State_SmaWAddr+k*2,(uint8_t *)&EE_ACDC_State_ReadReg[k],2);
|
|
|
+ AT24CxxWrite(Eepr_AC_Sing_State_SmaWAddr+i*2,(uint8_t *)&EE_ACDC_State_ReadReg[i],2);
|
|
|
}
|
|
|
|
|
|
All_On_Flag = 1;
|