File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ ROSLIB.Topic = function(options) {
2525 this . isAdvertised = false ;
2626 this . compression = options . compression || 'none' ;
2727 this . throttle_rate = options . throttle_rate || 0 ;
28+ this . latch = options . latch || false ;
2829
2930 // Check for valid compression types
3031 if ( this . compression && this . compression !== 'png' && this . compression !== 'none' ) {
@@ -99,7 +100,8 @@ ROSLIB.Topic.prototype.advertise = function() {
99100 op : 'advertise' ,
100101 id : advertiseId ,
101102 type : this . messageType ,
102- topic : this . name
103+ topic : this . name ,
104+ latch : this . latch
103105 } ;
104106 this . ros . callOnConnection ( call ) ;
105107 this . isAdvertised = true ;
@@ -136,7 +138,8 @@ ROSLIB.Topic.prototype.publish = function(message) {
136138 op : 'publish' ,
137139 id : publishId ,
138140 topic : this . name ,
139- msg : message
141+ msg : message ,
142+ latch : this . latch
140143 } ;
141144 this . ros . callOnConnection ( call ) ;
142145} ;
You can’t perform that action at this time.
0 commit comments