summaryrefslogtreecommitdiff
path: root/driver/als_tcs3400.h
diff options
context:
space:
mode:
Diffstat (limited to 'driver/als_tcs3400.h')
-rw-r--r--driver/als_tcs3400.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/driver/als_tcs3400.h b/driver/als_tcs3400.h
index 9681a39a56..08467028b0 100644
--- a/driver/als_tcs3400.h
+++ b/driver/als_tcs3400.h
@@ -128,8 +128,10 @@ enum tcs3400_mode {
*/
#define TCS_GAIN_ADJUST_FACTOR 5
#define TCS_GAIN_SAT_LEVEL (TCS_SATURATION_LEVEL / TCS_GAIN_ADJUST_FACTOR)
-#define TCS_UPSHIFT_FACTOR 3
-#define TCS_GAIN_SAT_UPSHIFT_LEVEL (TCS_SATURATION_LEVEL / TCS_UPSHIFT_FACTOR)
+#define TCS_UPSHIFT_FACTOR_N 25 /* upshift factor = 2.5 */
+#define TCS_UPSHIFT_FACTOR_D 10
+#define TCS_GAIN_UPSHIFT_LEVEL (TCS_SATURATION_LEVEL * TCS_UPSHIFT_FACTOR_D \
+ / TCS_UPSHIFT_FACTOR_N)
/*
* Percentage of saturation level that the auto-adjusting anti-saturation