fixed tryParse returning false issue 05/2505/1
authorKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 15 Nov 2012 21:50:07 +0000 (13:50 -0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 15 Nov 2012 21:50:07 +0000 (13:50 -0800)
plugins/obd2plugin/obd2source.cpp
plugins/obd2plugin/obdpid.h

index cdc0116..9c093d7 100644 (file)
@@ -219,7 +219,7 @@ void threadLoop(gpointer data)
                        if (!pid)
                        {
                                //Invalid reply
-                               DebugOut() << "Invalid reply\n";
+                               DebugOut() << "Invalid reply"<<endl;
                                continue;
                        }
                        g_async_queue_push(privResponseQueue,pid);
index 2e747a3..2f09821 100644 (file)
@@ -113,7 +113,7 @@ public:
                }
                double rpm = ((tmp[2] << 8) + tmp[3]) / 4.0;
                value = boost::lexical_cast<std::string>(rpm);
-               return false;
+               return true;
        }
 };
 
@@ -135,7 +135,7 @@ public:
                }
                int temp = tmp[2] - 40;
                value = boost::lexical_cast<std::string>(temp);
-               return false;
+               return true;
        }
 };
 
@@ -157,7 +157,7 @@ public:
                }
                maf = ((tmp[2] << 8) + tmp[3]) / 100.0;
                value = boost::lexical_cast<std::string>(maf);
-               return false;
+               return true;
        }
 
 protected:
@@ -187,7 +187,7 @@ public:
                double consumption = 1 / (14.75 * 6.26) * maf * diffTime/60;
 
                value = boost::lexical_cast<std::string>(consumption);
-               return false;
+               return true;
        }
 
 private:
@@ -228,7 +228,7 @@ public:
                }
 
                value = vinstring;
-               return false;
+               return true;
        }
 
 };
@@ -247,7 +247,7 @@ public:
                VinPid::tryParse(replyVector);
 
                value = value.substr(0,3);
-               return false;
+               return true;
        }
 
 };