|
@@ -70,6 +70,17 @@ void UPS_Monitor(void *params)
|
|
|
UPS_CriticalAlarmMonitor();
|
|
|
UPS_NonCriticalAlarmMonitor();
|
|
|
#endif
|
|
|
+#if defined HARDWARE_BT6706 || HARDWARE_BT6708
|
|
|
+ if(flCriticalAlarm){
|
|
|
+ if (UPS.Present)
|
|
|
+ LED_On(LED_MAJOR_R);
|
|
|
+ else
|
|
|
+ LED_Toggle(LED_MAJOR_R);
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ LED_Off(LED_MAJOR_R);
|
|
|
+ }
|
|
|
+#endif
|
|
|
|
|
|
vTaskDelay(1000);
|
|
|
}
|
|
@@ -168,7 +179,7 @@ void relay_setup_log_change(uint8_t *curr_source, uint8_t *prev_source, ro_type_
|
|
|
flUpdateLog = true;
|
|
|
SetROInt(0, i);
|
|
|
SNMP_SendUserTrap((DO0_TOGGLED+i));
|
|
|
- log_event_data((LOG_DO0_STATE + i), "Замкнуто");
|
|
|
+ log_event_data((LOG_DO0_STATE + i), "Замкнуто");
|
|
|
}
|
|
|
else{
|
|
|
flUpdateLog = true;
|
|
@@ -448,10 +459,9 @@ void UPS_VACoutputLowRangeMonitor(void)
|
|
|
/* Отслеживается переход через нижнию границу */
|
|
|
if (VACoutputCurrent < sSettings.sAlarmManager.ac_output_range.low)
|
|
|
{
|
|
|
+ flCriticalAlarm = true;
|
|
|
if (stateCurrentVACoutput == HYST_IDLE)
|
|
|
{
|
|
|
- LED_On(LED_MINOR_R);
|
|
|
- LED_On(LED_MINOR_G);
|
|
|
stateCurrentVACoutput = HYST_DOWN;
|
|
|
#if defined HARDWARE_BT6706
|
|
|
relay_setup_log(CurrROtype_Sourse, DC_PRESENT, 1);
|
|
@@ -472,8 +482,6 @@ void UPS_VACoutputLowRangeMonitor(void)
|
|
|
{
|
|
|
if (stateCurrentVACoutput == HYST_DOWN)
|
|
|
{
|
|
|
- LED_Off(LED_MINOR_R);
|
|
|
- LED_Off(LED_MINOR_G);
|
|
|
stateCurrentVACoutput = HYST_IDLE;
|
|
|
#if defined HARDWARE_BT6706
|
|
|
relay_setup_log(CurrROtype_Sourse, DC_PRESENT, 0);
|
|
@@ -517,10 +525,9 @@ void UPS_VACoutputHighRangeMonitor(void)
|
|
|
/* Отслеживается переход через верхнюю границу */
|
|
|
if (VACoutputCurrent > sSettings.sAlarmManager.ac_output_range.high)
|
|
|
{
|
|
|
+ flCriticalAlarm = true;
|
|
|
if (stateCurrentVACoutput == HYST_IDLE)
|
|
|
{
|
|
|
- LED_On(LED_MINOR_R);
|
|
|
- LED_On(LED_MINOR_G);
|
|
|
stateCurrentVACoutput = HYST_UP;
|
|
|
#if defined HARDWARE_BT6706
|
|
|
relay_setup_log(CurrROtype_Sourse, DC_PRESENT, 1);
|
|
@@ -541,8 +548,6 @@ void UPS_VACoutputHighRangeMonitor(void)
|
|
|
{
|
|
|
if (stateCurrentVACoutput == HYST_UP)
|
|
|
{
|
|
|
- LED_Off(LED_MINOR_R);
|
|
|
- LED_Off(LED_MINOR_G);
|
|
|
stateCurrentVACoutput = HYST_IDLE;
|
|
|
#if defined HARDWARE_BT6706
|
|
|
relay_setup_log(CurrROtype_Sourse, DC_PRESENT, 0);
|