~toykeeper/flashlight-firmware/fsm

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/cfg-emisar-d1v2-linear-fet.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
// Emisar D1v2 (linear+FET) config options for Anduril
 
2
// (2022 re-issue / update of old D1)
 
3
// Copyright (C) 2022-2023 Selene ToyKeeper
 
4
// SPDX-License-Identifier: GPL-3.0-or-later
 
5
#pragma once
 
6
 
 
7
// ATTINY: 1634
 
8
// similar to a Noctigon KR4, sort of
 
9
#include "cfg-noctigon-kr4.h"
 
10
#undef MODEL_NUMBER
 
11
#define MODEL_NUMBER "0124"
 
12
 
 
13
// some models use a simple button LED, others use RGB...
 
14
// ... so include support for both
 
15
#define USE_BUTTON_LED
 
16
// the aux LEDs are in the button, so use them while main LEDs are on
 
17
#define USE_AUX_RGB_LEDS
 
18
#define USE_AUX_RGB_LEDS_WHILE_ON  25
 
19
#define USE_INDICATOR_LED_WHILE_RAMPING
 
20
 
 
21
// safe limit: max regulated power
 
22
#undef SIMPLE_UI_CEIL
 
23
#define SIMPLE_UI_CEIL MAX_1x7135
 
24
 
 
25
// stop panicking at ~75% power or ~1000 lm (D1 has a decent power-to-thermal-mass ratio)
 
26
#ifdef THERM_FASTER_LEVEL
 
27
#undef THERM_FASTER_LEVEL
 
28
#endif
 
29
#define THERM_FASTER_LEVEL (RAMP_SIZE*9/10)  // throttle back faster when high
 
30