~toykeeper/flashlight-firmware/fsm

« back to all changes in this revision

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

  • Committer: Selene ToyKeeper
  • Date: 2023-07-21 21:47:52 UTC
  • mto: (483.1.175 anduril2)
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: bzr@toykeeper.net-20230721214752-o95ojcz2zteh8g8q
converted noctigon-k1 to multi-channel

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 
6
6
#define MODEL_NUMBER "0251"
7
7
// (originally known as Emisar D1S v2)
8
 
#include "hwdef-Noctigon_K1.h"
 
8
#include "hwdef-noctigon-k1.h"
9
9
#include "hank-cfg.h"
10
10
// ATTINY: 1634
11
11
 
15
15
 
16
16
// this light has three aux LED channels: R, G, B
17
17
#define USE_AUX_RGB_LEDS
18
 
#define USE_AUX_RGB_LEDS_WHILE_ON
 
18
#define USE_AUX_RGB_LEDS_WHILE_ON  5
19
19
#define USE_INDICATOR_LED_WHILE_RAMPING
20
20
 
21
21
 
 
22
#define RAMP_SIZE 150
 
23
 
22
24
// ../../bin/level_calc.py cube 1 150 7135 1 4 1300
23
25
// (with max_pwm set to 1023)
24
26
// (level 0 flickers and isn't relevant on a thrower, so it's omitted)
25
27
#define RAMP_LENGTH 150
26
28
#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,6,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,23,24,26,27,29,31,32,34,36,38,40,43,45,47,49,52,54,57,60,62,65,68,71,74,77,81,84,87,91,95,98,102,106,110,114,118,122,127,131,136,141,145,150,155,160,166,171,176,182,188,193,199,205,211,218,224,231,237,244,251,258,265,272,280,287,295,303,310,319,327,335,344,352,361,370,379,388,397,407,416,426,436,446,457,467,477,488,499,510,521,533,544,556,568,580,592,604,617,629,642,655,668,682,695,709,723,737,751,766,781,795,810,826,841,857,872,888,904,921,937,954,971,988,1005,1023
 
29
 
27
30
#define MAX_1x7135 50
28
 
 
29
 
// the entire ramp is regulated; don't blink halfway up
30
 
#ifdef BLINK_AT_RAMP_MIDDLE
31
 
#undef BLINK_AT_RAMP_MIDDLE
32
 
#endif
33
 
 
 
31
#define DEFAULT_LEVEL 50
 
32
#define MIN_THERM_STEPDOWN 50  // should be above highest dyn_pwm level
 
33
//#define HALFSPEED_LEVEL 12
 
34
//#define QUARTERSPEED_LEVEL 4
34
35
// don't slow down at low levels; this isn't that sort of light
35
36
// (it needs to stay at full speed for the 10-bit PWM to work)
36
37
#ifdef USE_DYNAMIC_UNDERCLOCKING
49
50
#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL
50
51
#define SIMPLE_UI_STEPS 5
51
52
 
52
 
// make candle mode wobble more
53
 
#define CANDLE_AMPLITUDE 32
54
 
 
55
53
// stop panicking at ~70% power or ~600 lm
56
54
#define THERM_FASTER_LEVEL 130
57
55
 
 
56
#define THERM_CAL_OFFSET 5
 
57
 
58
58
#define THERM_RESPONSE_MAGNITUDE 32  // smaller adjustments, this host changes temperature slowly
59
59
#define THERM_NEXT_WARNING_THRESHOLD 32  // more error tolerance before adjusting
60
60
 
 
61
// the power regulator is a bit slow, so push it harder for a quick response from off
 
62
#define DEFAULT_JUMP_START_LEVEL 10
 
63
#define BLINK_BRIGHTNESS DEFAULT_LEVEL
 
64
#define BLINK_ONCE_TIME 12
 
65
 
 
66
// show each channel while it scroll by in the menu
 
67
#define USE_CONFIG_COLORS
 
68
 
 
69
// there is usually no lighted button,
 
70
// so blink numbers on the main LEDs by default (but allow user to change it)
 
71
#define DEFAULT_BLINK_CHANNEL  CM_MAIN
 
72
 
61
73
// slow down party strobe; this driver can't pulse for 1ms or less
62
74
#define PARTY_STROBE_ONTIME 2
63
75
 
64
 
#define THERM_CAL_OFFSET 5
 
76
// make candle mode wobble more
 
77
#define CANDLE_AMPLITUDE 32
 
78
 
 
79
// don't blink while ramping; the entire ramp is regulated
 
80
#ifdef BLINK_AT_RAMP_MIDDLE
 
81
#undef BLINK_AT_RAMP_MIDDLE
 
82
#endif
65
83