diff options
author | Mengqi Guo <mqg@chromium.org> | 2019-12-10 13:59:40 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-12 11:27:48 +0000 |
commit | cced767b5ff670340197efef203a1369f94b2e96 (patch) | |
tree | e983e9c9cef49720057f861ab6e5a5eb8817fad0 | |
parent | 0748d4efa8951e2d61e9a13e7f7526aab8086c9c (diff) | |
download | chrome-ec-cced767b5ff670340197efef203a1369f94b2e96.tar.gz |
kohaku: tcs3400: update coeffs for als and rgb sensor
Update board files for kohaku to use new coefficients for als and
rgb sensor.
BUG=b:145701281
BRANCH=master
TEST='make -j BOARD=kohaku' in EC repo, verified builds succeed.
Verify on the device that ALS readings are valid.
Cq-Depend: chromium:1879189
Change-Id: I01d9ab3c50f352bc45aaf9bba7eb7dd56cc07faa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1960921
Tested-by: Nick Vaccaro <nvaccaro@google.com>
Commit-Queue: Nick Vaccaro <nvaccaro@google.com>
Auto-Submit: Mengqi Guo <mqg@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
-rw-r--r-- | board/kohaku/board.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/board/kohaku/board.c b/board/kohaku/board.c index 89888135fc..ec0490552e 100644 --- a/board/kohaku/board.c +++ b/board/kohaku/board.c @@ -178,45 +178,45 @@ static struct als_drv_data_t g_tcs3400_data = { .als_cal.offset = 0, .als_cal.channel_scale = { .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kc from VPD */ - .cover_scale = ALS_CHANNEL_SCALE(1.0), /* CT */ + .cover_scale = ALS_CHANNEL_SCALE(0.74), /* CT */ }, }; static struct tcs3400_rgb_drv_data_t g_tcs3400_rgb_data = { .calibration.rgb_cal[X] = { - .offset = 30, /* 30.38576102 */ - .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(0.31818327), - .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(0.28786817), - .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0.14603897), - .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(-0.12542082), + .offset = 92, /* 91.86488992 */ + .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-0.30551661), + .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(1.60934973), + .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(-1.1675665), + .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.30301793), .scale = { .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kr */ - .cover_scale = ALS_CHANNEL_SCALE(0.3507) + .cover_scale = ALS_CHANNEL_SCALE(0.5) } }, .calibration.rgb_cal[Y] = { - .offset = 45, /* 45.0467605 */ - .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(0.26764916), - .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(0.26510278), - .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0.19007195), - .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(-0.12512564), + .offset = 89, /* 89.06144741 */ + .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-0.57703771), + .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(1.46485215), + .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(-1.12901904), + .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.43166926), .scale = { .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kg */ .cover_scale = ALS_CHANNEL_SCALE(1.0) }, }, .calibration.rgb_cal[Z] = { - .offset = 22, /* 22.5644134 */ - .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-0.0682575), - .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(0.15594184), - .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(0.53616239), - .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(-0.13502391), + .offset = 91, /* 91.37365646 */ + .coeff[TCS_RED_COEFF_IDX] = FLOAT_TO_FP(-1.88271283), + .coeff[TCS_GREEN_COEFF_IDX] = FLOAT_TO_FP(1.27117152), + .coeff[TCS_BLUE_COEFF_IDX] = FLOAT_TO_FP(-1.19261862), + .coeff[TCS_CLEAR_COEFF_IDX] = FLOAT_TO_FP(0.95401891), .scale = { .k_channel_scale = ALS_CHANNEL_SCALE(1.0), /* kb */ - .cover_scale = ALS_CHANNEL_SCALE(0.5759) + .cover_scale = ALS_CHANNEL_SCALE(1.44) } }, - .calibration.irt = INT_TO_FP(1), + .calibration.irt = FLOAT_TO_FP(0.35), .saturation.again = TCS_DEFAULT_AGAIN, .saturation.atime = TCS_DEFAULT_ATIME, }; |