diff --git a/posix-configs/rpi/px4.config b/posix-configs/rpi/px4.config index 004d2215ef..24e4a63447 100644 --- a/posix-configs/rpi/px4.config +++ b/posix-configs/rpi/px4.config @@ -9,6 +9,7 @@ df_lsm9ds1_wrapper start -R 4 #df_mpu9250_wrapper start -R 10 #df_hmc5883_wrapper start df_ms5611_wrapper start +navio_rgbled start gps start -d /dev/spidev0.0 -i spi -p ubx sensors start commander start diff --git a/posix-configs/rpi/px4_fw.config b/posix-configs/rpi/px4_fw.config index b4eca8ff72..e886530db8 100644 --- a/posix-configs/rpi/px4_fw.config +++ b/posix-configs/rpi/px4_fw.config @@ -7,7 +7,7 @@ param set SYS_MC_EST_GROUP 2 dataman start df_lsm9ds1_wrapper start -R 4 df_ms5611_wrapper start -#navio_rgbled start +navio_rgbled start gps start -d /dev/spidev0.0 -i spi -p ubx sensors start commander start diff --git a/src/drivers/navio_rgbled/navio_rgbled.cpp b/src/drivers/navio_rgbled/navio_rgbled.cpp index 038e832063..e82ea8bcf6 100644 --- a/src/drivers/navio_rgbled/navio_rgbled.cpp +++ b/src/drivers/navio_rgbled/navio_rgbled.cpp @@ -68,12 +68,10 @@ RGBLED::~RGBLED() int RGBLED::start() { - int res; - - res = DevObj::init(); + int res = DevObj::init(); if (res != 0) { - DF_LOG_ERR("error: could not init DevObj"); + DF_LOG_ERR("could not init DevObj (%i)", res); return res; } @@ -86,7 +84,14 @@ int RGBLED::start() // update at fixed interval DevObj::setSampleInterval(_led_controller.maximum_update_interval()); - return 0; + res = DevObj::start(); + + if (res != 0) { + DF_LOG_ERR("could not start DevObj (%i)", res); + return res; + } + + return res; } int RGBLED::stop() @@ -98,7 +103,7 @@ int RGBLED::stop() res = DevObj::stop(); if (res < 0) { - DF_LOG_ERR("error: could not stop DevObj"); + DF_LOG_ERR("could not stop DevObj"); //this may not be an error for this device return res; } @@ -208,7 +213,7 @@ int stop() void usage() { - PX4_WARN("Usage: navio_rgbled 'start', 'stop'"); + PX4_INFO("Usage: navio_rgbled 'start', 'stop'"); } } //namespace navio_rgbled