Index: Common.h =================================================================== diff -u -r6abc34804f57c48e9faf927e8e788d0de757026c -rbc8c16be27e3e75817e71d43681b51adf8b40ae8 --- Common.h (.../Common.h) (revision 6abc34804f57c48e9faf927e8e788d0de757026c) +++ Common.h (.../Common.h) (revision bc8c16be27e3e75817e71d43681b51adf8b40ae8) @@ -86,7 +86,7 @@ // **** Common Definitions **** #define NEARLY_INFINITY 1.0E20 ///< Value that is nearly infinity. -#define NEARLY_ZERO 0.00000001 ///< Value that is nearly zero. Used for floating point zero comparisons (e.g. divide by zero checks) +#define NEARLY_ZERO 0.00000001F ///< Value that is nearly zero. Used for floating point zero comparisons (e.g. divide by zero checks) #define HEX_64_K 0x10000 ///< 64K (65536 in decimal) #define HEX_32_BIT_FULL_SCALE 0xFFFFFFFF ///< 32-bit full scale value #define MASK_OFF_MSB 0x00FF ///< Bits to mask off the most significant byte of a 2-byte word @@ -104,6 +104,7 @@ #define MAX_DOUBLE_DIGIT_DECIMAL 99U ///< Maximum value for a decimal byte #define MAX_SINGLE_DIGIT_DECIMAL 9U ///< Maximum value for a decimal nibble #define SHIFT_BITS_BY_4 4U ///< Number of bits to shift in order to shift a nibble +#define SHIFT_BITS_BY_31 31 ///< Shift bits by 31 #define FLOAT_TO_INT_ROUNDUP_OFFSET 0.5F ///< Offset to add to a floating point value for rounding rounding when converting to integer #define ML_PER_LITER 1000 ///< Number of milliliters in a liter #define MA_PER_AMP 1000 ///< Number of milliamps in an amp @@ -119,6 +120,7 @@ #define BITS_12_FULL_SCALE 4096 ///< Full scale range for 12 bit ADC or DAC #define BITS_14_FULL_SCALE 16384 ///< Full scale range for 14 bit ADC or DAC #define BITS_16_FULL_SCALE 65536 ///< Full scale range for 16 bit ADC or DAC +#define HALF 0.5F ///< Half // **** Common Macros ****