~toykeeper/flashlight-firmware/fsm

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/cfg-ff-e01.h

  • Committer: Selene ToyKeeper
  • Date: 2023-11-04 15:09:10 UTC
  • mfrom: (483.1.175 anduril2)
  • Revision ID: bzr@toykeeper.net-20231104150910-ddd3afw4nhfvof2l
merged anduril2 branch -> fsm, with *years* of changes
(this also means this code is now Anduril 2 instead of Anduril 1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
// Fireflies E01 SST-40 thrower config options for Anduril
2
 
// most of the good stuff is in the FFUI config; just copy it
3
 
#include "../fireflies-ui/cfg-ff-e01.h"
4
 
 
5
 
#ifndef BLINK_AT_RAMP_CEILING
6
 
#define BLINK_AT_RAMP_CEILING
 
2
// Copyright (C) 2019-2023 Selene ToyKeeper
 
3
// SPDX-License-Identifier: GPL-3.0-or-later
 
4
#pragma once
 
5
 
 
6
#define MODEL_NUMBER "0441"
 
7
#include "hwdef-ff-pl47.h"
 
8
// ATTINY: 85
 
9
 
 
10
// disable indicator LED; it's hardwired
 
11
#ifdef USE_INDICATOR_LED
 
12
#undef USE_INDICATOR_LED
7
13
#endif
8
14
 
 
15
 
 
16
#define RAMP_SIZE 150
 
17
 
 
18
// driver is a FET + 3x7135, ~413 lm at highest regulated level
 
19
// ../../../bin/level_calc.py seventh 2 150 7135 1 12 414 FET 2 10 1930
 
20
#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,5,6,6,7,8,8,9,10,10,11,12,13,14,15,15,16,17,18,20,21,22,23,24,26,27,28,30,31,33,34,36,38,39,41,43,45,47,49,51,53,56,58,60,63,65,68,71,74,77,80,83,86,89,93,96,100,103,107,111,115,119,124,128,132,137,142,147,152,157,163,168,174,180,186,192,198,204,211,218,225,232,240,247,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,0
 
21
#define PWM2_LEVELS 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,7,9,12,14,16,19,22,24,27,30,33,36,39,42,45,48,52,55,58,62,66,69,73,77,81,85,90,94,98,103,107,112,117,122,127,132,137,143,148,154,160,166,172,178,184,191,197,204,211,218,225,232,240,247,255
 
22
#define MAX_1x7135 93
 
23
#define HALFSPEED_LEVEL 14
 
24
#define QUARTERSPEED_LEVEL 7
 
25
 
 
26
// ceiling is level 130/150  (50% power)
 
27
#define RAMP_SMOOTH_FLOOR 1
 
28
#define RAMP_SMOOTH_CEIL 130
 
29
 
9
30
// 20, 38, 56, 75, [93], 111, 130 (93 is highest regulated)
10
31
// (9 / 45 / 116 / 248 / 467 / 742 / 1280 + 2140 lm)
11
 
#undef RAMP_DISCRETE_STEPS
 
32
#define RAMP_DISCRETE_FLOOR 20
 
33
#define RAMP_DISCRETE_CEIL  RAMP_SMOOTH_CEIL
12
34
#define RAMP_DISCRETE_STEPS 7
13
35
 
14
 
// shortcut for first-time setup
15
 
#define USE_TENCLICK_THERMAL_CONFIG
 
36
// safe limit ~50% power
 
37
// 20 56 [93] 130
 
38
#define SIMPLE_UI_FLOOR 20
 
39
#define SIMPLE_UI_CEIL 130
 
40
#define SIMPLE_UI_STEPS 4
 
41
 
 
42
// thermal regulation parameters
 
43
#define MIN_THERM_STEPDOWN 65  // lowest value it'll step down to
 
44
#define THERM_FASTER_LEVEL 130
 
45
 
 
46
#ifndef BLINK_AT_RAMP_CEIL
 
47
#define BLINK_AT_RAMP_CEIL
 
48
#endif
 
49
 
 
50
// don't do this
 
51
#undef BLINK_AT_RAMP_MIDDLE
 
52
 
 
53
#define USE_SMOOTH_STEPS
 
54
 
 
55
// too big, turn off extra features
 
56
#undef USE_SOS_MODE
 
57
//#undef USE_TACTICAL_MODE