diff --git a/src/actionlib/SimpleActionServer.js b/src/actionlib/SimpleActionServer.js index 49a821c14..6ce70a870 100644 --- a/src/actionlib/SimpleActionServer.js +++ b/src/actionlib/SimpleActionServer.js @@ -77,7 +77,7 @@ function SimpleActionServer(options) { this.nextGoal = null; // the one that'll be preempting goalListener.subscribe(function(goalMessage) { - + if(that.currentGoal) { that.nextGoal = goalMessage; // needs to happen AFTER rest is set up @@ -128,7 +128,7 @@ function SimpleActionServer(options) { } if(that.currentGoal && isEarlier(that.currentGoal.goal_id.stamp, cancelMessage.stamp)) { - + that.emit('cancel'); } } @@ -153,7 +153,7 @@ SimpleActionServer.prototype.__proto__ = EventEmitter2.prototype; */ SimpleActionServer.prototype.setSucceeded = function(result2) { - + var resultMessage = new Message({ status : {goal_id : this.currentGoal.goal_id, status : 3}, @@ -226,4 +226,4 @@ SimpleActionServer.prototype.setPreempted = function() { } }; -module.exports = SimpleActionServer; +module.exports = SimpleActionServer; \ No newline at end of file diff --git a/src/actionlib/index.js b/src/actionlib/index.js index 3816340e0..032bd86ea 100644 --- a/src/actionlib/index.js +++ b/src/actionlib/index.js @@ -5,6 +5,7 @@ var action = module.exports = { ActionClient: require('./ActionClient'), ActionListener: require('./ActionListener'), Goal: require('./Goal'), + SimpleActionServer: require('./SimpleActionServer'), }; mixin(Ros, ['ActionClient', 'SimpleActionServer'], action); diff --git a/test/examples/fibonacci.example.js b/test/examples/fibonacci.example.js index 783fa6b6f..16c1bce52 100644 --- a/test/examples/fibonacci.example.js +++ b/test/examples/fibonacci.example.js @@ -52,4 +52,4 @@ describe('Fibonacci Example', function() { goal.send(); }, 100); }); -}); +}); \ No newline at end of file