fixed obd2 disconnect bug
authorKevron Rees <kevron.m.rees@intel.com>
Mon, 13 Oct 2014 20:18:02 +0000 (13:18 -0700)
committerKevron Rees <kevron.m.rees@intel.com>
Mon, 13 Oct 2014 20:18:44 +0000 (13:18 -0700)
examples/bluemonkey/bluemonkeyconfig [deleted file]
plugins/obd2plugin/obd2source.cpp
plugins/obd2plugin/obd2source.h

diff --git a/examples/bluemonkey/bluemonkeyconfig b/examples/bluemonkey/bluemonkeyconfig
deleted file mode 100644 (file)
index 97d3ddb..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-  "mainloop" : "/usr/local/lib/x86_64-linux-gnu/automotive-message-broker/automotive-message-broker/qtmainloopplugin.so",
-
-  "sources" : [
-    {
-      "path" : "/usr/local/lib/x86_64-linux-gnu/automotive-message-broker/automotive-message-broker/bluemonkeyplugin.so",
-      "config" : "/etc/ambd/bluemonkey/config.js"
-    }
-  ],
-
-  "sinks" : [
-
-    {
-      "path" : "/usr/local/lib/x86_64-linux-gnu/automotive-message-broker/automotive-message-broker/examplesinkplugin.so"
-    }
-  ]
-}
-
index 1032ab3..c95bda2 100644 (file)
@@ -463,14 +463,13 @@ static int updateProperties( gpointer data)
                StatusMessage *reply = (StatusMessage*)retval;
                if (reply->statusStr == "disconnected")
                {
-                       OBD2Source::Obd2ConnectType val(Obd2Connected,false);
-                       src->updateProperty(&val);
+                       src->obd2Connected.setValue(false);
+                       src->updateProperty(&src->obd2Connected);
                }
                else if (reply->statusStr == "connected")
                {
-                       OBD2Source::Obd2ConnectType val(Obd2Connected, true);
-                       val.priority = OBD2Source::Obd2ConnectType::Instant;
-                       src->updateProperty(&val);
+                       src->obd2Connected.setValue(false);
+                       src->updateProperty(&src->obd2Connected);
                }
                else if (reply->statusStr == "error:nodata" || reply->statusStr == "error:timeout")
                {
index 3977480..ba8cc2b 100644 (file)
@@ -187,12 +187,13 @@ public:
        GThread *m_gThread;
 
        typedef BasicPropertyType<bool> Obd2ConnectType;
+       Obd2ConnectType obd2Connected;
 
 private:
        PropertyList m_supportedProperties;
        std::map<VehicleProperty::Property, AbstractPropertyType*> oldValueMap;
        GMutex *threadQueueMutex;
-       Obd2ConnectType obd2Connected;
+
 
 };