Commit c4e76708 authored by claes's avatar claes

Bell bit in EventFlags handled

parent 7c8331f2
......@@ -643,7 +643,7 @@ void EvList::beep( double scantime)
if ( acc_beep_time >= beep_interval)
acc_beep_time = 0;
sts = get_last_not_acked( &id);
sts = get_last_not_acked_beep( &id);
if ( ODD(sts))
{
if ( acc_beep_time == 0)
......@@ -1153,6 +1153,33 @@ int EvList::get_last_not_acked( mh_sEventId **id)
return 0;
}
int EvList::get_last_not_acked_beep( mh_sEventId **id)
{
int i;
brow_tObject *object_list;
int object_cnt;
ItemAlarm *object_item;
brow_GetObjectList( brow->ctx, &object_list, &object_cnt);
for ( i = 0; i < object_cnt; i++)
{
brow_GetUserData( object_list[i], (void **)&object_item);
switch( object_item->type)
{
case evlist_eItemType_Alarm:
if ( object_item->status & mh_mEventStatus_NotAck &&
object_item->eventflags & mh_mEventFlags_Bell) {
*id = &object_item->eventid;
return 1;
}
break;
default:
;
}
}
return 0;
}
int EvList::get_last_not_acked_prio( mh_sEventId **id, unsigned long type,
unsigned long prio)
{
......
......@@ -149,6 +149,7 @@ class EvList {
void event_return( mh_sReturn *msg);
void event_clear_alarmlist( pwr_tNodeIndex nix);
int get_last_not_acked( mh_sEventId **id);
int get_last_not_acked_beep( mh_sEventId **id);
int id_to_item( mh_sEventId *id, void **item);
void ack( mh_sEventId *id);
void set_input_focus();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment