From e4e5808040a2d6123ac1d783f63882b636f80ea0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 27 Dec 2021 19:45:24 +0100 Subject: max44006: remove unused red, green, blue, clear, ir class variables --- include/driver/max44006.h | 4 +--- src/driver/max44006.cc | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/driver/max44006.h b/include/driver/max44006.h index 7421914..3406d16 100644 --- a/include/driver/max44006.h +++ b/include/driver/max44006.h @@ -63,9 +63,7 @@ class MAX44006 { unsigned char txbuf[2]; unsigned char rxbuf[10]; - AmbientConfig ambientConfig; - - uint16_t clear, red, green, blue, ir; + unsigned char ambientConfig; public: diff --git a/src/driver/max44006.cc b/src/driver/max44006.cc index b0df238..e0f6e98 100644 --- a/src/driver/max44006.cc +++ b/src/driver/max44006.cc @@ -59,6 +59,14 @@ uint16_t MAX44006::getTemperature() return 0; } + /* + * 13543 counts @ ~21c + * 13660 counts @ ~30c + * 14280 counts @ ~48c + * -> approx 27 counts / degc + * -> approx 12970 counts @ 0c + */ + // independent of AMBPGA setting, depends on AMBTIM return (((uint16_t)rxbuf[0] << 8) + rxbuf[1]); } -- cgit v1.2.3