4
* Define modegroups for bistro
6
* Copyright (C) 2015 Selene Scriven
7
* Much work added by Texas Ace, and some minor format change by Flintrock.
9
* This program is free software: you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation, either version 3 of the License, or
12
* (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program. If not, see <http://www.gnu.org/licenses/>.
24
// ../../bin/level_calc.py 64 1 10 1300 y 3 0.23 140
26
#define TURBO RAMP_SIZE // Convenience code for turbo mode
31
//PWM channels only used if defined here AND enabled in FR-tk-attiny25.h
34
#define RAMP_PWM2 1,10,42,75,122,133,255
37
// uncomment to ramp up/down to a mode instead of jumping directly
38
// #define SOFT_START // Cause a flash during mode change with some drivers
41
// output to use for blinks on battery check (and other modes)
42
#define BLINK_BRIGHTNESS RAMP_SIZE/4
43
// ms per normal-speed blink
45
//** Enable "strobes" ****//
46
#define USE_BATTCHECK // use battery check mode
47
#define USE_BIKING_STROBE // Single flash biking strobe mode
48
// #define USE_FULL_BIKING_STROBE // stutter enhancement to biking strobe, requires USE_BIKING_STROBE
49
//#define USE_POLICE_STROBE // Dual mode alternating strobe
50
//#define USE_RANDOM_STROBE
52
//#define USE_STROBE_8HZ
53
#define USE_STROBE_10HZ
54
//#define USE_STROBE_16HZ
55
//#define USE_STROBE_OLD_MOVIE
56
//#define USE_STROBE_CREEPY // Creepy strobe mode, or really cool if you have a bunch of friends around
57
//#define USE_RAMP //Ramping "strobe"
60
// Hidden modes are *before* the lowest (moon) mode, and should be specified
61
// in reverse order. So, to go backward from moon to turbo to strobe to
62
// battcheck, use BATTCHECK,STROBE,TURBO .
64
#ifndef HIDDENMODES // This will already be set as empty if no reverse clicks are enabled.
65
#define HIDDENMODES BIKING_STROBE,BATTCHECK,STROBE_10HZ,TURBO
66
//#define HIDDENMODES BATTCHECK,RAMP,TURBO
69
PROGMEM const uint8_t hiddenmodes[] = { HIDDENMODES };
71
// default values calculated by group_calc.py
72
// ONE7135 = 8, ALL7135s = 14, TURBO = 20
73
// Modes approx mA and lumen values for single XP-L LEDe
74
// 1 = 5.5ma = .5lm, 3 = 19ma = 4lm, 4 = 37mA = 12lm, 5 = 66ma = 24lm,
75
// 6 = 135ma = ~60lm, 8 (one7135) = 355ma = ~150lm
76
// Above this it will depend on how many 7135's are installed
77
// With 7x 7135 10 = 640ma, 12 = 1A = ~335lm, 14 (ALL7135s) = 2.55A = ~830lm
78
// Above this you are using the FET and it will vary wildy depending on the build, generally you only need turbo after ALL7135s unless it is a triple build
79
#define NUM_MODEGROUPS 2 // don't count muggle mode
80
// mode groups are now zero terminated rather than fixed length. Presently 8 modes max but this can change now.
81
// going too near the fast press limit could be annoying though as a full cycle requires pausing to avoid the menu.
83
// Define maximum modes per group
84
// Increasing this is not expensive, essentially free in program size.
85
// The memory usage depends only on total of actual used modes (plus the single trailing zero).
86
#define MAX_MODES 9 // includes moon mode, defined modes per group should be one less. The 0 terminator doesn't count though.
87
// Each group must end in one and ONLY one zero, and can include no other 0.
88
PROGMEM const uint8_t modegroups[] = {
89
1, 2, 3, 5, 7, STROBE_10HZ, BIKING_STROBE, BATTCHECK,0,
92
2, 4, 7, STROBE_10HZ, BIKING_STROBE, BATTCHECK, SOS, 0,
95
1, 2, 3, 6, STROBE_10HZ, BIKING_STROBE, BATTCHECK, SOS,0,
b'\\ No newline at end of file'