Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: eye_r_eye-htpa32x32-v_1_8-ticker mbed
Fork of eye_r_eye-htpa32x32-v_1_8-ticker by
Diff: heimann32x32.cpp
- Revision:
- 1:7fd5cc2052cf
- Parent:
- 0:851be67e4df5
- Child:
- 2:270ef0ab1a2e
--- a/heimann32x32.cpp Wed Dec 13 19:16:26 2017 +0000 +++ b/heimann32x32.cpp Tue Mar 13 23:54:51 2018 +0000 @@ -6,11 +6,11 @@ HTPA32x32::HTPA32x32(I2C * _i2c, I2C * _i2ce, uint8_t addr1, uint8_t addr2) { i2c = _i2c; -// i2c->frequency(400000); - i2c->frequency(1000000); + i2c->frequency(100000); + //i2c->frequency(1000000); i2ce = _i2ce; - i2ce->frequency(400000); + i2ce->frequency(100000); i2c_addr_htpa = addr1; i2c_addr_eeprom = addr2; @@ -158,7 +158,7 @@ read_eeprom(HTP_EEPROM_THGRAD_HI, HTP_EEPROM_THGRAD_LO, (char *) ThGrad, 2048); read_eeprom(HTP_EEPROM_THOFFS_HI, HTP_EEPROM_THOFFS_LO, (char *) ThOffs, 2048); - rcp_eps = 100.0 / epsilon; + rcp_eps = (float) 100.0 / epsilon; a = (PixCmax - PixCmin) / (float) 65535.0 * rcp_eps; b = rcp_eps * PixCmin; @@ -169,7 +169,7 @@ { PixC[i*32 + j] = (float) dummyPix[i*32 + j]; PixC[i*32 + j] = a * PixC[i*32 + j] + b; - PixC[i*32 + j] = 1e8/PixC[i*32 + j]; + PixC[i*32 + j] = (float) 1e8 / (float) PixC[i*32 + j]; } }