From 19d1af6a48be7381f1bd9773fd5f82ee90ce8e90 Mon Sep 17 00:00:00 2001 From: Mihai Tudor Panu Date: Fri, 12 Aug 2016 11:59:47 -0700 Subject: [PATCH] ads1x15: failed i2c frequency change should be non-fatal for this device Signed-off-by: Mihai Tudor Panu --- src/ads1x15/ads1x15.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ads1x15/ads1x15.cxx b/src/ads1x15/ads1x15.cxx index a9a7ff2b..cad437e4 100644 --- a/src/ads1x15/ads1x15.cxx +++ b/src/ads1x15/ads1x15.cxx @@ -26,6 +26,7 @@ #include "ads1x15.hpp" #include +#include using namespace upm; @@ -42,8 +43,7 @@ ADS1X15::ADS1X15(int bus, uint8_t address){ } if(i2c->frequency( mraa::I2C_FAST) != mraa::SUCCESS){ - throw std::invalid_argument(std::string(__FUNCTION__) + ": I2c.frequency(I2C_FAST) failed"); - return; + syslog(LOG_WARNING, "%s: I2c.frequency(I2C_FAST) failed, using default speed", std::string(__FUNCTION__).c_str()); } //Will be reset by sub class. m_bitShift = 0;