Skip to content

Commit

Permalink
Partial implementation for RobotWebTools#35. Send 'latch' parameter t…
Browse files Browse the repository at this point in the history
…o publish and advetise commands
  • Loading branch information
Julian Cerruti committed Feb 12, 2014
1 parent ea9c9a4 commit 7564840
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/core/Topic.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ROSLIB.Topic = function(options) {
this.isAdvertised = false;
this.compression = options.compression || 'none';
this.throttle_rate = options.throttle_rate || 0;
this.latch = options.latch || false;

// Check for valid compression types
if (this.compression && this.compression !== 'png' && this.compression !== 'none') {
Expand Down Expand Up @@ -99,7 +100,8 @@ ROSLIB.Topic.prototype.advertise = function() {
op : 'advertise',
id : advertiseId,
type : this.messageType,
topic : this.name
topic : this.name,
latch : this.latch
};
this.ros.callOnConnection(call);
this.isAdvertised = true;
Expand Down Expand Up @@ -136,7 +138,8 @@ ROSLIB.Topic.prototype.publish = function(message) {
op : 'publish',
id : publishId,
topic : this.name,
msg : message
msg : message,
latch : this.latch
};
this.ros.callOnConnection(call);
};

0 comments on commit 7564840

Please sign in to comment.