~gabe/flashlight-firmware/anduril2

« back to all changes in this revision

Viewing changes to Flintrock/bistro-hd/modegroups/modegroups-biscotti.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
#ifndef __MODEGROUPS_H
 
2
#define __MODEGROUPS_H
 
3
/*
 
4
* Define modegroups for bistro
 
5
*
 
6
* Copyright (C) 2015 Selene Scriven
 
7
* Much work added by Texas Ace, and some minor format change by Flintrock.
 
8
*
 
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.
 
13
*
 
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.
 
18
*
 
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/>.
 
21
*
 
22
*/
 
23
 
 
24
// ../../bin/level_calc.py 64 1 10 1300 y 3 0.23 140
 
25
#define RAMP_SIZE  7
 
26
#define TURBO     RAMP_SIZE      // Convenience code for turbo mode
 
27
 
 
28
#define ONE7135 8
 
29
#define ALL7135s 14
 
30
 
 
31
//PWM channels only used if defined here AND enabled in FR-tk-attiny25.h
 
32
 
 
33
// FET
 
34
#define RAMP_PWM2   1,10,42,75,122,133,255
 
35
 
 
36
 
 
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
 
39
 
 
40
 
 
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
 
44
 
 
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
 
51
//#define USE_SOS
 
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"
 
58
 
 
59
 
 
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 .
 
63
 
 
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
 
67
#endif
 
68
 
 
69
PROGMEM const uint8_t hiddenmodes[] = { HIDDENMODES };
 
70
 
 
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.
 
82
//
 
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,
 
90
        1,  2,  3,  5,  7, 0,
 
91
        7,  5,  3,  2,  1,  0,
 
92
        2,  4,  7,  STROBE_10HZ, BIKING_STROBE, BATTCHECK, SOS,  0,
 
93
        2,  4,  7,  0, 
 
94
        7,  4,  2,  0, 
 
95
        1,  2,  3,  6,  STROBE_10HZ, BIKING_STROBE, BATTCHECK, SOS,0,
 
96
        1,  2,  3,  6,  0, 
 
97
        6,  3,  2,  1,  0, 
 
98
        2,  3,  5,  7,  0,  
 
99
        7,  4, STROBE_10HZ,  0,
 
100
        7,  0,
 
101
};
 
102
 
 
103
#endif
 
 
b'\\ No newline at end of file'