diff options
| author | Selene ToyKeeper | 2023-11-02 17:16:25 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2023-11-02 17:16:25 -0600 |
| commit | 7cb4fe0944b839f28dfd96a88a772cd6a8b58019 (patch) | |
| tree | 8d3b203f1650edc28b1f67e1589e3bc870b33fa6 /hw/fireflies | |
| parent | added LICENSE (GPLv3) (diff) | |
| download | anduril-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/fireflies')
| -rw-r--r-- | hw/fireflies/e01/cfg.h | 57 | ||||
| -rw-r--r-- | hw/fireflies/pl47-219/cfg.h | 15 | ||||
| -rw-r--r-- | hw/fireflies/pl47/cfg.h | 79 | ||||
| -rw-r--r-- | hw/fireflies/pl47/hwdef.h | 26 | ||||
| -rw-r--r-- | hw/fireflies/pl47g2/cfg.h | 67 | ||||
| -rw-r--r-- | hw/fireflies/rot66-219/cfg.h | 26 | ||||
| -rw-r--r-- | hw/fireflies/rot66/cfg.h | 65 | ||||
| -rw-r--r-- | hw/fireflies/rot66/hwdef.h | 24 | ||||
| -rw-r--r-- | hw/fireflies/rot66g2/cfg.h | 59 |
9 files changed, 418 insertions, 0 deletions
diff --git a/hw/fireflies/e01/cfg.h b/hw/fireflies/e01/cfg.h new file mode 100644 index 0000000..07bda87 --- /dev/null +++ b/hw/fireflies/e01/cfg.h @@ -0,0 +1,57 @@ +// Fireflies E01 SST-40 thrower config options for Anduril +// Copyright (C) 2019-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +#define MODEL_NUMBER "0441" +#include "hwdef-ff-pl47.h" +// ATTINY: 85 + +// disable indicator LED; it's hardwired +#ifdef USE_INDICATOR_LED +#undef USE_INDICATOR_LED +#endif + + +#define RAMP_SIZE 150 + +// driver is a FET + 3x7135, ~413 lm at highest regulated level +// ../../../bin/level_calc.py seventh 2 150 7135 1 12 414 FET 2 10 1930 +#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 +#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 +#define MAX_1x7135 93 +#define HALFSPEED_LEVEL 14 +#define QUARTERSPEED_LEVEL 7 + +// ceiling is level 130/150 (50% power) +#define RAMP_SMOOTH_FLOOR 1 +#define RAMP_SMOOTH_CEIL 130 + +// 20, 38, 56, 75, [93], 111, 130 (93 is highest regulated) +// (9 / 45 / 116 / 248 / 467 / 742 / 1280 + 2140 lm) +#define RAMP_DISCRETE_FLOOR 20 +#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL +#define RAMP_DISCRETE_STEPS 7 + +// safe limit ~50% power +// 20 56 [93] 130 +#define SIMPLE_UI_FLOOR 20 +#define SIMPLE_UI_CEIL 130 +#define SIMPLE_UI_STEPS 4 + +// thermal regulation parameters +#define MIN_THERM_STEPDOWN 65 // lowest value it'll step down to +#define THERM_FASTER_LEVEL 130 + +#ifndef BLINK_AT_RAMP_CEIL +#define BLINK_AT_RAMP_CEIL +#endif + +// don't do this +#undef BLINK_AT_RAMP_MIDDLE + +#define USE_SMOOTH_STEPS + +// too big, turn off extra features +#undef USE_SOS_MODE +//#undef USE_TACTICAL_MODE diff --git a/hw/fireflies/pl47-219/cfg.h b/hw/fireflies/pl47-219/cfg.h new file mode 100644 index 0000000..11bd5b1 --- /dev/null +++ b/hw/fireflies/pl47-219/cfg.h @@ -0,0 +1,15 @@ +// Fireflies PL47-219B config options for Anduril +// Copyright (C) 2018-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +// same as PL47 but with FET modes limited to 67% power +// to avoid destroying the LEDs +#include "cfg-ff-pl47.h" +#undef MODEL_NUMBER +#define MODEL_NUMBER "0422" + +#undef PWM1_LEVELS +#undef PWM2_LEVELS +#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,16,17,18,19,21,22,23,25,26,27,29,31,32,34,36,38,40,42,44,46,49,51,54,56,59,62,65,68,71,74,78,81,85,89,93,97,101,106,110,115,120,125,130,136,141,147,153,160,166,173,180,187,195,202,210,219,227,236,245,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 +#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,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,19,20,22,23,25,27,28,30,31,33,35,37,39,41,43,45,47,50,52,55,57,60,63,65,68,71,74,77,80,83,87,90,93,97,101,105,108,112,116,121,125,129,134,139,143,148,153,159,164,169 diff --git a/hw/fireflies/pl47/cfg.h b/hw/fireflies/pl47/cfg.h new file mode 100644 index 0000000..6436477 --- /dev/null +++ b/hw/fireflies/pl47/cfg.h @@ -0,0 +1,79 @@ +// Fireflies PL47 config options for Anduril +// Copyright (C) 2018-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +#define MODEL_NUMBER "0421" +#include "hwdef-ff-pl47.h" +// ATTINY: 85 + +// the button lights up +#define USE_INDICATOR_LED +// the aux LEDs are in the same place as the main LEDs +#ifdef USE_INDICATOR_LED_WHILE_RAMPING +#undef USE_INDICATOR_LED_WHILE_RAMPING +#endif +//#define USE_INDICATOR_LED_WHILE_RAMPING + +// off mode: high (2) +// lockout: blinking (3) +#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) + +// the "low" mode doesn't work on this light's aux LEDs +// (but it does work on the switch LEDs) +// Fireflies wants to skip aux LED mode 1 (low) +#define INDICATOR_LED_SKIP_LOW + + +#define RAMP_SIZE 150 + +// driver is a FET + 3x7135, ~400 lm at highest regulated level +// ramp copied from Emisar D4S ramp +#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,16,17,18,19,21,22,23,25,26,27,29,31,32,34,36,38,40,42,44,46,49,51,54,56,59,62,65,68,71,74,78,81,85,89,93,97,101,106,110,115,120,125,130,136,141,147,153,160,166,173,180,187,195,202,210,219,227,236,245,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,0 +#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,1,3,4,5,7,8,10,11,13,14,16,18,19,21,23,25,27,29,31,34,36,38,41,43,46,48,51,54,57,60,63,66,69,72,76,79,83,87,91,95,99,103,107,112,116,121,126,131,136,141,146,152,158,163,169,175,182,188,195,202,209,216,223,231,239,247,255 +#define MAX_1x7135 83 +#define HALFSPEED_LEVEL 13 +#define QUARTERSPEED_LEVEL 6 + +// ceiling is level 120/150 +#define RAMP_SMOOTH_FLOOR 1 +#define RAMP_SMOOTH_CEIL 120 + +// 10, 28, 46, 65, 83, 101, 120 (83 is highest regulated) +#define RAMP_DISCRETE_FLOOR 10 +#define RAMP_DISCRETE_CEIL 120 +#define RAMP_DISCRETE_STEPS 7 + +// safe limit ~25% power / ~1000 lm +// 10 34 59 [83] 108 +#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR +#define SIMPLE_UI_CEIL 108 +#define SIMPLE_UI_STEPS 5 + +// ~25 lm to ~300 lm +//#define SIMPLE_UI_FLOOR 30 +//#define SIMPLE_UI_CEIL MAX_1x7135 +// ~50 lm to ~500 lm +//#define SIMPLE_UI_FLOOR 40 +//#define SIMPLE_UI_CEIL 90 + +// thermal regulation parameters +#ifdef MIN_THERM_STEPDOWN +#undef MIN_THERM_STEPDOWN // this should be lower, because 3x7135 instead of 1x7135 +#endif +#define MIN_THERM_STEPDOWN 60 // lowest value it'll step down to +// regulate down faster when the FET is active, slower otherwise +#define THERM_FASTER_LEVEL 135 // throttle back faster when high + +#ifndef BLINK_AT_RAMP_CEIL +#define BLINK_AT_RAMP_CEIL +#endif + +// don't do this +#undef BLINK_AT_RAMP_MIDDLE + +#define USE_SMOOTH_STEPS + +// too big, turn off extra features +#undef USE_SOS_MODE +#undef USE_TACTICAL_MODE diff --git a/hw/fireflies/pl47/hwdef.h b/hw/fireflies/pl47/hwdef.h new file mode 100644 index 0000000..7ce7070 --- /dev/null +++ b/hw/fireflies/pl47/hwdef.h @@ -0,0 +1,26 @@ +// Fireflies PL47 driver layout +// Copyright (C) 2018-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +// same as a D4S, basically, except ... + +// ... the PL47 has aux LEDs on pin 7 +#ifndef AUXLED_PIN +#define AUXLED_PIN PB2 // pin 7 +#endif + +// ... and switch LEDs on pin 3 +#ifndef AUXLED2_PIN +#define AUXLED2_PIN PB4 // pin 3 +#endif + +// ... and slightly different calibration +#ifndef VOLTAGE_FUDGE_FACTOR +#define VOLTAGE_FUDGE_FACTOR 7 // add 0.35V +#endif + +#include "hwdef-emisar-d4s.h" +#undef FSM_EMISAR_D4S_DRIVER +#undef FSM_EMISAR_D4_DRIVER + diff --git a/hw/fireflies/pl47g2/cfg.h b/hw/fireflies/pl47g2/cfg.h new file mode 100644 index 0000000..830d7e8 --- /dev/null +++ b/hw/fireflies/pl47g2/cfg.h @@ -0,0 +1,67 @@ +// Fireflies PL47 G2 config options for Anduril +// Copyright (C) 2019-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +#define MODEL_NUMBER "0423" +#include "hwdef-ff-pl47.h" +// ATTINY: 85 + +// the button lights up +#define USE_INDICATOR_LED +// the aux LEDs are in the same place as the main LEDs +#ifdef USE_INDICATOR_LED_WHILE_RAMPING +#undef USE_INDICATOR_LED_WHILE_RAMPING +#endif + +// off mode: low (1) +// lockout: blinking (3) +#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1) + + + +#define RAMP_SIZE 150 + +// driver is a FET + 3x7135, ~400 lm at highest regulated level +// ramp copied from Emisar D4S ramp +#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,16,17,18,19,21,22,23,25,26,27,29,31,32,34,36,38,40,42,44,46,49,51,54,56,59,62,65,68,71,74,78,81,85,89,93,97,101,106,110,115,120,125,130,136,141,147,153,160,166,173,180,187,195,202,210,219,227,236,245,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,0 +#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,1,3,4,5,7,8,10,11,13,14,16,18,19,21,23,25,27,29,31,34,36,38,41,43,46,48,51,54,57,60,63,66,69,72,76,79,83,87,91,95,99,103,107,112,116,121,126,131,136,141,146,152,158,163,169,175,182,188,195,202,209,216,223,231,239,247,255 +#define MAX_1x7135 83 +#define HALFSPEED_LEVEL 13 +#define QUARTERSPEED_LEVEL 6 + +// ceiling is level 120/150 +#define RAMP_SMOOTH_FLOOR 1 +#define RAMP_SMOOTH_CEIL 120 + +// 10, 28, 46, 65, 83, 101, 120 (83 is highest regulated) +#define RAMP_DISCRETE_FLOOR 10 +#define RAMP_DISCRETE_CEIL 120 +#define RAMP_DISCRETE_STEPS 7 + +// safe limit ~25% power / ~1000 lm +// 10 34 59 [83] 108 +#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR +#define SIMPLE_UI_CEIL 108 +#define SIMPLE_UI_STEPS 5 + +// thermal regulation parameters +#ifdef MIN_THERM_STEPDOWN +#undef MIN_THERM_STEPDOWN // this should be lower, because 3x7135 instead of 1x7135 +#endif +#define MIN_THERM_STEPDOWN 60 // lowest value it'll step down to +// regulate down faster when the FET is active, slower otherwise +#define THERM_FASTER_LEVEL 135 // throttle back faster when high + +#ifndef BLINK_AT_RAMP_CEIL +#define BLINK_AT_RAMP_CEIL +#endif + +// don't do this +#undef BLINK_AT_RAMP_MIDDLE + +#define USE_SMOOTH_STEPS + +// too big, turn off extra features +#undef USE_SOS_MODE +#undef USE_TACTICAL_MODE diff --git a/hw/fireflies/rot66-219/cfg.h b/hw/fireflies/rot66-219/cfg.h new file mode 100644 index 0000000..4dad4e2 --- /dev/null +++ b/hw/fireflies/rot66-219/cfg.h @@ -0,0 +1,26 @@ +// Fireflies ROT66-219 (7x7135) config options for Anduril +// Copyright (C) 2018-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +// same as regular ROT66, but calibrated for Nichia 219B with 7x7135 chips +#include "cfg-ff-rot66.h" +#undef MODEL_NUMBER +#define MODEL_NUMBER "0412" + +// driver is a FET+N+1, +// where N=6 for the 219b version +// calculated to get transition points at level 65 and 115 +// first 65 steps same as regular ROT66 +// remaining steps from this command: +// level_calc.py ninth 3 150 7135 1 1.4 110.1 7135 14 1 1058.5 FET 1 10 4500 +#undef PWM2_LEVELS +#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,15,17,18,20,21,23,25,27,29,31,33,36,38,41,43,46,49,52,55,58,62,65,69,73,77,81,86,90,95,100,105,111,116,122,128,135,141,148,155,163,170,178,187,195,204,214,224,234,244,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 +#undef PWM3_LEVELS +#define PWM3_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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,8,12,16,21,25,30,35,40,45,50,56,62,68,74,81,87,94,101,109,116,124,133,141,150,159,168,178,188,198,209,220,231,243,255 +#undef MAX_Nx7135 +#define MAX_Nx7135 115 + +// regulate down faster when the FET is active, slower otherwise +#undef THERM_FASTER_LEVEL +#define THERM_FASTER_LEVEL 130 // throttle back faster when high diff --git a/hw/fireflies/rot66/cfg.h b/hw/fireflies/rot66/cfg.h new file mode 100644 index 0000000..752ddbb --- /dev/null +++ b/hw/fireflies/rot66/cfg.h @@ -0,0 +1,65 @@ +// Fireflies ROT66 (14x7135) config options for Anduril +// Copyright (C) 2018-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +#define MODEL_NUMBER "0411" +#include "hwdef-ff-rot66.h" + +// the button lights up +#define USE_INDICATOR_LED +// the button is visible while main LEDs are on +#define USE_INDICATOR_LED_WHILE_RAMPING + +// off mode: high (2) +// lockout: blinking (3) +#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 2) + +#define RAMP_SIZE 150 + +// driver is a FET+N+1, +// where N=6 for the 219b version, +// or N=13 for the XP-L HI version (this version) +// calculated to get transition points at level 65 and 125 +// first 65 steps copied from FW3A +#define PWM1_LEVELS 1,1,2,2,3,3,4,4,5,6,7,8,9,10,12,13,14,15,17,19,20,22,24,26,29,31,34,36,39,42,45,48,51,55,59,62,66,70,75,79,84,89,93,99,104,110,115,121,127,134,140,147,154,161,168,176,184,192,200,209,217,226,236,245,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,0 +// remaining steps from this command: +// level_calc.py ninth 3 150 7135 1 1.4 110.1 7135 15 1 1644.16 FET 1 10 4500 +#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,16,17,18,19,20,21,22,23,25,26,27,29,30,32,34,35,37,39,41,43,46,48,50,53,55,58,61,64,67,70,73,77,81,84,88,92,97,101,106,110,115,120,126,131,137,143,149,156,162,169,177,184,192,200,208,217,226,235,245,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 +#define PWM3_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,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,7,13,21,28,35,43,51,60,68,77,87,96,106,117,127,138,150,161,173,186,199,212,226,240,255 +#define MAX_1x7135 65 +#define MAX_Nx7135 125 +#define HALFSPEED_LEVEL 14 +#define QUARTERSPEED_LEVEL 8 + +#define RAMP_SMOOTH_FLOOR 1 +#define RAMP_SMOOTH_CEIL MAX_Nx7135 +// safe limit max regulated power +// 20 46 72 98 [125] +#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR +#define SIMPLE_UI_CEIL MAX_Nx7135 +#define SIMPLE_UI_STEPS 5 + +// regulate down faster when the FET is active, slower otherwise +#define THERM_FASTER_LEVEL 130 // throttle back faster when high + +// don't do this +#undef BLINK_AT_RAMP_MIDDLE +#undef BLINK_AT_RAMP_CEIL + +// enable extra features +#define USE_SMOOTH_STEPS + +// too big, turn off extra features +#undef USE_MOMENTARY_MODE +#undef USE_TACTICAL_MODE +#undef USE_SOS_MODE +//#undef USE_RAMP_AFTER_MOON_CONFIG +//#undef USE_RAMP_SPEED_CONFIG +//#undef USE_VOLTAGE_CORRECTION +//#undef USE_2C_STYLE_CONFIG +//#undef USE_TACTICAL_STROBE_MODE +//#ifdef USE_LOWPASS_WHILE_ASLEEP +//#undef USE_LOWPASS_WHILE_ASLEEP +//#endif + diff --git a/hw/fireflies/rot66/hwdef.h b/hw/fireflies/rot66/hwdef.h new file mode 100644 index 0000000..3fea9f1 --- /dev/null +++ b/hw/fireflies/rot66/hwdef.h @@ -0,0 +1,24 @@ +// Fireflies ROT66 driver layout +// Copyright (C) 2018-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +// same as a FW3A, basically, except ... + +// ... except the ROT66 has a lighted button +#ifndef AUXLED_PIN +#define AUXLED_PIN PB2 // pin 7 +#endif + +// ... and slightly different calibration +#ifndef VOLTAGE_FUDGE_FACTOR +#define VOLTAGE_FUDGE_FACTOR 7 // add 0.35V +#endif + +#include "hwdef-fw3a.h" + +// ... and no optic nerve +#ifdef VISION_PIN +#undef VISION_PIN +#endif + diff --git a/hw/fireflies/rot66g2/cfg.h b/hw/fireflies/rot66g2/cfg.h new file mode 100644 index 0000000..04aac53 --- /dev/null +++ b/hw/fireflies/rot66g2/cfg.h @@ -0,0 +1,59 @@ +// Fireflies ROT66 G2 config options for Anduril +// Copyright (C) 2019-2023 Selene ToyKeeper +// SPDX-License-Identifier: GPL-3.0-or-later +#pragma once + +#include "cfg-ff-rot66.h" +#undef MODEL_NUMBER +#define MODEL_NUMBER "0413" + +// if the "low" mode was disabled, turn it back on +#ifdef INDICATOR_LED_SKIP_LOW +#undef INDICATOR_LED_SKIP_LOW +#endif + +// lockout: blinking (3), off: low (1) +#ifdef INDICATOR_LED_DEFAULT_MODE +#undef INDICATOR_LED_DEFAULT_MODE +#endif +#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1) + +// the button is *not* visible while main LEDs are on +#undef USE_INDICATOR_LED_WHILE_RAMPING + +// ramp shape is different than original ROT66 +// 1x7135: 150 lm +// Nx7135: 1200 lm +// FET: 4500 lm +// ../../../bin/level_calc.py 7.0 3 150 7135 1 4 180.16 7135 8 1 1374.48 FET 1 10 4000 +// (plus some manual tweaks) +#undef PWM1_LEVELS +#undef PWM2_LEVELS +#undef PWM3_LEVELS +#define PWM1_LEVELS 1,1,2,3,3,4,4,5,6,7,7,8,9,10,11,12,16,17,18,19,20,21,22,24,26,28,30,32,35,37,40,42,45,48,51,55,58,62,65,69,74,78,83,87,92,98,103,109,115,121,128,134,142,149,157,165,173,182,191,201,211,221,232,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,0 +#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,9,11,13,14,16,18,20,22,24,26,28,30,33,35,38,41,43,46,49,52,55,59,62,66,69,73,77,81,85,89,94,98,103,108,113,118,124,129,135,141,147,153,160,166,173,180,188,195,203,211,219,228,237,246,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 +#define PWM3_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,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,6,11,17,23,29,36,42,49,56,63,71,78,86,94,102,111,119,128,137,147,156,166,176,187,197,208,219,231,243,255 + +#undef MAX_1x7135 +#undef MAX_Nx7135 +#define MAX_1x7135 65 // ~150 lm +#define MAX_Nx7135 120 // ~1200 m +#undef HALFSPEED_LEVEL +#undef QUARTERSPEED_LEVEL +#define HALFSPEED_LEVEL 17 +#define QUARTERSPEED_LEVEL 6 + +// higher floor than default, and stop at highest regulated level +#define RAMP_SMOOTH_FLOOR 1 // ~0.3 lm +#define RAMP_SMOOTH_CEIL MAX_Nx7135 // ~1200 lm +// 10, 28, 46, [65], 83, 101, [120] +#define RAMP_DISCRETE_FLOOR 10 +#define RAMP_DISCRETE_CEIL MAX_Nx7135 +#define RAMP_DISCRETE_STEPS 7 + +// safe limit max regulated power +// 10 37 65 92 [120] +#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR +#define SIMPLE_UI_CEIL MAX_Nx7135 +#define SIMPLE_UI_STEPS 5 + |
