diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-10-29 13:19:10 +0200 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-10-29 13:19:10 +0200 |
| commit | 902139314c4d406236de4eec79ba7364d09e68d0 (patch) | |
| tree | 55db113ab18a93969bc450efb3bb0dd0c3824ae8 /Software/Embedded_SW | |
| parent | c1dbc0def7c7401432195461df5eb4face4025ba (diff) | |
| download | Tango-902139314c4d406236de4eec79ba7364d09e68d0.tar.gz Tango-902139314c4d406236de4eec79ba7364d09e68d0.zip | |
Limit VOCLookUpTable to 12bit
Diffstat (limited to 'Software/Embedded_SW')
| -rw-r--r-- | Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_AD5272_Rheostat/WHS_Rheostat.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_AD5272_Rheostat/WHS_Rheostat.c b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_AD5272_Rheostat/WHS_Rheostat.c index 47850cca4..ed5f5acde 100644 --- a/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_AD5272_Rheostat/WHS_Rheostat.c +++ b/Software/Embedded_SW/Embedded/Drivers/I2C_Communication/WHS_Card/D_AD5272_Rheostat/WHS_Rheostat.c @@ -22,10 +22,10 @@ //uint8_t AD5272_Read_Buf[16] = {0}; AD5272 U40_AD5272; -#define VOCTable_MaxLine 26 + #define VOCTable_MaxColumn 2 -double VOCLookUpTable[VOCTable_MaxLine][VOCTable_MaxColumn] = +double VOCLookUpTable[][VOCTable_MaxColumn] = { //Based on VOC "sensor ppm calculation.xlsx" (see email "VOC sensor operational") // VOC[mV] PPM @@ -45,18 +45,11 @@ double VOCLookUpTable[VOCTable_MaxLine][VOCTable_MaxColumn] = 3800.0, 9.578252369 , 3900.0, 11.95664548 , 4000.0, 14.65340625 , - 4100.0, 17.6492742 , - 4200.0, 20.92324879 , - 4300.0, 24.45355263 , - 4400.0, 28.21831574 , - 4500.0, 32.1960535 , - 4600.0, 36.36599236 , - 4700.0, 40.70828334 , - 4800.0, 45.20413325 , - 4900.0, 49.83587589 , - 5000.0, 54.587 , + 4095.0, 17.49948080 ,//Max - 12 Bit 4095bit is 4.095mV }; +#define VOCTable_MaxLine (sizeof(VOCLookUpTable)/2/sizeof(double)) + bool WHS_WriteRdac(uint16_t value) { bool status= OK; |
