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: inc/globals.h
- Revision:
- 9:816b9a4e4f21
- Parent:
- 8:d3d7dca419b3
- Child:
- 10:6c3233b03658
--- a/inc/globals.h Thu Dec 06 16:22:11 2018 +0000 +++ b/inc/globals.h Fri Dec 07 00:15:19 2018 +0000 @@ -49,8 +49,13 @@ #define OFF 0 #define UPDATE_REFRESH_DELAY_US 500000.0 +const unsigned int LOOP_COUNTER = 500000.0/500; -#define ADC_SCALE_FACTOR 32767.0 +#define ADC_MAX_VALUE 65536 +const unsigned int ADC_SCALE_FACTOR = ADC_MAX_VALUE/2; +#define MAX_LUT_ENTRIES 1024 +const unsigned int ADC_RESULT_SCALE_FACTOR = ADC_MAX_VALUE/MAX_LUT_ENTRIES; + #define VOLTAGE_TARG_VALUE 1.65 #define VOLTAGE_ACTUAL_VALUE 1.52 const double VOLTAGE_CORRECTION = VOLTAGE_TARG_VALUE/VOLTAGE_ACTUAL_VALUE/ADC_SCALE_FACTOR; @@ -84,7 +89,7 @@ #define MAX_REGISTERS 1 #define WEIGHT_BIN_WIDTH 5 -#define BOARDS_THERMCODE_WIDTH MAX_BOARDS +#define BOARDS_THERMCODE_WIDTH 11 extern int menuLevel;