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
Diff: Source/main.h
- Revision:
- 54:bc0199198178
- Parent:
- 50:8dca54c1e3fd
- Child:
- 55:a66f86bbfc9f
--- a/Source/main.h Fri Sep 11 19:27:20 2020 +0000 +++ b/Source/main.h Thu Oct 22 18:45:19 2020 +0000 @@ -20,9 +20,11 @@ #define CAP_THRESHOLD_OFF 12 // Cap off threshold. Higher value means it triggers more easily #define CAP_THRESHOLD_OFF_EOL 25 // Cap off threshold for EOL to ensure bluetooth advertising - FTD 08212020 -#define CAP_THRESHOLD_ON_INITIAL 15 // initial value of adaptive cap_off threshold (Must be higher than CAPTHRESHOLD_OFF) +#define CAP_THRESHOLD_ON_INITIAL 25 // initial value of adaptive cap_off threshold (Must be higher than CAPTHRESHOLD_OFF) #define CAP_THRESHOLD_ADAPT_RATE 192 // How fast the thresholf adapts. number 0 to 256. 256 means adapt immediately, 0 means no adapt. -#define CAP_THRESHOLD_PERCENT_OF_PEAK 192 // What fraction of the peak on-off cap reading is used for the threshold. %*256, so 85% is .85*256=218 +#define CAP_THRESHOLD_PERCENT_OF_PEAK 218 // What fraction of the peak on-off cap reading is used for the threshold. %*256, so 85% is .85*256=218 +#define CAP_THRESHOLD_OFF_PERCENT_OF_PEAK 59 // What fraction of the peak on-off cap reading is used for the threshold. %*256, so 85% is .85*256=218 +#define CAP_THRESHOLD_TRIGGER_MULT 2 // Multiplier of cap off threshold used for EOL #define CAP_SAMPLES 2 // Number of samples used for cap sensor average - FTD 08212020 @@ -32,8 +34,8 @@ #define EOL_TIMEOUT_DAYS 31 // number of days after package is open before unit goes into EOL mode. #define EOL_MAX_USES 120 // number of uses after which the unit goes into EOL mode. -#define CAP_LED_OFF_DELAY 0.0035 // delay (seconds) between turning on analog power and taking a cap sensor ADC reading with the sensor LED off - FTD 08212020 -#define CAP_LED_ON_DELAY 0.000075 // delay (seconds) between turning on cap sensor LED and taking a cap sensor ADC reading - FTD 08212020 +#define CAP_LED_OFF_DELAY 0.0005 // delay (seconds) between turning on analog power and taking a cap sensor ADC reading with the sensor LED off - FTD 08212020 +#define CAP_LED_ON_DELAY 0.0001 // delay (seconds) between turning on cap sensor LED and taking a cap sensor ADC reading - FTD 08212020 #define LIGHT_SENSE_PWRON_DELAY 0.200 // delay (seconds) between turning on light sense circuit, and taking an ADC reading.