~toykeeper/flashlight-firmware/trunk

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h

  • Committer: Selene Scriven
  • Date: 2014-07-22 23:45:40 UTC
  • Revision ID: ubuntu@toykeeper.net-20140722234540-7jkvx6or9mow8dze
Moved my sources into ToyKeeper/ directory to keep things a little cleaner.
By default, I'll put my personal firmware there to indicate it might not be
as useful for general-purpose use, it's just something I made.
(can move or copy some again later if they end up being interesting to others)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Noctigon K1 12V config options for Anduril
2
 
#include "hwdef-Noctigon_K1-12V.h"
3
 
// ATTINY: 1634
4
 
 
5
 
// this light can safely run a bit hotter than most
6
 
#undef DEFAULT_THERM_CEIL
7
 
#define DEFAULT_THERM_CEIL 55
8
 
 
9
 
// this light has three aux LED channels: R, G, B
10
 
#define USE_AUX_RGB_LEDS
11
 
#define USE_AUX_RGB_LEDS_WHILE_ON
12
 
#define USE_INDICATOR_LED_WHILE_RAMPING
13
 
#define RGB_LED_OFF_DEFAULT 0x18  // low, voltage
14
 
#define RGB_LED_LOCKOUT_DEFAULT 0x37  // blinking, rainbow
15
 
 
16
 
// enable blinking aux LEDs
17
 
#define TICK_DURING_STANDBY
18
 
#define STANDBY_TICK_SPEED 3  // every 0.128 s
19
 
 
20
 
 
21
 
// level_calc.py cube 1 150 7135 0 4 1300
22
 
// (with max_pwm set to 1023)
23
 
// (level 0 is usable on this light)
24
 
#define RAMP_LENGTH 150
25
 
#define PWM1_LEVELS 0,0,1,1,2,2,3,3,4,5,5,6,7,8,9,10,11,12,13,14,15,16,17,19,20,22,23,25,26,28,30,31,33,35,37,39,42,44,46,48,51,53,56,59,61,64,67,70,73,76,80,83,86,90,94,97,101,105,109,113,117,122,126,130,135,140,144,149,154,159,165,170,175,181,187,193,198,204,211,217,223,230,236,243,250,257,264,271,279,286,294,302,310,318,326,334,343,351,360,369,378,387,397,406,416,426,436,446,456,466,477,488,499,510,521,532,544,555,567,579,591,604,616,629,642,655,668,682,695,709,723,737,751,766,780,795,810,825,841,856,872,888,904,921,937,954,971,988,1005,1023
26
 
#define MAX_1x7135 50
27
 
 
28
 
// the entire ramp is regulated; don't blink halfway up
29
 
#ifdef BLINK_AT_RAMP_MIDDLE
30
 
#undef BLINK_AT_RAMP_MIDDLE
31
 
#endif
32
 
 
33
 
// don't slow down at low levels; this isn't that sort of light
34
 
// (it needs to stay at full speed for the 10-bit PWM to work)
35
 
#ifdef USE_DYNAMIC_UNDERCLOCKING
36
 
#undef USE_DYNAMIC_UNDERCLOCKING
37
 
#endif
38
 
 
39
 
#define RAMP_SMOOTH_FLOOR 1
40
 
#define RAMP_SMOOTH_CEIL 130
41
 
// 10, 30, [50], 70, 90, 110, 130
42
 
#define RAMP_DISCRETE_FLOOR 10
43
 
#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL
44
 
#define RAMP_DISCRETE_STEPS 7
45
 
 
46
 
#define MUGGLE_FLOOR RAMP_DISCRETE_FLOOR
47
 
#define MUGGLE_CEILING 70
48
 
 
49
 
// make candle mode wobble more
50
 
#define CANDLE_AMPLITUDE 32
51
 
 
52
 
// stop panicking at ~70% power or ~600 lm
53
 
#define THERM_FASTER_LEVEL 130
54
 
 
55
 
#define THERM_RESPONSE_MAGNITUDE 32  // smaller adjustments, this host changes temperature slowly
56
 
#define THERM_NEXT_WARNING_THRESHOLD 32  // more error tolerance before adjusting
57
 
 
58
 
// easier access to thermal config mode, for Noctigon
59
 
#define USE_TENCLICK_THERMAL_CONFIG
60
 
 
61
 
// slow down party strobe; this driver can't pulse for 1ms or less
62
 
#define PARTY_STROBE_ONTIME 4
63
 
 
64
 
#define THERM_CAL_OFFSET 5
65