Auto start by default, implement start of modes

This commit is contained in:
Andrew Stewart 2014-09-08 15:28:16 -07:00
parent 70bd524ebe
commit c182c1316e
1 changed files with 2 additions and 2 deletions

View File

@ -120,9 +120,9 @@ var Robot = module.exports = function Robot(opts) {
this.commands = opts.commands;
}
var auto_start = Utils.fetch(Config, 'auto_start', true);
var mode = Utils.fetch(Config, 'mode', 'auto_start');
if (auto_start) {
if (mode === 'auto_start') {
// run on the next tick, to allow for 'work' event handlers to be set up
setTimeout(this.start, 0);
}