~gabe/flashlight-firmware/anduril2

« back to all changes in this revision

Viewing changes to Tom_E/narsil/NarsilMulti/Setups_GTBuck.h

  • Committer: Selene Scriven
  • Date: 2018-05-09 05:27:55 UTC
  • mfrom: (188.1.17 trunk)
  • Revision ID: bzr@toykeeper.net-20180509052755-06y2fnsgrq96k8nc
merged trunk, prep for merging back

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/****************************************************************************************
 
2
 * Setups_GTBuck.h - special for the BLF GT Buck Driver
 
3
 * ===============
 
4
 *
 
5
 * Created: 4/30/2017 9:27:32 AM
 
6
 *  Author: Tom E
 
7
 ****************************************************************************************/
 
8
#ifndef SETTINGS_H_
 
9
#define SETTINGS_H_
 
10
 
 
11
//----------------------------------------------------------------------------------------
 
12
//                      Driver Board Settings
 
13
//----------------------------------------------------------------------------------------
 
14
#define OUT_CHANNELS 2                  // define the output channels as 1, 2 or 3
 
15
 
 
16
#define GT_BUCK                                 // set only for GT Buck driver build
 
17
 
 
18
#define TURBO_LEVEL_SUPPORT     // set if you want a max turbo level above the max ramping level
 
19
 
 
20
#define VOLTAGE_MON                             // Comment out to disable - ramp down and eventual shutoff when battery is low
 
21
#define VOLT_MON_R1R2                   // uses external R1/R2 voltage divider, comment out for 1.1V internal ref
 
22
 
 
23
// For voltage monitoring on pin #7, only uncomment one of the two def's below:
 
24
#define USING_1000K                             // for GT-buck
 
25
//#define USING_220K                    // for using the 220K resistor
 
26
//#define USING_360K                    // for using a 360K resistor (LDO and 2S cells)
 
27
 
 
28
#define D1_DIODE 2                              // Drop over rev. polarity protection diode: 0.2V normally, 0.3V for Q8
 
29
 
 
30
// For 2 channel (FET+1) boards:
 
31
 //#define USING_3807135_BANK   // (default OFF) sets up ramping for 380 mA 7135's instead of a FET
 
32
 
 
33
// For 3 channel (triple) boards:
 
34
//#define TRIPLE_3_7135                 // Configure for 3 7135's
 
35
//#define TRIPLE_8_7135                 // Configure for 8 7135's
 
36
 
 
37
#define ONBOARD_LED                             // Enable the LED support
 
38
//----------------------------------------------------------------------------------------
 
39
//----------------------------------------------------------------------------------------
 
40
 
 
41
 
 
42
//----------------------------------------------------------------------------------------
 
43
//                      Temperature Monitoring
 
44
//----------------------------------------------------------------------------------------
 
45
// Temperature Calibration Offset -
 
46
#define TEMP_CAL_OFFSET (0)
 
47
//   -2   try for the Manker U21 (LJ)
 
48
//   -2   works for the Warsun X60 (robo) using the 17 mm DEL driver
 
49
//   -1   try this for proto #1, OSHPark BLF Q8 driver
 
50
//    3   about right for BLF Q8 proto #2 and #3, reads ~20 for ~68F (18C)
 
51
//   -12  this is about right on the DEL DDm-L4 board in the UranusFire C818 light
 
52
//   -11  On the TA22 board in SupFire M2-Z, it's bout 11-12C too high,reads 35C at room temp, 23C=73.4F
 
53
//   -8   For the Manker U11 - at -11, reads 18C at 71F room temp (22C)
 
54
//   -2   For the Lumintop SD26 - at -2, reading a solid 19C-20C (66.2F-68F for 67F room temp)
 
55
 
 
56
#define DEFAULT_STEPDOWN_TEMP (80)      // default for stepdown temperature (50C=122F, 55C=131F)
 
57
// use 50C for smaller size hosts, or a more conservative level (SD26, U11, etc.)
 
58
// use 55C to 60C for larger size hosts, maybe C8 and above, or for a more aggressive setting
 
59
 
 
60
#define TEMP_ADJ_PERIOD 2812    // Over Temp adjustment frequency: 45 secs (in 16 msec ticks)
 
61
//----------------------------------------------------------------------------------------
 
62
//----------------------------------------------------------------------------------------
 
63
 
 
64
 
 
65
//----------------------------------------------------------------------------------------
 
66
#ifndef VOLT_MON_R1R2   // if using R1/R2, change the LVP settings in the calibration header file
 
67
#define BATT_LOW                          30    // Cell voltage to step light down = 3.0 V
 
68
#define BATT_CRIT                         28    // Cell voltage to shut the light off = 2.8 V
 
69
#endif
 
70
//----------------------------------------------------------------------------------------
 
71
 
 
72
 
 
73
//----------------------------------------------------------------------------------------
 
74
//                      Stored Configuration Setting Defaults
 
75
//----------------------------------------------------------------------------------------
 
76
#define DEF_RAMPING                     1               // 1: ramping, 0: mode sets
 
77
#if USING_3807135_BANK
 
78
 #define DEF_MOON_LEVEL         5               // 0..7, 0: disabled, usually set to 3 (350 mA) or 5 (380 mA) - 2 might work on a 350 mA
 
79
#else
 
80
 #define DEF_MOON_LEVEL         5               // 0..7, 0: disabled, usually set to 3 (350 mA) or 5 (380 mA) - 2 might work on a 350 mA
 
81
#endif
 
82
#define DEF_STEPDOWN_MODE       1               // 0=disabled, 1=thermal, 2=60s, 3=90s, 4=120s, 5=3min, 6=5min, 7=7min (3 mins is good for production)
 
83
#define DEF_BLINKY_MODE         2               // blinky mode config: 1=strobe only, 2=all blinkies, 0=disable
 
84
 
 
85
#define DEF_MODE_SET_IDX        3               // 0..11, mode set currently in effect, chosen by user (3=4 modes)
 
86
#define DEF_MOON_MODE           1               // 1: enable moonlight mode, 0: disable moon mode
 
87
#define DEF_HIGH_TO_LOW         0               // 1: highest to lowest, 0: modes go from lowest to highest
 
88
#define DEF_MODE_MEMORY         0               // 1: save/recall last mode set, 0: no memory
 
89
 
 
90
#define DEF_LOCATOR_LED         1               // Locator LED feature (ON when light is OFF) - 1=enabled, 0=disabled
 
91
#define DEF_BVLD_LED_ONLY       0               // BVLD (Battery Voltage Level Display) - 1=BVLD shown only w/onboard LED, 0=both primary and onboard LED's
 
92
#define DEF_ONBOARD_LED         1               // On Board LED support - 1=enabled, 0=disabled
 
93
//----------------------------------------------------------------------------------------
 
94
//----------------------------------------------------------------------------------------
 
95
 
 
96
 
 
97
//----------------------------------------------------------------------------------------
 
98
//                      Operational Settings Enable/Disable
 
99
//----------------------------------------------------------------------------------------
 
100
#define STARTUP_LIGHT_OFF               // (default ON) for ramping from power up, main light OFF, otherwise set to max
 
101
#define STARTUP_2BLINKS                 // enables the powerup/startup two blinks
 
102
#define LOCKOUT_ENABLE                  // (default ON) Enable the "Lock-Out" feature
 
103
#define TRIPLE_CLICK_BATT               // (default ON) enable a triple-click to display Battery status
 
104
#define RAMPING_REVERSE                 // (default ON) reverses ramping direction for every click&hold
 
105
#define OFFTIME_ENABLE 0                // 1: Do OFF time mode memory for Mode Sets on power switching (tailswitch), 0: disabled
 
106
 
 
107
//#define BLINK_ONLY_IND_LED    // blink the Ind. LED, not main LED for: startup, config settings, Enter/Exit lockout blinks
 
108
//#define ADV_RAMP_OPTIONS              // In ramping, enables "mode set" additional method for lock-out and battery voltage display, comment out to disable
 
109
//----------------------------------------------------------------------------------------
 
110
//----------------------------------------------------------------------------------------
 
111
 
 
112
 
 
113
//----------------------------------------------------------------------------------------
 
114
//                      Timed Settings
 
115
//----------------------------------------------------------------------------------------
 
116
#define RAMP_SWITCH_TIMEOUT 75 // make the up/dn ramp switch timeout 1.2 secs (same as IDLE_TIME)
 
117
 
 
118
#define STROBE_SPEED    14,41           // 14,41: 18Hz, 16,47: 16Hz, 20,60: 12.5Hz
 
119
 
 
120
#define SHORT_CLICK_DUR 18              // Short click max duration - for 0.288 secs
 
121
#define RAMP_MOON_PAUSE 23              // this results in a 0.368 sec delay, paused in moon mode
 
122
 
 
123
// One-Click Turn OFF option:
 
124
#define IDLE_TIME         75    // make the time-out 1.2 seconds (Comment out to disable)
 
125
 
 
126
// Switch handling:
 
127
#define LONG_PRESS_DUR    24    // Prev Mode time - long press, 24=0.384s (1/3s: too fast, 0.5s: too slow)
 
128
#define XLONG_PRESS_DUR   68    // strobe mode entry hold time - 68=1.09s (any slower it can happen unintentionally too much)
 
129
#define CONFIG_ENTER_DUR 160    // Config mode entry hold time - 160=2.5s, 128=2s
 
130
 
 
131
#define DBL_CLICK_TICKS   14    //  fast click time for enable/disable of Lock-Out, batt check,
 
132
// and double/triple click timing (14=0.224s, was 16=0.256s)
 
133
 
 
134
 
 
135
#define ADC_DELAY        312    // Delay in ticks between low-batt ramp-downs (312=5secs, was 250=4secs)
 
136
//----------------------------------------------------------------------------------------
 
137
//----------------------------------------------------------------------------------------
 
138
 
 
139
 
 
140
//----------------------------------------------------------------------------------------
 
141
//                      Strobe/Blinky mode Configuration
 
142
//----------------------------------------------------------------------------------------
 
143
#define BATT_CHECK_MODE   80
 
144
#define TEMP_CHECK_MODE   81
 
145
#define FIRM_VERS_MODE    82
 
146
#define SPECIAL_MODES     90            // base/lowest value for special modes
 
147
#define STROBE_MODE               SPECIAL_MODES+1
 
148
//#define RANDOM_STROBE   SPECIAL_MODES+2       // not used for now...
 
149
#define POLICE_STROBE     SPECIAL_MODES+2
 
150
#define BIKING_STROBE     SPECIAL_MODES+3
 
151
#define BEACON_2S_MODE    SPECIAL_MODES+4
 
152
#define BEACON_10S_MODE   SPECIAL_MODES+5
 
153
 
 
154
// Custom define your blinky mode set here:
 
155
#define SPECIAL_MODES_SET       STROBE_MODE, POLICE_STROBE, BIKING_STROBE, BEACON_2S_MODE, BEACON_10S_MODE
 
156
//----------------------------------------------------------------------------------------
 
157
//----------------------------------------------------------------------------------------
 
158
 
 
159
#endif /* SETTINGS_H_ */
 
 
b'\\ No newline at end of file'