~gabe/flashlight-firmware/anduril2

« back to all changes in this revision

Viewing changes to Tom_E/narsil/NarsilMulti/tk-calibMTN17DDm.h

  • Committer: Selene Scriven
  • Date: 2019-09-18 22:18:49 UTC
  • mfrom: (188.4.19 trunk)
  • Revision ID: bzr@toykeeper.net-20190918221849-7h4hcvl07ea3b6g6
merged updates from trunk, including gcc7/8/9 compatibility

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
//#define ADC_50p    ADC_38  // the ADC value for 50% full (resting)
94
94
//#define ADC_25p    ADC_35  // the ADC value for 25% full (resting)
95
95
//#define ADC_0p     ADC_30  // the ADC value for 0% full (resting)
 
96
 
96
97
#define ADC_LOW    ADC_32  // When do we start ramping down
97
98
#define ADC_CRIT   ADC_30  // When do we shut the light off
98
99
 
99
 
 
100
 
/********************** Offtime capacitor calibration ********************/
101
 
// Values are between 1 and 255, and can be measured with offtime-cap.c
102
 
// See battcheck/otc-readings.txt for reference values.
103
 
// These #defines are the edge boundaries, not the center of the target.
104
 
#ifdef OFFTIM3
105
 
// The OTC value 0.5s after being disconnected from power
106
 
// (anything higher than this is a "short press")
107
 
#define CAP_SHORT           190
108
 
// The OTC value 1.5s after being disconnected from power
109
 
// Between CAP_MED and CAP_SHORT is a "medium press"
110
 
#define CAP_MED             94
111
 
// Below CAP_MED is a long press
112
 
#else
113
 
// The OTC value 1.0s after being disconnected from power
114
 
// Anything higher than this is a short press, lower is a long press
115
 
#define CAP_SHORT           115
116
 
#endif
117
 
 
118
 
 
119
100
#endif  // TK_CALIBRATION_H