From c9cfb42326859f9fe7122b54ebd4e5fbae335b21 Mon Sep 17 00:00:00 2001 From: Henry Bruce Date: Thu, 30 Jul 2015 12:15:03 -0700 Subject: [PATCH] mraa.c: Fixed bug in detected main/sub platform name and type logging Signed-off-by: Henry Bruce Signed-off-by: Brendan Le Foll --- src/mraa.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mraa.c b/src/mraa.c index 168f685..b701c85 100644 --- a/src/mraa.c +++ b/src/mraa.c @@ -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; } -- 2.7.4