From 749ae9cee0ec30ed322adb6efcce1ad552fa552d Mon Sep 17 00:00:00 2001 From: Martin Donnelly Date: Sun, 4 Nov 2018 13:57:57 +0000 Subject: [PATCH] added motion detection --- src/service-worker.js | 2 +- src/v1/js/Location.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/service-worker.js b/src/service-worker.js index 208ef48..611dccb 100644 --- a/src/service-worker.js +++ b/src/service-worker.js @@ -11,7 +11,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -const CACHE_VERSION = { 'version': '0.0.975' }; +const CACHE_VERSION = { 'version': '0.0.976' }; const PRECACHE = `jubileeData-${CACHE_VERSION.version}`; const RUNTIME = 'runtime'; diff --git a/src/v1/js/Location.js b/src/v1/js/Location.js index 7a3184a..3ef5ddc 100644 --- a/src/v1/js/Location.js +++ b/src/v1/js/Location.js @@ -102,6 +102,8 @@ const LocationModel = Backbone.Model.extend({ console.log('time dif', timeS); console.log('t', TimeFormat.fromMs((ts - motion.prev.ts), 'hh:mm:ss')); + console.log('now ts', ts); + motion.prev = Object.assign({}, motion.cur); motion.cur.lat = latitude; motion.cur.lon = longitude;