Лампы синхронизированы с внешним управлением

This commit is contained in:
2026-09-07 15:55:44 +03:00
parent fc7ba0c968
commit 3e1deb0f5d
8 changed files with 972 additions and 969 deletions

View File

@@ -58,7 +58,7 @@ interrupt void cpu_timer1_isr_SENS()
blink_over, blink_alarm, work_lamp, heat_lamp;
int TST;
static int preTest;
static int preTest,preLite1,preLite2;
EALLOW;
CpuTimer1.InterruptCount++;
@@ -96,12 +96,14 @@ interrupt void cpu_timer1_isr_SENS()
if(count_bright == Bright[1]) clear_LED_OUT_2();
}
if(TST & !preTest)
{
count_blink = BLINK_TIME;
count_mode = 0;
}
preTest = TST;
if(TST!=preTest||preLite1!=Light[0]||preLite2!=Light[1])
{
count_blink = BLINK_TIME;
count_mode = 0;
}
preTest = TST;
preLite1 = Light[0];
preLite2 = Light[1];
if(++count_blink >= BLINK_TIME)
{