diff --git a/.gitignore b/.gitignore index 9902c78..c44bdb6 100644 --- a/.gitignore +++ b/.gitignore @@ -179,3 +179,4 @@ xcuserdata dist www/libs +/www/ diff --git a/www/css/app.css b/app/css/app.css similarity index 100% rename from www/css/app.css rename to app/css/app.css diff --git a/www/css/index.css b/app/css/index.css similarity index 100% rename from www/css/index.css rename to app/css/index.css diff --git a/www/css/material-icons.css b/app/css/material-icons.css similarity index 100% rename from www/css/material-icons.css rename to app/css/material-icons.css diff --git a/www/css/mui.css b/app/css/mui.css similarity index 100% rename from www/css/mui.css rename to app/css/mui.css diff --git a/www/css/mui.custom.css b/app/css/mui.custom.css similarity index 100% rename from www/css/mui.custom.css rename to app/css/mui.custom.css diff --git a/www/css/mui.min.css b/app/css/mui.min.css similarity index 100% rename from www/css/mui.min.css rename to app/css/mui.min.css diff --git a/www/css/progress.css b/app/css/progress.css similarity index 100% rename from www/css/progress.css rename to app/css/progress.css diff --git a/www/css/ripple.css b/app/css/ripple.css similarity index 100% rename from www/css/ripple.css rename to app/css/ripple.css diff --git a/www/fonts/Material_Icons-normal-400.woff b/app/fonts/Material_Icons-normal-400.woff similarity index 100% rename from www/fonts/Material_Icons-normal-400.woff rename to app/fonts/Material_Icons-normal-400.woff diff --git a/www/fonts/Ubuntu-normal-300.woff b/app/fonts/Ubuntu-normal-300.woff similarity index 100% rename from www/fonts/Ubuntu-normal-300.woff rename to app/fonts/Ubuntu-normal-300.woff diff --git a/www/fonts/Ubuntu-normal-400.woff b/app/fonts/Ubuntu-normal-400.woff similarity index 100% rename from www/fonts/Ubuntu-normal-400.woff rename to app/fonts/Ubuntu-normal-400.woff diff --git a/www/fonts/Ubuntu-normal-500.woff b/app/fonts/Ubuntu-normal-500.woff similarity index 100% rename from www/fonts/Ubuntu-normal-500.woff rename to app/fonts/Ubuntu-normal-500.woff diff --git a/www/fonts/Ubuntu-normal-700.woff b/app/fonts/Ubuntu-normal-700.woff similarity index 100% rename from www/fonts/Ubuntu-normal-700.woff rename to app/fonts/Ubuntu-normal-700.woff diff --git a/www/fonts/Ubuntu_Condensed-normal-400.woff b/app/fonts/Ubuntu_Condensed-normal-400.woff similarity index 100% rename from www/fonts/Ubuntu_Condensed-normal-400.woff rename to app/fonts/Ubuntu_Condensed-normal-400.woff diff --git a/www/fonts/fonts.css b/app/fonts/fonts.css similarity index 100% rename from www/fonts/fonts.css rename to app/fonts/fonts.css diff --git a/www/img/logo.png b/app/img/logo.png similarity index 100% rename from www/img/logo.png rename to app/img/logo.png diff --git a/www/index.html b/app/index.html similarity index 100% rename from www/index.html rename to app/index.html diff --git a/www/js/device/CC2650/cc2650_accelerometer.js b/app/js/device/CC2650/cc2650_accelerometer.js similarity index 94% rename from www/js/device/CC2650/cc2650_accelerometer.js rename to app/js/device/CC2650/cc2650_accelerometer.js index 1bcd4a0..653abfa 100644 --- a/www/js/device/CC2650/cc2650_accelerometer.js +++ b/app/js/device/CC2650/cc2650_accelerometer.js @@ -5,7 +5,7 @@ * Time: 10:13 * */ -/* global CAPABILITY, inheritsFrom */ +/* global CAPABILITY, inheritsFrom, capabilityManager */ /* global ble */ /* jshint browser: true , devel: true*/ @@ -44,15 +44,15 @@ var CC2650_ACCEL = function(p) { var message; var a = new Int16Array(data); - //0 gyro x - //1 gyro y - //2 gyro z - //3 accel x - //4 accel y - //5 accel z - //6 mag x - //7 mag y - //8 mag z + // 0 gyro x + // 1 gyro y + // 2 gyro z + // 3 accel x + // 4 accel y + // 5 accel z + // 6 mag x + // 7 mag y + // 8 mag z // TODO get a template to line this up // TODO round or format numbers for better display @@ -87,7 +87,7 @@ var CC2650_ACCEL = function(p) { }; this.startService = function() { - 'use strict'; + if (this.deviceID !== null) { console.log('Starting CC2650 Accelerometer Service on ', this.deviceID); @@ -172,4 +172,4 @@ var CC2650_ACCEL = function(p) { inheritsFrom(CC2650_ACCEL, CAPABILITY); -capabilityManager.register({id:'F000AA80-0451-4000-B000-000000000000', module:CC2650_ACCEL}); +capabilityManager.register({id: 'F000AA80-0451-4000-B000-000000000000', module: CC2650_ACCEL}); diff --git a/www/js/device/CC2650/cc2650_barometer.js b/app/js/device/CC2650/cc2650_barometer.js similarity index 84% rename from www/js/device/CC2650/cc2650_barometer.js rename to app/js/device/CC2650/cc2650_barometer.js index 05c33c4..2b957a6 100644 --- a/www/js/device/CC2650/cc2650_barometer.js +++ b/app/js/device/CC2650/cc2650_barometer.js @@ -5,7 +5,7 @@ * Time: 10:13 * */ -/* global CAPABILITY, inheritsFrom */ +/* global CAPABILITY, inheritsFrom, capabilityManager */ /* global ble */ /* jshint browser: true , devel: true*/ @@ -29,7 +29,7 @@ var CC2650_BAR = function(p) { this.setFrame(); this.startService = function() { - 'use strict'; + if (this.deviceID !== null) { console.log('Starting CC2650 Barometer Service on ', this.deviceID); @@ -38,7 +38,7 @@ var CC2650_BAR = function(p) { ble.startNotification(this.deviceID, this.serviceDef.service, this.serviceDef.data, this.onBarometerData.bind(this), this.onError); - //Turn on barometer + // Turn on barometer var barometerConfig = new Uint8Array(1); barometerConfig[0] = 0x01; ble.write(this.deviceID, this.serviceDef.service, this.serviceDef.configuration, barometerConfig.buffer, @@ -59,8 +59,8 @@ var CC2650_BAR = function(p) { var message; var a = new Uint8Array(data); - //0-2 Temp - //3-5 Pressure + // 0-2 Temp + // 3-5 Pressure var temp, pressure; temp = this.sensorBarometerConvert(a[0] | (a[1] << 8) | (a[2] << 16)); pressure = this.sensorBarometerConvert(a[3] | (a[4] << 8) | (a[5] << 16)); @@ -111,18 +111,18 @@ var CC2650_BAR = function(p) { this.$id.append(row); var tabBody = $('