This commit is contained in:
2025-11-15 19:16:26 +03:00
parent 69ae4f8cf2
commit 0a017eee9f
6 changed files with 33 additions and 28 deletions

View File

@@ -433,8 +433,8 @@ FuncStat value_control(void )
{
MB_DATA.Coils.coils[0].all |= 1 << i;
MB_DATA.Coils.coils[1].all &= ~(1 << i);
MB_DATA.Coils.relay_struct_off.all |= 1 << i;
MB_DATA.Coils.relay_struct_on.all &= ~(1 << i);
}
@@ -444,11 +444,19 @@ FuncStat value_control(void )
if (sens[i].temperature > sens[i].set_temp + sens[i].hyst)
{
MB_DATA.Coils.coils[0].all &= ~(1 << i);
MB_DATA.Coils.coils[1].all |= 1 << i;
MB_DATA.Coils.relay_struct_off.all &= ~(1 << i);
MB_DATA.Coils.relay_struct_on.all |= 1 << i;
}
else
if (sens[i].temperature == sens[i].set_temp )
{
MB_DATA.Coils.relay_struct_on.all &= ~(1 << i);
MB_DATA.Coils.relay_struct_off.all &= ~(1 << i);
}
}