aboutsummaryrefslogtreecommitdiff
path: root/hw/sofirn/sp36
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-11-02 17:16:25 -0600
committerSelene ToyKeeper2023-11-02 17:16:25 -0600
commit7cb4fe0944b839f28dfd96a88a772cd6a8b58019 (patch)
tree8d3b203f1650edc28b1f67e1589e3bc870b33fa6 /hw/sofirn/sp36
parentadded LICENSE (GPLv3) (diff)
downloadanduril-7cb4fe0944b839f28dfd96a88a772cd6a8b58019.tar.gz
anduril-7cb4fe0944b839f28dfd96a88a772cd6a8b58019.tar.bz2
anduril-7cb4fe0944b839f28dfd96a88a772cd6a8b58019.zip
reorganized project files (part 1)
(just moved files, didn't change the contents yet, and nothing will work without updating #includes and build scripts and stuff)
Diffstat (limited to 'hw/sofirn/sp36')
-rw-r--r--hw/sofirn/sp36/cfg.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/hw/sofirn/sp36/cfg.h b/hw/sofirn/sp36/cfg.h
new file mode 100644
index 0000000..3661686
--- /dev/null
+++ b/hw/sofirn/sp36/cfg.h
@@ -0,0 +1,36 @@
+// Sofirn SP36 (small Q8) config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+// same as the BLF Q8, mostly
+#include "cfg-blf-q8.h"
+#undef MODEL_NUMBER
+#define MODEL_NUMBER "0612"
+
+// voltage readings were a little high with the Q8 value
+#undef VOLTAGE_FUDGE_FACTOR
+#define VOLTAGE_FUDGE_FACTOR 5 // add 0.25V, not 0.35V
+
+// the high button LED mode on this light uses too much power
+// off mode: low (1)
+// lockout: blinking (3)
+#ifdef INDICATOR_LED_DEFAULT_MODE
+#undef INDICATOR_LED_DEFAULT_MODE
+#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1)
+#endif
+
+// don't blink during the ramp; the button LED brightness is sufficient
+// to indicate which power channel(s) are being used
+#ifdef BLINK_AT_RAMP_MIDDLE
+#undef BLINK_AT_RAMP_MIDDLE
+#endif
+#ifdef BLINK_AT_RAMP_CEIL
+#undef BLINK_AT_RAMP_CEIL
+#endif
+
+// stop panicking at ~60% power or ~3000 lm
+#ifdef THERM_FASTER_LEVEL
+#undef THERM_FASTER_LEVEL
+#endif
+#define THERM_FASTER_LEVEL 130