noble/node-red-contrib-noble.js
function startScan(stateChange, error) {
            if (!node.scanning) {
                // send status message
                var msg = {
                    statusUpdate: true,
                    error: error,
                    stateChange: stateChange,
                    state: noble.state
                };
                node.send(msg);
                // start the scan
                noble.startScanning(node.uuids, node.duplicates, function() {
                    node.log("Scanning for BLEs started. UUIDs: " + node.uuids + " - Duplicates allowed: " + node.duplicates);
                    node.status({fill:"green",shape:"dot",text:"started"});
                    node.scanning = true;
                });
            }
        }
function startScan(stateChange, error) {
            if (!node.scanning) {
                // send status message
                var msg = {
                    statusUpdate: true,
                    error: error,
                    stateChange: stateChange,
                    state: noble.state
                };
                node.send(msg);
                // start the scan
                noble.startScanning(node.uuids, node.duplicates, function() {
                    node.log("Scanning for BLEs started. UUIDs: " + node.uuids + " - Duplicates allowed: " + node.duplicates);
                    node.status({fill:"green",shape:"dot",text:"started"});
                    node.scanning = true;
                });
            }
        }
function startScan ( stateChange , error ) { if ( ! node . scanning ) { // send status message var msg = { statusUpdate : true , error : error , stateChange : stateChange , state : noble . state } ; node . send ( msg ) ; // start the scan noble . startScanning ( node . uuids , node . duplicates , function ( ) { node . log ( "Scanning for BLEs started. UUIDs: " + node . uuids + " - Duplicates allowed: " + node . duplicates ) ; node . status ( { fill : "green" , shape : "dot" , text : "started" } ) ; node . scanning = true ; } ) ; } }
Take care of starting the scan and sending the status message
Take care of starting the scan and sending the status message