mbed Connector Interface simplification API on top of mbed-client

Fork of mbedConnectorInterfaceV3 by Doug Anson

NOTE:

This repo has been replaced with https://github.com/ARMmbed/mbedConnectorInterface. No further updates will occur with this repo. Please use the github repo instead. Thanks!

Revision:
69:baa167cf771b
Parent:
68:d016acf33ab4
Child:
70:d49128903181
diff -r d016acf33ab4 -r baa167cf771b source/ThreadedResourceObserver.cpp
--- a/source/ThreadedResourceObserver.cpp	Mon Aug 22 19:42:32 2016 +0000
+++ b/source/ThreadedResourceObserver.cpp	Mon Aug 22 19:47:08 2016 +0000
@@ -49,22 +49,16 @@
  }
  
  // thread task method
- void ThreadedResourceObserver::observation_task(ThreadedResourceObserver *me) {
-     if (me != NULL) {
-         while(true) {
-             Thread::wait(me->getSleepTime());
-             if (me->isObserving() == true && me->getResource() != NULL && me->getResource()->isRegistered() == true) {
-                 DynamicResource *res = me->getResource();
-                 if (res != NULL) {
-                     res->observe();
-                 }
+ void ThreadedResourceObserver::observation_task() {
+     while(true) {
+         Thread::wait(me->getSleepTime());
+         if (me->isObserving() == true && me->getResource() != NULL && me->getResource()->isRegistered() == true) {
+             DynamicResource *res = me->getResource();
+             if (res != NULL) {
+                 res->observe();
              }
          }
      }
-     else {
-         // instance pointer is NULL
-         printf("ThreadedResourceObserver::observation_task(): ERROR: Instance pointer is NULL\r\n");
-     }
  }
 
  // begin observing...