Improved MeshCMD starting of LMS console messages.

This commit is contained in:
Ylian Saint-Hilaire 2021-07-14 12:17:43 -07:00
parent eacef6f848
commit c21c9efb21

View File

@ -1501,11 +1501,10 @@ function startLms(func, lmscommander, tag) {
amtMei.on('error', function (e) { console.log('ERROR: ' + e); exit(1); return; }); amtMei.on('error', function (e) { console.log('ERROR: ' + e); exit(1); return; });
//console.log("PTHI Connected."); //console.log("PTHI Connected.");
console.log('Setting up LME...');
try { amtLms = new lme_heci({ debug: settings.lmsdebug }); } catch (ex) { if (func != null) { func(0, tag); } return; } try { amtLms = new lme_heci({ debug: settings.lmsdebug }); } catch (ex) { if (func != null) { func(0, tag); } return; }
amtLms.promise = ret; amtLms.promise = ret;
amtLms.on('error', function (e) { amtLms.on('error', function (e) {
console.log('LME connection failed', e); //console.log('LME connection failed', e);
if (lmscommander === true) { //settings.noconsole !== true) { if (lmscommander === true) { //settings.noconsole !== true) {
startMeshCommanderLms(); startMeshCommanderLms();
//console.log("LMS started, MeshCommander on HTTP/16994."); //console.log("LMS started, MeshCommander on HTTP/16994.");
@ -1530,7 +1529,7 @@ function startLms(func, lmscommander, tag) {
//console.log('LME Connecting...'); //console.log('LME Connecting...');
amtLms.on('bind', function (mapping) { amtLms.on('bind', function (mapping) {
if (mapping[16992]) { this.removeAllListeners('bind'); } else { return; } if (mapping[16992]) { this.removeAllListeners('bind'); } else { return; }
//console.log('LMS Bounded'); console.log('Started LMS...');
amtLms.connected = true; amtLms.connected = true;
this.promise._res(); this.promise._res();