From d74e95a1985fcd4d615d193c9e408034e6ab0035 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Sun, 3 Sep 2017 20:44:17 -0600 Subject: [PATCH] Revert init seq in single write for now (VTX), return vc in helper --- core/menu_module.js | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/core/menu_module.js b/core/menu_module.js index 20b89212..884389ca 100644 --- a/core/menu_module.js +++ b/core/menu_module.js @@ -136,21 +136,13 @@ exports.MenuModule = class MenuModule extends PluginModule { } beforeArt(cb) { - let initSeq = ''; - if(_.isNumber(this.menuConfig.options.baudRate)) { // :TODO: some terminals not supporting cterm style emulated baud rate end up displaying a broken ESC sequence or a single "r" here this.client.term.rawWrite(ansi.setEmulatedBaudRate(this.menuConfig.options.baudRate)); - initSeq += ansi.setEmulatedBaudRate(this.menuConfig.options.baudRate); } if(this.cls) { this.client.term.rawWrite(ansi.resetScreen()); - initSeq += ansi.resetScreen(); - } - - if(initSeq) { - // this.client.term.rawWrite(initSeq); } return cb(null); @@ -333,11 +325,14 @@ exports.MenuModule = class MenuModule extends PluginModule { formId : formId, }; - return vc.loadFromMenuConfig(loadOpts, cb); + return vc.loadFromMenuConfig(loadOpts, err => { + return cb(err, vc); + }); } this.viewControllers[name].setFocus(true); - return cb(null); + + return cb(null, this.viewControllers[name]); } prepViewControllerWithArt(name, formId, options, cb) {