-
-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change SparkFun_APDS9960 to submodule (#2800)
Submodule allows easier maintenance and tracking of upstream changes. Only one function change, addition of `getStatusRegister` function. Also patch fixing issue flagged by clang build: ``` /home/runner/work/Sming/Sming/Sming/Libraries/SparkFun_APDS9960/SparkFun_APDS9960.cpp:508:32: warning: result of comparison of constant -1 with expression of type 'uint8_t' (aka 'unsigned char') is always false [-Wtautological-constant-out-of-range-compare] if( bytes_read == -1 ) { ~~~~~~~~~~ ^ ~~ ```
- Loading branch information
Showing
8 changed files
with
37 additions
and
2,646 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
diff --git a/src/SparkFun_APDS9960.cpp b/src/SparkFun_APDS9960.cpp | ||
index 530c1f6..25968d0 100644 | ||
--- a/src/SparkFun_APDS9960.cpp | ||
+++ b/src/SparkFun_APDS9960.cpp | ||
@@ -163,7 +163,7 @@ bool SparkFun_APDS9960::init() | ||
return false; | ||
} | ||
|
||
-#if 0 | ||
+#if DEBUG | ||
/* Gesture config register dump */ | ||
uint8_t reg; | ||
uint8_t val; | ||
@@ -518,12 +518,13 @@ int SparkFun_APDS9960::readGesture() | ||
|
||
/* If there's stuff in the FIFO, read it into our data block */ | ||
if( fifo_level > 0) { | ||
- bytes_read = wireReadDataBlock( APDS9960_GFIFO_U, | ||
+ int res = wireReadDataBlock( APDS9960_GFIFO_U, | ||
(uint8_t*)fifo_data, | ||
(fifo_level * 4) ); | ||
- if( bytes_read == -1 ) { | ||
+ if( res == -1 ) { | ||
return ERROR; | ||
} | ||
+ bytes_read = res; | ||
#if DEBUG | ||
Serial.print("FIFO Dump: "); | ||
for ( i = 0; i < bytes_read; i++ ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
COMPONENT_INCDIRS := src | ||
COMPONENT_SRCDIRS := src |
Submodule SparkFun_APDS9960
added at
bb9633
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.