diff --git a/lib/robot.js b/lib/robot.js index 4fffbc1..f252dd4 100644 --- a/lib/robot.js +++ b/lib/robot.js @@ -136,14 +136,15 @@ Robot.prototype.connection = function(name, conn) { */ Robot.prototype.initRobot = function(opts) { this.name = opts.name || "Robot " + ROBOT_ID++; + this.running = false; + this.connections = {}; this.devices = {}; - this.adaptors = {}; - this.drivers = {}; - this.commands = {}; - this.running = false; + this.work = opts.work || opts.play; + this.commands = {}; + if (!this.work) { this.work = function() { this.log("debug", "No work yet."); }; }