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: mbed
Diff: src/lut.cpp
- Revision:
- 5:09be5bbb5020
- Parent:
- 4:db38665c3727
- Child:
- 6:39442d493098
--- a/src/lut.cpp Thu Nov 29 00:07:25 2018 +0000 +++ b/src/lut.cpp Sat Dec 01 00:08:53 2018 +0000 @@ -27,10 +27,16 @@ //------------------------------------------------------------------------------- #include "mbed.h" +#include "stdint.h" #include "lut.h" //unsigned int binCode[6]; +#define MAX_LUT_ENTRIES 1024 + +uint8_t binC[MAX_LUT_ENTRIES]{ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19}; +uint8_t thermC[MAX_LUT_ENTRIES]{ 0, 0, 1, 1, 2, 2, 3, 3, 4, 5}; + void dec2bin(int dec){ int k; @@ -64,7 +70,9 @@ } -void getLUTcode(void){ +void getLUTcode(int row){ + dec2bin(binC[row]); + dec2therm(thermC[row]); } \ No newline at end of file