From: Kevron Rees Date: Tue, 6 Aug 2013 21:45:50 +0000 (-0700) Subject: updated business.js for new vehicle plugin changes X-Git-Tag: submit/tizen/20130807.192406^0 X-Git-Url: http://review.tizen.org/git/?p=profile%2Fivi%2FGhostCluster.git;a=commitdiff_plain;h=f5ec9037a7ba54be3eab96ed8ad019ba7ac655d0 updated business.js for new vehicle plugin changes --- diff --git a/business.js b/business.js index 2c32b6c..68a458c 100644 --- a/business.js +++ b/business.js @@ -128,10 +128,6 @@ function connected() } -function connect(addy) -{ - vehicle = new Vehicle(connected, function(){$('#velocity').text("ERR");}, "ws://"+addy, "http-only"); -} window.onload = function() { @@ -140,7 +136,7 @@ window.onload = function() var vehicle = tizen.vehicle var vehicleSpeed = vehicle.get("VehicleSpeed"); - console.log("Vehicle speed: " + vehicleSpeed.VehicleSpeed); + console.log("Vehicle speed: " + vehicleSpeed.vehicleSpeed); if(typeof(Storage)!== "undefined") { @@ -150,11 +146,12 @@ window.onload = function() $("#address").val(addy); $("#address").change(function() { localStorage.address = $("#address").val(); }); - $("#connectButton").click(function() { connect(addy) }); - + $("#connectButton").click(function() { + vehicle.set("MachineGunTurretStatus", { "machineGunTurretStatus" : true }, + function(error) { console.log("error " + error);}); - //connect(addy); + }); var velocityUnits = $('#velocityUnits'); velocityUnits.click(function() { @@ -166,8 +163,8 @@ window.onload = function() }); vehicle.subscribe("VehicleSpeed",function(data) { - console.log("Vehicle data" + data.VehicleSpeed); - adjvalue = data.VehicleSpeed; + console.log("Vehicle data" + data.vehicleSpeed); + adjvalue = data.vehicleSpeed; curVss = adjvalue; var velocityUnits = $('#velocityUnits'); @@ -180,7 +177,7 @@ window.onload = function() }); vehicle.subscribe("EngineSpeed", function(data) { - var value = data.EngineSpeed; + var value = data.engineSpeed; if(value > 10000) value =10000; var needleDegs = value / 10000 * 180; $('#rpms').text(value); @@ -188,7 +185,7 @@ window.onload = function() }); vehicle.subscribe("Transmission",function(data) { - value = data.GearPosition; + value = data.gearPosition; if(value == 128) $('#gear').text('Reverse'); else if(value == 0) @@ -198,13 +195,13 @@ window.onload = function() }); vehicle.subscribe("SteeringWheelAngle", function(data) { - value = data.SteeringWheelAngle; + value = data.steeringWheelAngle; $('#wheel').css("-webkit-transform","rotate("+value+"deg)"); $('#machinegun').css("-webkit-transform","rotate("+value+"deg)"); }); vehicle.subscribe("ThrottlePosition", function(data) { - value = data.ThrottlePosition; + value = data.throttlePosition; var needleDegs = (value / 100 * 180) + 270 $('#throttleNeedle').css("-webkit-transform","rotate("+needleDegs+"deg)"); @@ -212,7 +209,7 @@ window.onload = function() }); vehicle.subscribe("EngineCoolantTemperature", function(data) { - value = data.EngineCoolantTemperature; + value = data.engineCoolantTemperature; var needleDegs = (value / 180 * 70) + 270 $('#engineCoolantNeedle').css("-webkit-transform","rotate("+needleDegs+"deg)"); @@ -220,10 +217,11 @@ window.onload = function() }); vehicle.subscribe("MachineGunTurretStatus", function(data) { - value = data.MachineGunTurretStatus; + value = data.machineGunTurretStatus; if(value === "1") $('#machineGunTurretPopup').popup('open'); else $('#machineGunTurretPopup').popup('close'); }); + } diff --git a/packaging/GhostCluster.changes b/packaging/GhostCluster.changes index e51c912..0aa34b1 100644 --- a/packaging/GhostCluster.changes +++ b/packaging/GhostCluster.changes @@ -1,3 +1,6 @@ +* Tue Aug 06 2013 Kevron Rees +- updated to reflect latest changes in the vehicle plugin + * Mon Jul 22 2013 Kevron Rees - fixed config.xml - readded .gbs.conf diff --git a/packaging/GhostCluster.spec b/packaging/GhostCluster.spec index bc54822..e9cafaa 100644 --- a/packaging/GhostCluster.spec +++ b/packaging/GhostCluster.spec @@ -1,6 +1,6 @@ Name: GhostCluster Summary: Automotive Meter Cluster Application -Version: 0.2013.7.22 +Version: 0.2013.8.06 Release: 1 Group: Applications/System License: Apache 2.0