Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
512c4ecc
Commit
512c4ecc
authored
Oct 20, 2016
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xtt satellite alarm and event list, bugfix when event is rmoved
parent
59e12976
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
17 deletions
+38
-17
xtt/lib/xtt/src/xtt_evlist.cpp
xtt/lib/xtt/src/xtt_evlist.cpp
+38
-17
No files found.
xtt/lib/xtt/src/xtt_evlist.cpp
View file @
512c4ecc
...
...
@@ -1177,10 +1177,12 @@ void EvList::event_ack( mh_sAck *msg)
item
->
update_text
(
1
);
}
else
{
brow_tObject
item_tree_node
=
item
->
tree_node
;
brow_DeleteNode
(
browbase
->
ctx
,
item
->
node
);
if
(
browtree
)
{
if
(
item
->
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
->
tree_node
);
if
(
item
_
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
_
tree_node
);
view_configure
();
}
size
--
;
...
...
@@ -1196,10 +1198,12 @@ void EvList::event_ack( mh_sAck *msg)
item
->
update_text
(
1
);
}
else
{
brow_tObject
item_tree_node
=
item
->
tree_node
;
brow_DeleteNode
(
browbase
->
ctx
,
item
->
node
);
if
(
browtree
)
{
if
(
item
->
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
->
tree_node
);
if
(
item
_
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
_
tree_node
);
view_configure
();
}
size
--
;
...
...
@@ -1263,10 +1267,12 @@ void EvList::event_return( mh_sReturn *msg)
item
->
update_text
(
1
);
}
else
{
brow_tObject
item_tree_node
=
item
->
tree_node
;
brow_DeleteNode
(
browbase
->
ctx
,
item
->
node
);
if
(
browtree
)
{
if
(
item
->
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
->
tree_node
);
if
(
item
_
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
_
tree_node
);
view_configure
();
}
size
--
;
...
...
@@ -1279,14 +1285,19 @@ int EvList::event_delete( mh_sEventId *id)
if
(
type
==
ev_eType_AlarmList
)
{
// Alarmlist
ItemAlarm
*
item
;
brow_tObject
item_tree_node
;
if
(
!
id_to_item
(
id
,
(
void
**
)
&
item
))
return
0
;
item_tree_node
=
item
->
tree_node
;
brow_DeleteNode
(
browbase
->
ctx
,
item
->
node
);
// Note, item is deleted now
if
(
browtree
)
{
if
(
item
->
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
->
tree_node
);
if
(
item
_
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
_
tree_node
);
view_configure
();
}
size
--
;
...
...
@@ -1320,10 +1331,11 @@ void EvList::event_clear_alarmlist( pwr_tNodeIndex nix)
switch
(
object_item
->
type
)
{
case
evlist_eItemType_Alarm
:
if
(
object_item
->
eventid
.
Nix
==
nix
)
{
brow_tObject
item_tree_node
=
object_item
->
tree_node
;
brow_DeleteNode
(
browbase
->
ctx
,
object_item
->
node
);
if
(
browtree
)
{
if
(
object_item
->
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
object_item
->
tree_node
);
if
(
item_
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item_
tree_node
);
view_configure
();
}
}
...
...
@@ -1926,14 +1938,18 @@ ItemAlarm::ItemAlarm( EvList *item_evlist, const char *item_name, pwr_tTime item
brow_GetUserData
(
last_node
,
(
void
**
)
&
item
);
int
item_type
=
item
->
type
;
brow_tObject
item_tree_node
=
item
->
tree_node
;
brow_DeleteNode
(
evlist
->
browbase
->
ctx
,
last_node
);
if
(
item
->
type
==
evlist_eItemType_Alarm
&&
evlist
->
browtree
)
{
if
(
item
->
tree_node
)
brow_DeleteNode
(
evlist
->
browtree
->
ctx
,
item
->
tree_node
);
evlist
->
view_configure
();
}
// Note! This ItemAlarm might be deleted by now if node == last_node
if
(
item_type
==
evlist_eItemType_Alarm
&&
item_evlist
->
browtree
)
{
if
(
item_tree_node
)
brow_DeleteNode
(
item_evlist
->
browtree
->
ctx
,
item_tree_node
);
item_evlist
->
view_configure
();
}
item_evlist
->
size
--
;
}
}
...
...
@@ -2825,6 +2841,7 @@ int EvList::oid_to_item( pwr_tOid oid, void **item)
void
EvList
::
ack
(
mh_sEventId
*
id
)
{
ItemAlarm
*
item
;
brow_tObject
item_tree_node
;
if
(
!
id_to_item
(
id
,
(
void
**
)
&
item
))
return
;
...
...
@@ -2838,10 +2855,14 @@ void EvList::ack( mh_sEventId *id)
else
if
(
type
==
ev_eType_AlarmList
)
{
// Detete the item from the alarm list
item_tree_node
=
item
->
tree_node
;
brow_DeleteNode
(
browbase
->
ctx
,
item
->
node
);
// Note! item is deleted now
if
(
browtree
)
{
if
(
item
->
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
->
tree_node
);
if
(
item
_
tree_node
)
brow_DeleteNode
(
browtree
->
ctx
,
item
_
tree_node
);
view_configure
();
}
size
--
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment