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: nRF51822
Source/main.h@45:bd6a86de08f9, 2020-07-27 (annotated)
- Committer:
- fdelahan
- Date:
- Mon Jul 27 21:26:07 2020 +0000
- Revision:
- 45:bd6a86de08f9
- Parent:
- 44:48ce47b35564
- Child:
- 46:b85be1ccf179
turned off max cap on value - no longer in saturation; reorganized advertising payload - aesthetics
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| sgetz7908 | 0:cec02cf6df66 | 1 | |
| sgetz7908 | 0:cec02cf6df66 | 2 | #ifndef MAIN_H |
| sgetz7908 | 0:cec02cf6df66 | 3 | #define MAIN_H |
| sgetz7908 | 0:cec02cf6df66 | 4 | |
| fdelahan | 45:bd6a86de08f9 | 5 | #define FW_VERSION "V1.16" // major revisions will be 1xx, 2xx, etc. |
| sgetz7908 | 0:cec02cf6df66 | 6 | |
| fdelahan | 41:80f618bb53a4 | 7 | #define SKIP_SHIP_MODE 0 // 0=normal, 1=Test mode, where SHIP_MODE is skipped |
| sgetz7908 | 23:7ca590427f0e | 8 | #define UART_DEBUGGING 0 // if =1, put out debug info on the BLE_UART |
| sgetz7908 | 33:787d30671783 | 9 | #define ENABLE_LED 0 // if =1, enable the debug LED |
| sgetz7908 | 24:761c30334cf4 | 10 | #define TEST_ON_NRF51_DK 0 // if =1, configure for running on nRF51-DK board |
| sgetz7908 | 9:0b017e956142 | 11 | |
| sgetz7908 | 23:7ca590427f0e | 12 | //#define DARK_SAMPLE_PERIOD 15 // During manufacturing, this determines how many seconds between light_sensor samples |
| sgetz7908 | 23:7ca590427f0e | 13 | //#define MIN_DARK_TIME_MIN 15 // Number of minutes the unit needs to be in the dark to go into SHIP_MODE |
| sgetz7908 | 9:0b017e956142 | 14 | |
| fdelahan | 37:0cb0a0b22b99 | 15 | #define PERIODIC_TICK_SEC 1 // update rtc and run check cap rate |
| fdelahan | 40:adabdb1c5abe | 16 | #define FAST_TICK_SEC 1 // update rtc and run check cap rate while in init and test mode |
| sgetz7908 | 26:a577c4b69fe0 | 17 | #define EOL_TICK_SEC 10 // update rtc and run check cap rate while in EOL mode |
| sgetz7908 | 9:0b017e956142 | 18 | |
| sgetz7908 | 43:7a9cfb57f9e8 | 19 | #define CAP_THRESHOLD 25 // ajusts the sensitivity of the cap sensor. Lower value means it triggers more easily |
| fdelahan | 45:bd6a86de08f9 | 20 | #define CAP_MAX_OFF_READING 1024 // if the off reading exceeds this limit, then reading is invalid and we use last valid reading |
| sgetz7908 | 23:7ca590427f0e | 21 | |
| sgetz7908 | 35:e8fa201fe147 | 22 | #define EOL_TIMEOUT_DAYS 31 // number of days after package is open before unit goes into EOL mode. |
| fdelahan | 37:0cb0a0b22b99 | 23 | #define EOL_MAX_USES 120 // number of uses after which the unit goes into EOL mode. |
| sgetz7908 | 26:a577c4b69fe0 | 24 | |
| fdelahan | 39:93d6d459c76c | 25 | #define LIGHT_SENSE_PWRON_DELAY 0.200 // delay (seconds) between turning on light sense circuit, and taking an ADC reading. |
| sgetz7908 | 38:4b06a103c044 | 26 | |
| sgetz7908 | 38:4b06a103c044 | 27 | |
| sgetz7908 | 23:7ca590427f0e | 28 | extern void process_cmd(char * cmd); |
| sgetz7908 | 27:bb7247a1704e | 29 | extern void dataWasRead(void); |
| sgetz7908 | 2:def2c045c43a | 30 | |
| sgetz7908 | 2:def2c045c43a | 31 | //****************************************************************************** |
| sgetz7908 | 0:cec02cf6df66 | 32 | |
| sgetz7908 | 0:cec02cf6df66 | 33 | #endif // #ifndef MAIN_H |