~toykeeper/flashlight-firmware/trunk

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/cfg-emisar-d4.h

  • Committer: Selene Scriven
  • Date: 2019-08-11 21:16:23 UTC
  • mfrom: (188.1.250 fsm)
  • Revision ID: bzr@toykeeper.net-20190811211623-i2i2rcud9kbx3hdw
merged fsm to trunk...  lots of updates:
+ attiny1634 support
+ Emisar D4v2 support
+ Mateminco MF01S / MT18 support
+ Fireflies E01 and E07v2 support
+ RGB aux LED support
+ added factory reset function
+ added manual / automatic memory toggle
+ added 2-level brightness during lockout
+ added Fireflies UI
+ made momentary mode also support strobe-group modes
* thermal regulation rewritten, behaves mostly better now
* strobe modes auto-reverse their ramp now
* muggle mode fixes
* UI diagram and manual updated
* button timing adjusted, and compile-time options added for it
* general refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,4,5,7,8,9,11,12,14,15,17,19,20,22,24,25,27,29,31,33,35,37,39,41,43,45,48,50,52,55,57,59,62,64,67,70,72,75,78,81,84,87,90,93,96,99,102,105,109,112,115,119,122,126,129,133,137,141,144,148,152,156,160,165,169,173,177,182,186,191,195,200,205,209,214,219,224,229,234,239,244,250,255
10
10
#define MAX_1x7135 65
11
11
#define HALFSPEED_LEVEL 14
12
 
#define QUARTERSPEED_LEVEL 5
 
12
#define QUARTERSPEED_LEVEL 6
 
13
 
 
14
#define RAMP_SMOOTH_FLOOR 1
 
15
#define RAMP_SMOOTH_CEIL 120
 
16
// 10, 28, 46, [65], 83, 101, 120
 
17
#define RAMP_DISCRETE_FLOOR 10
 
18
#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
 
19
#define RAMP_DISCRETE_STEPS 7
13
20
 
14
21
// optional, makes initial turbo step-down faster so first peak isn't as hot
15
22
// the D4 runs very very hot, so be extra careful
16
 
#define THERM_HARD_TURBO_DROP
 
23
//#define THERM_HARD_TURBO_DROP
17
24
 
18
25
// stop panicking at ~30% power or ~1200 lm
19
26
#define THERM_FASTER_LEVEL 105
 
27
// respond to thermal changes faster
 
28
#define THERMAL_WARNING_SECONDS 3
 
29
#define THERMAL_UPDATE_SPEED 1
 
30
#define THERM_PREDICTION_STRENGTH 4
 
31