/****************************************************************************************
* Setups.h
* ========
*
* Created: 4/30/2017 9:27:32 AM
* Author: Tom E
****************************************************************************************/
#ifndef SETTINGS_H_
#define SETTINGS_H_
//------------- Driver Board Settings -------------------------------------
//
#define OUT_CHANNELS 3 // define the output channels as 1, 2 or 3
#define VOLTAGE_MON // Comment out to disable - ramp down and eventual shutoff when battery is low
//#define VOLT_MON_R1R2 // uses external R1/R2 voltage divider, comment out for 1.1V internal ref
// For voltage monitoring on pin #7, only uncomment one of the two def's below:
//#define USING_220K // for using the 220K resistor
#define USING_360K // for using a 360K resistor (LDO and 2S cells)
#define D1_DIODE 2 // Drop over rev. polarity protection diode: 0.2V normally, 0.3V for Q8
// For 2 channel (FET+1) boards:
//#define USING_3807135_BANK // (default OFF) sets up ramping for 380 mA 7135's instead of a FET
// For 3 channel (triple) boards:
//#define TRIPLE_3_7135 // Configure for 3 7135's
#define TRIPLE_8_7135 // Configure for 8 7135's
#define ONBOARD_LED // Enable the LED support
//
//------------- End Driver Board Settings ---------------------------------
#define STARTUP_LIGHT_OFF
#define STARTUP_2BLINKS // enables the powerup/startup two blinks
//#define BLINK_ONLY_IND_LED // blink the Ind. LED, not the main LED for: startup blinks, config settings, Enter/Exit lockout blinks
// Temperature monitoring setup
//-----------------------------
// Temperature Calibration Offset -
#define TEMP_CAL_OFFSET (-11)
// -2 try for the Manker U21 (LJ)
// -2 works for the Warsun X60 (robo) using the 17 mm DEL driver
// -1 try this for proto #1, OSHPark BLF Q8 driver
// 3 about right for BLF Q8 proto #2 and #3, reads ~20 for ~68F (18C)
// -12 this is about right on the DEL DDm-L4 board in the UranusFire C818 light
// -11 On the TA22 board in SupFire M2-Z, it's bout 11-12C too high,reads 35C at room temp, 23C=73.4F
// -8 For the Manker U11 - at -11, reads 18C at 71F room temp (22C)
// -2 For the Lumintop SD26 - at -2, reading a solid 19C-20C (66.2F-68F for 67F room temp)
#define DEFAULT_STEPDOWN_TEMP (54) // default for stepdown temperature (50C=122F, 55C=131F)
// use 50C for smaller size hosts, or a more conservative level (SD26, U11, etc.)
// use 55C to 60C for larger size hosts, maybe C8 and above, or for a more aggressive setting
#define TEMP_ADJ_PERIOD 2812 // Over Temp adjustment frequency: 45 secs (in 16 msec ticks)
//-----------------------------
#define RAMPING_REVERSE // (default ON) reverses ramping direction for every click&hold
#define RAMP_SWITCH_TIMEOUT 75 // make the up/dn ramp switch timeout 1.2 secs (same as IDLE_TIME)
//#define ADV_RAMP_OPTIONS // In ramping, enables "mode set" additional method for lock-out and battery voltage display, comment out to disable
#define TRIPLE_CLICK_BATT // enable a triple-click to display Battery status
#define SHORT_CLICK_DUR 18 // Short click max duration - for 0.288 secs
#define RAMP_MOON_PAUSE 23 // this results in a 0.368 sec delay, paused in moon mode
// ----- 2/14 TE: One-Click Turn OFF option --------------------------------------------
#define IDLE_TIME 75 // make the time-out 1.2 seconds (Comment out to disable)
// Switch handling:
#define LONG_PRESS_DUR 24 // Prev Mode time - long press, 24=0.384s (1/3s: too fast, 0.5s: too slow)
#define XLONG_PRESS_DUR 68 // strobe mode entry hold time - 68=1.09s (any slower it can happen unintentionally too much)
#define CONFIG_ENTER_DUR 160 // Config mode entry hold time - 160=2.5s, 128=2s
#define LOCK_OUT_TICKS 14 // fast click time for enable/disable of Lock-Out, batt check,
// and double/triple click timing (14=0.224s, was 16=0.256s)
#ifndef VOLT_MON_R1R2
#define BATT_LOW 30 // Cell voltage to step light down = 3.0 V
#define BATT_CRIT 28 // Cell voltage to shut the light off = 2.8 V
#endif
#define ADC_DELAY 312 // Delay in ticks between low-batt ramp-downs (312=5secs, was 250=4secs)
#define BATT_CHECK_MODE 80
#define TEMP_CHECK_MODE 81
#define FIRM_VERS_MODE 82
#define SPECIAL_MODES 90 // base/lowest value for special modes
#define STROBE_MODE SPECIAL_MODES+1
//#define RANDOM_STROBE SPECIAL_MODES+2 // not used for now…
#define POLICE_STROBE SPECIAL_MODES+2
#define BIKING_STROBE SPECIAL_MODES+3
#define BEACON_2S_MODE SPECIAL_MODES+4
#define BEACON_10S_MODE SPECIAL_MODES+5
// Custom define your blinky mode set here:
#define SPECIAL_MODES_SET STROBE_MODE, POLICE_STROBE, BIKING_STROBE, BEACON_2S_MODE, BEACON_10S_MODE
//#define SPECIAL_MODES_SET STROBE_MODE, POLICE_STROBE, BEACON_2S_MODE, BEACON_10S_MODE