~toykeeper/flashlight-firmware/fsm

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/cfg-emisar-d4v2-nofet.h

  • Committer: Selene ToyKeeper
  • Date: 2023-11-02 17:05:02 UTC
  • mfrom: (483.12.159 multi-channel)
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: bzr@toykeeper.net-20231102170502-sinkm18qjxlorsxa
merged multi-channel branch with a major refactor and half a year of updates

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// Emisar D4v2-noFET config options for Anduril
 
2
// Copyright (C) 2020-2023 Selene ToyKeeper
 
3
// SPDX-License-Identifier: GPL-3.0-or-later
 
4
#pragma once
 
5
 
 
6
// switch to 1-channel support functions
 
7
#define HWDEF_C_FILE hwdef-emisar-d4v2-nofet.c
 
8
 
2
9
#include "cfg-emisar-d4v2.h"
3
10
#undef MODEL_NUMBER
4
11
#define MODEL_NUMBER "0115"
5
12
// ATTINY: 1634
6
13
 
 
14
// the ramp uses only 1x7135 chip, max ~130 lm
7
15
#undef PWM_CHANNELS
8
16
#define PWM_CHANNELS 1
 
17
 
9
18
#undef PWM1_LEVELS
10
19
#undef PWM2_LEVELS
11
 
#define PWM1_LEVELS 1,1,1,2,2,2,2,3,3,3,3,4,4,5,5,6,6,6,7,8,8,9,9,10,10,11,12,13,13,14,15,16,16,17,18,19,20,21,22,23,23,24,26,27,28,29,30,31,32,33,34,36,37,38,39,41,42,43,45,46,47,49,50,52,53,55,56,58,59,61,62,64,66,67,69,71,72,74,76,78,80,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,116,118,120,122,125,127,129,132,134,136,139,141,144,146,148,151,154,156,159,161,164,166,169,172,174,177,180,183,185,188,191,194,197,200,203,205,208,211,214,217,220,223,226,230,233,236,239,242,245,249,252,255
 
20
#undef PWM_TOPS
 
21
//#define PWM1_LEVELS 1,1,1,2,2,2,2,3,3,3,3,4,4,5,5,6,6,6,7,8,8,9,9,10,10,11,12,13,13,14,15,16,16,17,18,19,20,21,22,23,23,24,26,27,28,29,30,31,32,33,34,36,37,38,39,41,42,43,45,46,47,49,50,52,53,55,56,58,59,61,62,64,66,67,69,71,72,74,76,78,80,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,116,118,120,122,125,127,129,132,134,136,139,141,144,146,148,151,154,156,159,161,164,166,169,172,174,177,180,183,185,188,191,194,197,200,203,205,208,211,214,217,220,223,226,230,233,236,239,242,245,249,252,255
 
22
// level_calc.py 3.01 1 150 7135 -1 0.1 140 --pwm dyn:64:4096:255:3 --clock 11:21:8.0
 
23
// (and some manual tweaks to make half/quarter speed levels less bumpy)
 
24
#define PWM1_LEVELS 1,1,2,2,3,4,4,5,6,7,9,10,11,11,12,13,13,14,15,15,18,18,17,18,18,19,19,19,19,19,20,20,20,20,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,21,21,22,23,24,24,26,27,28,29,30,31,32,33,34,35,36,38,39,40,42,43,44,46,47,49,50,52,53,55,56,58,60,62,63,65,67,69,71,73,75,77,79,81,83,85,88,90,92,95,97,100,102,105,107,110,112,115,118,121,124,127,129,132,135,139,142,145,148,151,155,158,162,165,169,172,176,179,183,187,191,195,199,203,207,211,215,219,223,228,232,237,241,246,250,255
 
25
#define PWM_TOPS 4094,2719,3280,1954,2599,3032,2342,2548,2626,2635,2246,2261,2244,1964,1956,1929,1743,1733,1763,1697,1492,1362,1245,1231,1132,1118,1034,958,889,826,821,767,717,671,629,591,556,523,493,465,440,416,394,373,354,336,319,304,299,293,279,282,269,257,260,249,251,252,253,243,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255
 
26
 
12
27
#undef MAX_1x7135
13
28
#define MAX_1x7135 150
14
29
#undef QUARTERSPEED_LEVEL
15
30
#undef HALFSPEED_LEVEL
16
 
#define QUARTERSPEED_LEVEL 8
17
 
#define HALFSPEED_LEVEL 16
 
31
#define QUARTERSPEED_LEVEL 11
 
32
#define HALFSPEED_LEVEL 21
18
33
 
 
34
#undef DEFAULT_LEVEL
19
35
#define DEFAULT_LEVEL 80
20
36
 
21
37
#undef RAMP_SMOOTH_CEIL
34
50
#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR
35
51
#define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL
36
52
 
 
53
#undef CANDLE_AMPLITUDE
37
54
#define CANDLE_AMPLITUDE 60
38
55
 
39
56
#undef THERM_FASTER_LEVEL
40
57
#define THERM_FASTER_LEVEL 150
41
58
 
42
 
#undef USE_THERMAL_REGULATION
 
59
// maybe keep this, in case someone uses a higher power channel?
 
60
//#undef USE_THERMAL_REGULATION
 
61
//#undef USE_SET_LEVEL_GRADUALLY
 
62