Just a quick note… I updated the level calculator to work with any number of power channels. It assumes some things though, like that there is only one FET channel (at most) and it’s the most powerful channel and it works better by itself than with other channels turned on. It’ll bail and refuse to run if you tell it a FET channel has less output than all the others combined.
http://bazaar.launchpad.net/~toykeeper/flashlight-firmware/tiny25/view/head:/bin/level_calc.py
Here’s an example use, calculating 7 evenly-spaced modes on a tripledown with 1x7135, 6x7135, and 1xFET driving a triple XP-L at a max of 3000 lumens:
> ./level_calc.py
How many power channels? (1) 3
How many total levels do you want? (4) 7
Describe the channels in order of lowest to highest power.
===== Channel 1 =====
Type of channel: ["7135"] or "FET": (7135) 7135
Lowest visible PWM level: (6) 3
How bright is the lowest level, in lumens? (0.25) 0.25
How bright is the highest level, in lumens? (1000) 140
===== Channel 2 =====
Type of channel: ["7135"] or "FET": (7135) 7135
Lowest visible PWM level: (6) 3
How bright is the lowest level, in lumens? (0.25) 1.5
How bright is the highest level, in lumens? (1000) 840
===== Channel 3 =====
Type of channel: ["7135"] or "FET": (7135) FET
Lowest visible PWM level: (6) 1
How bright is the lowest level, in lumens? (0.25) 10
How bright is the highest level, in lumens? (1000) 3000
1: visually 0.63 (0.25 lm): 3.00/255, 0.00/255, 0.00/255
2: visually 2.93 (25.12 lm): 47.85/255, 0.00/255, 0.00/255
3: visually 5.23 (142.85 lm): 255.00/255, 3.41/255, 0.00/255
4: visually 7.53 (426.32 lm): 255.00/255, 88.60/255, 0.00/255
5: visually 9.82 (948.41 lm): 255.00/255, 245.51/255, 0.00/255
6: visually 12.12 (1782.01 lm): 255.00/255, 255.00/255, 101.08/255
7: visually 14.42 (3000.00 lm): 0.00/255, 0.00/255, 255.00/255
PWM1 values: 3,48,255,255,255,255,0
PWM2 values: 0,0,3,89,246,255,0
PWM3 values: 0,0,0,0,0,101,255
You can also specify all the options on the command line, like this:
> ./level_calc.py 3 7 7135 3 0.25 140 7135 3 1.5 840 FET 1 10 3000
Since it’s close already, I’d probably manually adjust the values a bit afterward to make sure one mode is exactly 140 lm and one mode is exactly 980 lm — so that modes 3 and 5 would have no PWM.