Skip to content

Commit 938e319

Browse files
committed
added minor fixex and examples changes
1 parent 4f11d55 commit 938e319

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

examples/MeasureCalibrationParameters/MeasureCalibrationParameters.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919

2020
#include "Arduino_LTR381RGB.h"
2121

22-
int maxR = 0;
23-
int maxG = 0;
24-
int maxB = 0;
22+
int maxR = 0x000000;
23+
int maxG = 0x000000;
24+
int maxB = 0x000000;
2525

26-
int minR = 255;
27-
int minG = 255;
28-
int minB = 255;
26+
int minR = 0x0FFFFFF;
27+
int minG = 0x0FFFFFF;
28+
int minB = 0x0FFFFFF;
2929

3030
void setup() {
3131
Serial.begin(9600);

src/LTR381RGB.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,12 +484,15 @@ float LTR381RGBClass::getLuxIntTime(int resolution) {
484484
int LTR381RGBClass::available() {
485485
auto res = readRegister(LTR381RGB_MAIN_STATUS);
486486
if ((res & 0x20) == 0x20) {
487+
#ifdef DEBUG
487488
Serial.println("Power-On event happens");
489+
#endif
488490
resetSW();
489491
#ifdef DEBUG
490492
dumpReg();
491493
#endif
492494
// clear the reading after the reset
495+
end();
493496
begin();
494497
return 0;
495498
}

0 commit comments

Comments
 (0)