Adding/fixing debug statements throughout.

This commit is contained in:
Evelyn Eastmond committed 2019-06-12 09:02:12 -04:00
1 parent a1243fd897
commit f8a0ea281f
2 files changed
+8 -3

No files matched your search

+4 -2
View File
@@ -599,7 +599,8 @@ class EV3 {
/**
* Called by the runtime when user wants to disconnect from the EV3 peripheral.
*/
disconnect () {
disconnect() {
console.log('EV3 DISCONNECT CALLED');
if (this._bt) {
this._bt.disconnect();
}
@@ -610,7 +611,8 @@ class EV3 {
/**
* Reset all the state and timeout/interval ids.
*/
reset () {
reset() {
console.log('EV3 RESET CALLED');
this._sensorPorts = [];
this._motorPorts = [];
this._sensors = {
+4 -1
View File
@@ -78,7 +78,9 @@ class BT extends JSONRPC {
/**
* Close the websocket.
*/
disconnect () {
disconnect() {
console.log('BT DISCONNECT CALLED');
if (this._connected) {
this._connected = false;
}
@@ -149,6 +151,7 @@ class BT extends JSONRPC {
*/
handleDisconnectError (/* e */) {
// log.error(`BT error: ${JSON.stringify(e)}`);
console.log('BT HANDLEDISCONNECTERROR CALLED');
if (!this._connected) return;