mraa.c: Fixed bug in detected main/sub platform name and type logging
authorHenry Bruce <henry.bruce@intel.com>
Thu, 30 Jul 2015 19:15:03 +0000 (12:15 -0700)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Tue, 8 Sep 2015 13:42:03 +0000 (14:42 +0100)
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
src/mraa.c

index 168f685..b701c85 100644 (file)
@@ -141,8 +141,13 @@ mraa_init()
     }
 #endif
 
-    syslog(LOG_NOTICE, "libmraa initialised for platform '%s' of type %d", mraa_get_platform_name(), mraa_get_platform_type());
     current_plat = plat;
+    syslog(LOG_NOTICE, "libmraa initialised for platform '%s' of type %d", mraa_get_platform_name(), mraa_get_platform_type());
+    if (mraa_has_sub_platform()) {
+        mraa_select_sub_platform();
+        syslog(LOG_NOTICE, "libmraa initialised for sub-platform '%s' of type %d", mraa_get_platform_name(), mraa_get_platform_type());    
+        mraa_select_main_platform();
+    }
     return MRAA_SUCCESS;
 }