I use the preprocessor to calculate a rather large array of constant values (it get more comples later) such as
#define LM2 0x2040 #define LSENS 0 // NOTE: LSENS MUST BE LESS THAN HALF LM2 IF CHANGED SENSE TABLES AND LOGIC MUST CHANGE #define L10 ((LM2 * 1 ) /32) + LSENS