Lint (remove logs, add spaces)

This commit is contained in:
Eric Rosenbaum 2019-06-27 15:48:30 -04:00
parent 3712b6fe72
commit 4bf5f85d9a
7 changed files with 12 additions and 40 deletions

View file

@ -826,8 +826,6 @@ class Boost {
* Disconnects from the current BLE socket and resets state. * Disconnects from the current BLE socket and resets state.
*/ */
disconnect () { disconnect () {
console.log('BOOST DISCONNECT CALLED');
if (this._ble) { if (this._ble) {
this._ble.disconnect(); this._ble.disconnect();
} }
@ -839,8 +837,6 @@ class Boost {
* Reset all the state and timeout/interval ids. * Reset all the state and timeout/interval ids.
*/ */
reset () { reset () {
console.log('BOOST RESET CALLED');
this._ports = []; this._ports = [];
this._motors = []; this._motors = [];
this._sensors = { this._sensors = {

View file

@ -600,8 +600,6 @@ class EV3 {
* Called by the runtime when user wants to disconnect from the EV3 peripheral. * Called by the runtime when user wants to disconnect from the EV3 peripheral.
*/ */
disconnect () { disconnect () {
console.log('EV3 DISCONNECT CALLED');
if (this._bt) { if (this._bt) {
this._bt.disconnect(); this._bt.disconnect();
} }
@ -613,8 +611,6 @@ class EV3 {
* Reset all the state and timeout/interval ids. * Reset all the state and timeout/interval ids.
*/ */
reset () { reset () {
console.log('EV3 RESET CALLED');
this._sensorPorts = []; this._sensorPorts = [];
this._motorPorts = []; this._motorPorts = [];
this._sensors = { this._sensors = {

View file

@ -210,8 +210,6 @@ class GdxFor {
* Disconnect from the GDX FOR. * Disconnect from the GDX FOR.
*/ */
disconnect () { disconnect () {
console.log('GDXFOR DISCONNECT CALLED');
if (this._ble) { if (this._ble) {
this._ble.disconnect(); this._ble.disconnect();
} }
@ -223,8 +221,6 @@ class GdxFor {
* Reset all the state and timeout/interval ids. * Reset all the state and timeout/interval ids.
*/ */
reset () { reset () {
console.log('GDXFOR RESET CALLED');
this._sensors = { this._sensors = {
force: 0, force: 0,
accelerationX: 0, accelerationX: 0,

View file

@ -239,8 +239,6 @@ class MicroBit {
* Disconnect from the micro:bit. * Disconnect from the micro:bit.
*/ */
disconnect () { disconnect () {
console.log('MICROBIT DISCONNECT CALLED');
if (this._ble) { if (this._ble) {
this._ble.disconnect(); this._ble.disconnect();
} }
@ -252,8 +250,6 @@ class MicroBit {
* Reset all the state and timeout/interval ids. * Reset all the state and timeout/interval ids.
*/ */
reset () { reset () {
console.log('MICROBIT RESET CALLED');
if (this._timeoutID) { if (this._timeoutID) {
window.clearTimeout(this._timeoutID); window.clearTimeout(this._timeoutID);
this._timeoutID = null; this._timeoutID = null;

View file

@ -610,8 +610,6 @@ class WeDo2 {
* Disconnects from the current BLE socket. * Disconnects from the current BLE socket.
*/ */
disconnect () { disconnect () {
console.log('WEDO2 DISCONNECT CALLED');
if (this._ble) { if (this._ble) {
this._ble.disconnect(); this._ble.disconnect();
} }
@ -623,8 +621,6 @@ class WeDo2 {
* Reset all the state and timeout/interval ids. * Reset all the state and timeout/interval ids.
*/ */
reset () { reset () {
console.log('WEDO2 RESET CALLED');
this._ports = ['none', 'none']; this._ports = ['none', 'none'];
this._motors = [null, null]; this._motors = [null, null];
this._sensors = { this._sensors = {

View file

@ -72,8 +72,6 @@ class BLE extends JSONRPC {
* Close the websocket. * Close the websocket.
*/ */
disconnect () { disconnect () {
console.log('BLE DISCONNECT CALLED');
if (this._connected) { if (this._connected) {
this._connected = false; this._connected = false;
} }
@ -203,10 +201,8 @@ class BLE extends JSONRPC {
* Disconnect the socket, and if the extension using this socket has a * Disconnect the socket, and if the extension using this socket has a
* reset callback, call it. Finally, emit an error to the runtime. * reset callback, call it. Finally, emit an error to the runtime.
*/ */
handleDisconnectError (e) { handleDisconnectError (/* e */) {
console.error(`BLE error: ${JSON.stringify(e)}`); // log.error(`BLE error: ${JSON.stringify(e)}`);
console.error(e);
console.log('BLE HANDLEDISCONNECTERROR CALLED');
if (!this._connected) return; if (!this._connected) return;

View file

@ -79,8 +79,6 @@ class BT extends JSONRPC {
* Close the websocket. * Close the websocket.
*/ */
disconnect () { disconnect () {
console.log('BT DISCONNECT CALLED');
if (this._connected) { if (this._connected) {
this._connected = false; this._connected = false;
} }
@ -149,10 +147,8 @@ class BT extends JSONRPC {
* Disconnect the socket, and if the extension using this socket has a * Disconnect the socket, and if the extension using this socket has a
* reset callback, call it. Finally, emit an error to the runtime. * reset callback, call it. Finally, emit an error to the runtime.
*/ */
handleDisconnectError (e) { handleDisconnectError (/* e */) {
console.error(`BT error: ${JSON.stringify(e)}`); // log.error(`BT error: ${JSON.stringify(e)}`);
console.error(e);
console.log('BT HANDLEDISCONNECTERROR CALLED');
if (!this._connected) return; if (!this._connected) return;