~toykeeper/flashlight-firmware/fsm

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/cfg-emisar-d1v2-7135-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 (7135+FET) 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
// ATTINY: 1634
 
7
// same as Emisar D4v2, mostly
 
8
// (was only made for a short time, not many people have one)
 
9
#include "cfg-emisar-d4v2.h"
 
10
#undef MODEL_NUMBER
 
11
#define MODEL_NUMBER "0123"
 
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
// (early short run had no button LEDs at all, later run uses linear+FET instead,
 
18
//  so it's unlikely that anyone needs this, but it doesn't hurt anything)
 
19
#define USE_AUX_RGB_LEDS
 
20
#define USE_AUX_RGB_LEDS_WHILE_ON  25
 
21
#define USE_INDICATOR_LED_WHILE_RAMPING
 
22
 
 
23
// safe limit ~50% power
 
24
#undef SIMPLE_UI_CEIL
 
25
#define SIMPLE_UI_CEIL 120
 
26
 
 
27
// stop panicking at ~75% power or ~1000 lm (D1 has a decent power-to-thermal-mass ratio)
 
28
#ifdef THERM_FASTER_LEVEL
 
29
#undef THERM_FASTER_LEVEL
 
30
#endif
 
31
#define THERM_FASTER_LEVEL (RAMP_SIZE*9/10)  // throttle back faster when high
 
32