From 592536babe64a49663aac6eb517230b437306f7e Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Thu, 20 Jul 2023 21:52:17 -0600 Subject: fixed ff-e01, ff-pl47, ff-pl47g2 (using new refactor) --- spaghetti-monster/anduril/cfg-ff-e01.h | 41 +++++++++++++++++++++++++------ spaghetti-monster/anduril/cfg-ff-pl47.h | 22 ++++++++++------- spaghetti-monster/anduril/cfg-ff-pl47g2.h | 25 +++++++++++-------- 3 files changed, 62 insertions(+), 26 deletions(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/cfg-ff-e01.h b/spaghetti-monster/anduril/cfg-ff-e01.h index 6d561b2..73bf9db 100644 --- a/spaghetti-monster/anduril/cfg-ff-e01.h +++ b/spaghetti-monster/anduril/cfg-ff-e01.h @@ -3,18 +3,34 @@ // SPDX-License-Identifier: GPL-3.0-or-later #pragma once -// most of the good stuff is in the FFUI config; just copy it -#include "../fireflies-ui/cfg-ff-e01.h" -#undef MODEL_NUMBER #define MODEL_NUMBER "0441" +#include "hwdef-ff-pl47.h" +// ATTINY: 85 -#ifndef BLINK_AT_RAMP_CEIL -#define BLINK_AT_RAMP_CEIL +// 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) -#undef RAMP_DISCRETE_STEPS +#define RAMP_DISCRETE_FLOOR 20 +#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL #define RAMP_DISCRETE_STEPS 7 // safe limit ~50% power @@ -23,5 +39,16 @@ #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 + // too big, turn off extra features -#undef USE_TACTICAL_MODE +//#undef USE_TACTICAL_MODE diff --git a/spaghetti-monster/anduril/cfg-ff-pl47.h b/spaghetti-monster/anduril/cfg-ff-pl47.h index 4ecee44..05c6fb6 100644 --- a/spaghetti-monster/anduril/cfg-ff-pl47.h +++ b/spaghetti-monster/anduril/cfg-ff-pl47.h @@ -4,7 +4,8 @@ #pragma once #define MODEL_NUMBER "0421" -#include "hwdef-FF_PL47.h" +#include "hwdef-ff-pl47.h" +// ATTINY: 85 // the button lights up #define USE_INDICATOR_LED @@ -24,7 +25,7 @@ #define INDICATOR_LED_SKIP_LOW -#define RAMP_LENGTH 150 +#define RAMP_SIZE 150 // driver is a FET + 3x7135, ~400 lm at highest regulated level // ramp copied from Emisar D4S ramp @@ -34,13 +35,8 @@ #define HALFSPEED_LEVEL 13 #define QUARTERSPEED_LEVEL 6 -// 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 - // 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) @@ -61,12 +57,20 @@ //#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 -#undef BLINK_AT_RAMP_CEIL // too big, turn off extra features #undef USE_TACTICAL_MODE diff --git a/spaghetti-monster/anduril/cfg-ff-pl47g2.h b/spaghetti-monster/anduril/cfg-ff-pl47g2.h index 923afac..acb3b16 100644 --- a/spaghetti-monster/anduril/cfg-ff-pl47g2.h +++ b/spaghetti-monster/anduril/cfg-ff-pl47g2.h @@ -4,7 +4,8 @@ #pragma once #define MODEL_NUMBER "0423" -#include "hwdef-FF_PL47.h" +#include "hwdef-ff-pl47.h" +// ATTINY: 85 // the button lights up #define USE_INDICATOR_LED @@ -18,7 +19,8 @@ #define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1) -#define RAMP_LENGTH 150 + +#define RAMP_SIZE 150 // driver is a FET + 3x7135, ~400 lm at highest regulated level // ramp copied from Emisar D4S ramp @@ -28,16 +30,11 @@ #define HALFSPEED_LEVEL 13 #define QUARTERSPEED_LEVEL 6 -// 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 - // ceiling is level 120/150 +#define RAMP_SMOOTH_FLOOR 1 #define RAMP_SMOOTH_CEIL 120 -// 10, 28, 46, 65, [83], 101, 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 @@ -48,12 +45,20 @@ #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 -#undef BLINK_AT_RAMP_CEIL // too big, turn off extra features #undef USE_TACTICAL_MODE -- cgit v1.2.3