worked some debug messages 21/2521/1
authorKevron Rees <tripzero.kev@gmail.com>
Sun, 25 Nov 2012 01:18:53 +0000 (17:18 -0800)
committerKevron Rees <tripzero.kev@gmail.com>
Sun, 25 Nov 2012 01:18:53 +0000 (17:18 -0800)
ambd/core.cpp
plugins/obd2plugin/obd2source.h
plugins/obd2plugin/obdpid.h

index c8e8e02..b3098cf 100644 (file)
@@ -220,10 +220,10 @@ AsyncPropertyReply * Core::setProperty(AsyncSetPropertyRequest request)
 
 void Core::subscribeToProperty(VehicleProperty::Property property, AbstractSink* self)
 {
-       printf("Subscribing\n");
+       DebugOut(1)<<"Subscribing to: "<<property<<endl;
        if(!ListPlusPlus<VehicleProperty::Property>(&mMasterPropertyList).contains((property)))
        {
-               DebugOut()<<__FUNCTION__<<"(): property not supported: "<<property<<endl;
+               DebugOut(1)<<__FUNCTION__<<"(): property not supported: "<<property<<endl;
                return; 
        }
        
@@ -254,7 +254,7 @@ void Core::unsubscribeToProperty(VehicleProperty::Property property, AbstractSin
 {
        if(propertySinkMap.find(property) == propertySinkMap.end())
        {
-               DebugOut()<<__FUNCTION__<<"property not supported: "<<property;
+               DebugOut(1)<<__FUNCTION__<<"property not supported: "<<property;
                return; 
        }
                
index 0d0d232..0182edc 100644 (file)
@@ -77,6 +77,7 @@ public:
                supportedPidsList.push_back(new WmiPid());
                supportedPidsList.push_back(new FuelConsumptionPid());
                supportedPidsList.push_back(new EngineCoolantPid());
+               supportedPidsList.push_back(new AirIntakeTemperaturePid());
        }
        ObdPid* createPidFromReply(ByteArray replyVector)
        {
index acb3837..3823317 100644 (file)
@@ -175,7 +175,9 @@ public:
        }
        bool tryParse(ByteArray replyVector)
        {
-               MassAirFlowPid::tryParse(replyVector);
+               if(!MassAirFlowPid::tryParse(replyVector))
+                       return false;
+
                timespec t;
                clock_gettime(CLOCK_REALTIME, &t);