From 7e84835b1c67ee52ce7eed053cbb34e8ceb0f742 Mon Sep 17 00:00:00 2001 From: Tim Trampedach Date: Sat, 13 Oct 2012 15:39:55 -0700 Subject: [PATCH] tire temperature values added --- lib/vehicleproperty.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/vehicleproperty.cpp b/lib/vehicleproperty.cpp index 8619ef2..063f11b 100644 --- a/lib/vehicleproperty.cpp +++ b/lib/vehicleproperty.cpp @@ -59,6 +59,10 @@ const VehicleProperty::Property VehicleProperty::TirePressureLeftFront = "TirePr const VehicleProperty::Property VehicleProperty::TirePressureRightFront = "TirePressureRightFront"; const VehicleProperty::Property VehicleProperty::TirePressureLeftRear = "TirePressureLeftRear"; const VehicleProperty::Property VehicleProperty::TirePressureRightRear = "TirePressureRightRear"; +const VehicleProperty::Property VehicleProperty::TireTemperatureLeftFront = "TireTemperatureLeftFront"; +const VehicleProperty::Property VehicleProperty::TireTemperatureRightFront = "TireTemperatureRightFront"; +const VehicleProperty::Property VehicleProperty::TireTemperatureLeftRear = "TireTemperatureLeftRear"; +const VehicleProperty::Property VehicleProperty::TireTemperatureRightRear = "TireTemperatureRightRear"; const VehicleProperty::Property VehicleProperty::VehiclePowerMode = "VehiclePowerMode"; const VehicleProperty::Property VehicleProperty::TripMeterA = "TripMeterA"; const VehicleProperty::Property VehicleProperty::TripMeterB = "TripMeterB"; @@ -132,11 +136,19 @@ VehicleProperty::VehicleProperty() std::list VehicleProperty::capabilities() { return mCapabilities; + mProperties.push_back(TireTemperatureLeftFront); + mProperties.push_back(TireTemperatureRightFront); + mProperties.push_back(TireTemperatureLeftRear); + mProperties.push_back(TireTemperatureRightRear); } AbstractPropertyType* VehicleProperty::getPropertyTypeForPropertyNameValue(VehicleProperty::Property name, std::string value) { + else if(name == TireTemperatureLeftFront) return new TireTemperatureType(value); + else if(name == TireTemperatureRightFront) return new TireTemperatureType(value); + else if(name == TireTemperatureLeftRear) return new TireTemperatureType(value); + else if(name == TireTemperatureRightRear) return new TireTemperatureType(value); if(registeredPropertyFactoryMap.count(name) > 0) { VehicleProperty::PropertyTypeFactoryCallback cb = registeredPropertyFactoryMap[name]; -- 2.7.4