From 693b01ea6ce645d2951482ad941d285d2b3261c6 Mon Sep 17 00:00:00 2001 From: Kevron Rees Date: Mon, 16 Sep 2013 16:06:55 -0700 Subject: [PATCH] fix for when there is no vehicleSpeed don't throw Change-Id: I6416138a27c867c984e6241b4985a79226e858e0 --- business.js | 14 ++------------ packaging/GhostCluster.changes | 3 +++ packaging/GhostCluster.spec | 2 +- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/business.js b/business.js index f383e78..6e6e2b1 100644 --- a/business.js +++ b/business.js @@ -38,21 +38,11 @@ function calcAverageVelocity(newVel) { window.onload = function() { - var addy = "127.0.0.1:23000"; - var vehicle = tizen.vehicle var vehicleSpeed = vehicle.get("VehicleSpeed"); - console.log("Vehicle speed: " + vehicleSpeed.vehicleSpeed); - - if(typeof(Storage)!== "undefined") - { - addyTemp = localStorage.address; - if(addyTemp !== undefined) addy = addyTemp; - } - - $("#address").val(addy); - $("#address").change(function() { localStorage.address = $("#address").val(); }); + if(vehicleSpeed != undefined) + console.log("Vehicle speed: " + vehicleSpeed.vehicleSpeed); vehicle.set("MachineGunTurretStatus", { "machineGunTurretStatus" : true }, function(error) { console.log("set() error " + error); }); diff --git a/packaging/GhostCluster.changes b/packaging/GhostCluster.changes index f0fc45a..274b0ec 100644 --- a/packaging/GhostCluster.changes +++ b/packaging/GhostCluster.changes @@ -1,3 +1,6 @@ +* Mon Sep 16 2013 Kevron Rees +- check vehicleSpeed before proceeding so we don't throw + * Fri Aug 16 2013 Kevron Rees - Added smack manifest - removed connect button diff --git a/packaging/GhostCluster.spec b/packaging/GhostCluster.spec index 3d79c49..d558c3a 100644 --- a/packaging/GhostCluster.spec +++ b/packaging/GhostCluster.spec @@ -1,6 +1,6 @@ Name: GhostCluster Summary: Automotive Meter Cluster Application -Version: 0.2013.8.23 +Version: 0.2013.9.16 Release: 1 Group: Applications/System License: Apache 2.0 -- 2.7.4