summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Byrne <jack@livio.io>2015-05-12 14:14:54 -0700
committerJack Byrne <jack@livio.io>2015-05-12 14:14:54 -0700
commit2d3bb25ae7fea59063f8e11158de3e4c53794b9e (patch)
tree6600ee0e4879bca90e8221711daea05f01161ae4
parentab71bf1dd6fa2c2e779eef2efe4ce149ea339120 (diff)
downloadsmartdevicelink-2d3bb25ae7fea59063f8e11158de3e4c53794b9e.tar.gz
Added Get Climate to HMI
-rw-r--r--src/components/HMI/ffw/RCRPC.js65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/components/HMI/ffw/RCRPC.js b/src/components/HMI/ffw/RCRPC.js
index 42dceede6..d631c3cb3 100644
--- a/src/components/HMI/ffw/RCRPC.js
+++ b/src/components/HMI/ffw/RCRPC.js
@@ -4,6 +4,8 @@ FFW.RC = FFW.RPCObserver.create({
componentName: "RC"
}),
+ subscribeClimateState: false,
+
errorResponsePull: {},
connect: function(){
@@ -202,6 +204,69 @@ FFW.RC = FFW.RPCObserver.create({
}
}
+ else if(request.method=="RC.GetInteriorVehicleData"){
+
+ Em.Logger.log("RC.GetInteriorVehicleData");
+
+ var moduleData = {
+ 'moduleType': null,
+ 'moduleZone': null,
+ 'radioControlData': null,
+ 'climateControlData': null
+ }
+
+ if(params.moduleDescription.moduleType=='CLIMATE'){
+
+ moduleData.moduleType = 'CLIMATE';
+
+ var moduleZone = {
+ 'col': 0,
+ 'row': 0,
+ 'level': 0,
+ 'colspan': 2,
+ 'rowspan': 0,
+ 'levelspan': 0
+ }
+
+ moduleData.moduleZone = moduleZone;
+
+ moduleData.radioControlData = null;
+
+ var climateControlData = {
+ 'fanSpeed' : SDL.ClimateController.model.currentFanSpeed,
+ 'currentTemp': SDL.ClimateController.model.currentTemp,
+ 'desiredtemp': SDL.ClimateController.model.desiredtemp,
+ 'temperatureUnit': null,
+ 'acEnable': null,
+ 'circulateAirEnable': null,
+ 'autoModeEnable': null,
+ 'defrostZone': null,
+ 'dualModeEnable': null
+ }
+
+ moduleData.climateControlData = climateControlData;
+
+ if(params.subscribe){
+ this.subscribeClimateState = true;
+ }
+ else{
+ this.subscribeClimateState = false; //resets
+ }
+ }
+
+
+ var JSONMessage = {
+ "jsonrpc": "2.0",
+ "id": request.id,
+ "result": {
+ "moduleData" : moduleData,
+ "code" : 0,
+ "method": "RC.GetInteriorVehicleData"
+ }
+ }
+ this.client.send(JSONMessage);
+
+ }
},