Skip to content

Commit fa3eb7a

Browse files
committed
Return from isConnected if not connected.
1 parent 46b34a0 commit fa3eb7a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/SparkFun_AS7331.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ class SfeAS7331ArdI2C : public SfeAS7331Driver
4747

4848
setCommunicationBus(&_theI2CBus);
4949

50-
isConnected();
50+
if(!isConnected())
51+
return false;
5152

5253
return SfeAS7331Driver::begin(address);
5354
}

0 commit comments

Comments
 (0)