Laser Sensing Display for UI interfaces in the real world
Fork of skinGames_forktest by
Diff: hardwareIO/hardwareIO.h
- Revision:
- 14:0fc33a3a7b4b
- Parent:
- 10:6f8e48dca1bd
- Child:
- 22:d87317d7ca91
diff -r 9f03eac02700 -r 0fc33a3a7b4b hardwareIO/hardwareIO.h --- a/hardwareIO/hardwareIO.h Thu Apr 12 09:50:47 2012 +0000 +++ b/hardwareIO/hardwareIO.h Thu Apr 12 13:02:59 2012 +0000 @@ -44,10 +44,15 @@ #define NB_SCANS 8 // number of scans performed to generate the LUT table (actually, each site CUMULATES NB_SCANS values) #define LUT_FILENAME "/local/LUT.txt" -//#define LUT_H_FILENAME "/local/LUT_pos.txt" //define if human readable file is required + +// For checking (define if human readable file is required - note: it is not used by the program, just as output for human reading) +//#define LUT_H_FILENAME "/local/LUT_pos.txt" -// Current Look-up table approximation: -#define LUT_BILINEAR +// Current Look-up table approximation (only one at a time!): +//#define LUT_BILINEAR +//#define LUT_DIRECT +//#define LUT_LINEAR +#define NO_LUT //Current method for lockin data acquisition and correction #define lockin_read() lockin.getMedianValue() // lockin.getSmoothValue(); //return the average of the value stored on the buffer @@ -76,7 +81,7 @@ // float LockInAD_to_Volts(int); //Look-Up Table: - uint16 lut[LUT_RESOLUTION][LUT_RESOLUTION]; //Look-Up Table (uint16 is "unsigned short") + unsigned short lut[LUT_RESOLUTION][LUT_RESOLUTION]; //Look-Up Table (uint16 is "unsigned short") void scanLUT(); //create and save the Look-Up Table void setLUT(); //set the Look-Up Table: either from scanning, or from the file LUT.TXT (if it is present) float lockInCorrectedValue(unsigned short x, unsigned short y); //return the lockin value corrected with the Look-UpTable (this is, a RATIO of reflectivities, and <1)