From b249c20b96b6c1f50c5a5df4658afa1ca7cfbb4c Mon Sep 17 00:00:00 2001 From: Gabriel Hart Date: Tue, 4 May 2021 10:27:44 -0500 Subject: Update 1-Series to use 10 MHz clock and Phase Correct PWM. Add PWM documentation. Also clear thermal offset on factory reset instead of setting it to 21*C. --- spaghetti-monster/anduril/factory-reset.c | 4 ++++ spaghetti-monster/anduril/version.h | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/factory-reset.c b/spaghetti-monster/anduril/factory-reset.c index c327e65..f05b5eb 100644 --- a/spaghetti-monster/anduril/factory-reset.c +++ b/spaghetti-monster/anduril/factory-reset.c @@ -44,8 +44,12 @@ void factory_reset() { // explode, if button pressed long enough if (reset) { #ifdef USE_THERMAL_REGULATION + #ifdef AVRXMEGA3 // AVR 1-Series has factory calibrated thermal sensor, remove the offset + thermal_config_save(1,temperature - therm_cal_offset); // this will cancel out the offset + #else // auto-calibrate temperature... assume current temperature is 21 C thermal_config_save(1, 21); + #endif // AVRXMEGA3 #endif // save all settings to eeprom // (assuming they're all at default because we haven't loaded them yet) diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h index 8cf3c90..dd9c703 100644 --- a/spaghetti-monster/anduril/version.h +++ b/spaghetti-monster/anduril/version.h @@ -1,4 +1 @@ -// this file is replaced automatically by the build script -// set your own date here if you're not using the build script -// otherwise, default to first human contact with the moon -#define VERSION_NUMBER "19690720" +#define VERSION_NUMBER "20210503" -- cgit v1.2.3 From 9ec281181dc50a97ab90f0110bd37630c51f267d Mon Sep 17 00:00:00 2001 From: Gabriel Hart Date: Thu, 12 Aug 2021 11:05:49 -0500 Subject: Finalized SP10S and renamed to SP10 Pro. Updated Sofirn settings to include SOS. --- spaghetti-monster/anduril/MODELS | 2 +- spaghetti-monster/anduril/cfg-blf-q8-t1616.h | 4 +++ spaghetti-monster/anduril/cfg-blf-q8.h | 4 +++ spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h | 44 +++++++++++++++++++++++++ spaghetti-monster/anduril/cfg-sofirn-sp10s.h | 40 ---------------------- spaghetti-monster/anduril/version.h | 2 +- 6 files changed, 54 insertions(+), 42 deletions(-) create mode 100644 spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h delete mode 100644 spaghetti-monster/anduril/cfg-sofirn-sp10s.h (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/MODELS b/spaghetti-monster/anduril/MODELS index 13ce2e4..aa35833 100644 --- a/spaghetti-monster/anduril/MODELS +++ b/spaghetti-monster/anduril/MODELS @@ -41,7 +41,7 @@ Model numbers: 0614 sofirn-sp36-t1616 0621 blf-lantern 0622 blf-lantern-t1616 -0631 sofirn-sp10s +0631 sofirn-sp10-pro 1618 gchart-fet1-t1616 Duplicates: Missing: diff --git a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h index fe01d07..340faa1 100644 --- a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h +++ b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h @@ -37,6 +37,10 @@ // also at Sofirn's request, enable 2 click turbo #define USE_2C_MAX_TURBO +// enable SOS in the blinkies group +#define USE_SOS_MODE +#define USE_SOS_MODE_IN_BLINKY_GROUP + // Allow 3C in Simple UI for switching between smooth and stepped ramping #define USE_SIMPLE_UI_RAMPING_TOGGLE diff --git a/spaghetti-monster/anduril/cfg-blf-q8.h b/spaghetti-monster/anduril/cfg-blf-q8.h index f1917ce..00bdd8a 100644 --- a/spaghetti-monster/anduril/cfg-blf-q8.h +++ b/spaghetti-monster/anduril/cfg-blf-q8.h @@ -36,6 +36,10 @@ // also at Sofirn's request, enable 2 click turbo #define USE_2C_MAX_TURBO +// enable SOS in the blinkies group +#define USE_SOS_MODE +#define USE_SOS_MODE_IN_BLINKY_GROUP + // Allow 3C in Simple UI for switching between smooth and stepped ramping #define USE_SIMPLE_UI_RAMPING_TOGGLE diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h new file mode 100644 index 0000000..9072fdd --- /dev/null +++ b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h @@ -0,0 +1,44 @@ +// Sofirn SP10 Pro config options for Anduril +#define MODEL_NUMBER "0631" +#include "hwdef-Sofirn_SP10-Pro.h" +// ATTINY: 1616 + +#undef BLINK_AT_RAMP_MIDDLE + +#define USE_DYNAMIC_UNDERCLOCKING + +#define RAMP_LENGTH 150 +#define PWM1_LEVELS 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +#define PWM2_LEVELS 0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,5,6,6,6,7,7,8,8,8,9,9,10,10,11,11,12,13,13,14,14,15,16,16,17,18,19,19,20,21,22,23,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,43,44,45,47,48,49,51,52,54,55,57,58,60,61,63,65,66,68,70,72,74,75,77,79,81,83,85,87,89,91,93,96,98,100,102,105,107,109,112,114,117,119,122,124,127,129,132,135,138,140,143,146,149,152,155,158,161,164,167,170,174,177,180,184,187,190,194,197,201,204,208,212,215,219,223,227,231,235,239,243,247,251,255 + +#define MAX_1x7135 13 +#define HALFSPEED_LEVEL 14 +#define QUARTERSPEED_LEVEL 6 + +#define RAMP_SMOOTH_FLOOR 1 +#define RAMP_SMOOTH_CEIL 120 +#define RAMP_DISCRETE_FLOOR RAMP_SMOOTH_FLOOR +#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL +#define RAMP_DISCRETE_STEPS 7 + +// at Sofirn's request, use max (150) for the Simple UI ceiling +#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR +#define SIMPLE_UI_CEIL 150 +#define SIMPLE_UI_STEPS 5 + +// also at Sofirn's request, enable 2 click turbo +#define USE_2C_MAX_TURBO + +// enable SOS in the blinkies group +#define USE_SOS_MODE +#define USE_SOS_MODE_IN_BLINKY_GROUP + +// Allow 3C in Simple UI for switching between smooth and stepped ramping +#define USE_SIMPLE_UI_RAMPING_TOGGLE + +// and finally, set the default ramp style to Stepped +#undef RAMP_STYLE +#define RAMP_STYLE 1 // 0 = smooth, 1 = stepped + +// stop panicking at ~30% power +#define THERM_FASTER_LEVEL 105 \ No newline at end of file diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10s.h b/spaghetti-monster/anduril/cfg-sofirn-sp10s.h deleted file mode 100644 index 350c0b5..0000000 --- a/spaghetti-monster/anduril/cfg-sofirn-sp10s.h +++ /dev/null @@ -1,40 +0,0 @@ -// gChart's custom SP10S driver config options for Anduril -#define MODEL_NUMBER "0631" -#include "hwdef-Sofirn_SP10S.h" -// ATTINY: 1616 - -#undef BLINK_AT_RAMP_MIDDLE - -#define USE_DYNAMIC_UNDERCLOCKING - -#define RAMP_LENGTH 150 -#define PWM1_LEVELS 20,30,41,54,69,87,106,128,152,179,209,242,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,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,1,1,1,1,1,1,2,2,2,2,3,3,3,4,4,4,5,5,5,6,6,7,7,8,8,9,9,10,10,11,12,12,13,14,14,15,16,17,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36,38,39,41,42,43,45,46,48,50,51,53,55,56,58,60,62,64,66,68,70,72,74,76,78,80,83,85,87,90,92,94,97,99,102,105,107,110,113,116,119,121,124,127,130,133,137,140,143,146,150,153,156,160,164,167,171,174,178,182,186,190,194,198,202,206,210,214,219,223,227,232,236,241,246,250,255 - -#define MAX_1x7135 13 -#define HALFSPEED_LEVEL 14 -#define QUARTERSPEED_LEVEL 6 - -#define RAMP_SMOOTH_FLOOR 1 -#define RAMP_SMOOTH_CEIL 120 -#define RAMP_DISCRETE_FLOOR 10 -#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL -#define RAMP_DISCRETE_STEPS 7 - -// at Sofirn's request, use max (150) for the Simple UI ceiling -#define SIMPLE_UI_FLOOR RAMP_DISCRETE_FLOOR -#define SIMPLE_UI_CEIL 150 -#define SIMPLE_UI_STEPS 5 - -// also at Sofirn's request, enable 2 click turbo -#define USE_2C_MAX_TURBO - -// Allow 3C in Simple UI for switching between smooth and stepped ramping -#define USE_SIMPLE_UI_RAMPING_TOGGLE - -// and finally, set the default ramp style to Stepped -#undef RAMP_STYLE -#define RAMP_STYLE 1 // 0 = smooth, 1 = stepped - -// stop panicking at ~30% power -#define THERM_FASTER_LEVEL 105 \ No newline at end of file diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h index 088df3c..0646df5 100644 --- a/spaghetti-monster/anduril/version.h +++ b/spaghetti-monster/anduril/version.h @@ -1 +1 @@ -#define VERSION_NUMBER "20210514" +#define VERSION_NUMBER "20210812" -- cgit v1.2.3 From edb709b0354c1e802634af9eee4cf9a5cf285cb1 Mon Sep 17 00:00:00 2001 From: Gabriel Hart Date: Sun, 15 Aug 2021 14:21:50 -0500 Subject: Adjusted Sofirn SP10 ramp values --- spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h | 3 ++- spaghetti-monster/anduril/version.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h index 9072fdd..3e85aca 100644 --- a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h +++ b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h @@ -7,9 +7,10 @@ #define USE_DYNAMIC_UNDERCLOCKING +// PWM is mostly a "ninth" ramp from level_calc.py but with some extra lower values at the beginning of the ramp #define RAMP_LENGTH 150 #define PWM1_LEVELS 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -#define PWM2_LEVELS 0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,5,5,5,6,6,6,7,7,8,8,8,9,9,10,10,11,11,12,13,13,14,14,15,16,16,17,18,19,19,20,21,22,23,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,43,44,45,47,48,49,51,52,54,55,57,58,60,61,63,65,66,68,70,72,74,75,77,79,81,83,85,87,89,91,93,96,98,100,102,105,107,109,112,114,117,119,122,124,127,129,132,135,138,140,143,146,149,152,155,158,161,164,167,170,174,177,180,184,187,190,194,197,201,204,208,212,215,219,223,227,231,235,239,243,247,251,255 +#define PWM2_LEVELS 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,6,6,6,7,7,7,8,8,8,9,9,10,10,10,11,11,12,12,13,14,14,15,16,16,17,18,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37,38,40,41,43,45,46,48,50,52,54,56,58,60,63,65,67,70,73,75,78,81,84,87,90,93,97,100,104,107,111,115,119,123,128,132,137,141,146,151,156,162,167,173,179,185,191,197,204,210,217,224,232,239,247,255 #define MAX_1x7135 13 #define HALFSPEED_LEVEL 14 diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h index 0646df5..d161ed5 100644 --- a/spaghetti-monster/anduril/version.h +++ b/spaghetti-monster/anduril/version.h @@ -1 +1 @@ -#define VERSION_NUMBER "20210812" +#define VERSION_NUMBER "20210814" -- cgit v1.2.3 From 43006f56c22a99f9635e28374a1a7ee7dbce0c7c Mon Sep 17 00:00:00 2001 From: Gabriel Hart Date: Sun, 15 Aug 2021 22:59:49 -0500 Subject: Adjusted more Sofirn SP10 config values (party strobe, candle amp, max_1x7135) --- spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h | 10 ++++++++-- spaghetti-monster/anduril/version.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h index 3e85aca..a0bea0a 100644 --- a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h +++ b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h @@ -12,7 +12,7 @@ #define PWM1_LEVELS 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 #define PWM2_LEVELS 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,6,6,6,7,7,7,8,8,8,9,9,10,10,10,11,11,12,12,13,14,14,15,16,16,17,18,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37,38,40,41,43,45,46,48,50,52,54,56,58,60,63,65,67,70,73,75,78,81,84,87,90,93,97,100,104,107,111,115,119,123,128,132,137,141,146,151,156,162,167,173,179,185,191,197,204,210,217,224,232,239,247,255 -#define MAX_1x7135 13 +#define MAX_1x7135 80 #define HALFSPEED_LEVEL 14 #define QUARTERSPEED_LEVEL 6 @@ -42,4 +42,10 @@ #define RAMP_STYLE 1 // 0 = smooth, 1 = stepped // stop panicking at ~30% power -#define THERM_FASTER_LEVEL 105 \ No newline at end of file +#define THERM_FASTER_LEVEL 105 + +// slow down party strobe; this driver can't pulse for too short a time +#define PARTY_STROBE_ONTIME 6 + +// the default of 26 looks a bit flat, so increase it +#define CANDLE_AMPLITUDE 40 \ No newline at end of file diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h index d161ed5..f0c08a5 100644 --- a/spaghetti-monster/anduril/version.h +++ b/spaghetti-monster/anduril/version.h @@ -1 +1 @@ -#define VERSION_NUMBER "20210814" +#define VERSION_NUMBER "20210815" -- cgit v1.2.3 From 02d197fdf6d6294e3aeb392f427c5acc3a0c475d Mon Sep 17 00:00:00 2001 From: Gabriel Hart Date: Fri, 20 Aug 2021 09:48:04 -0500 Subject: from Tom E, support PB4 for any of the 3 PWM channels --- spaghetti-monster/fsm-main.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c index f3c319c..2015563 100644 --- a/spaghetti-monster/fsm-main.c +++ b/spaghetti-monster/fsm-main.c @@ -46,17 +46,28 @@ static inline void hw_setup() { DDRB |= (1 << PWM1_PIN); TCCR0B = 0x01; // pre-scaler for timer (1 => 1, 2 => 8, 3 => 64...) TCCR0A = PHASE; + #if (PWM1_PIN == PB4) // Second PWM counter is ... weird + TCCR1 = _BV (CS10); + GTCCR = _BV (COM1B1) | _BV (PWM1B); + OCR1C = 255; // Set ceiling value to maximum + #endif #endif #if PWM_CHANNELS >= 2 DDRB |= (1 << PWM2_PIN); + #if (PWM2_PIN == PB4) // Second PWM counter is ... weird + TCCR1 = _BV (CS10); + GTCCR = _BV (COM1B1) | _BV (PWM1B); + OCR1C = 255; // Set ceiling value to maximum + #endif #endif #if PWM_CHANNELS >= 3 - // Second PWM counter is ... weird DDRB |= (1 << PWM3_PIN); + #if (PWM3_PIN == PB4) // Second PWM counter is ... weird TCCR1 = _BV (CS10); GTCCR = _BV (COM1B1) | _BV (PWM1B); OCR1C = 255; // Set ceiling value to maximum #endif + #endif #if PWM_CHANNELS >= 4 // 4th PWM channel is ... not actually supported in hardware :( DDRB |= (1 << PWM4_PIN); -- cgit v1.2.3 From 51a8a455e613f61caa06a9c76a998724de7dca40 Mon Sep 17 00:00:00 2001 From: Gabriel Hart Date: Sun, 29 Aug 2021 14:37:22 -0500 Subject: Add 2C Turbo for BLF Lantern (LT1) --- spaghetti-monster/anduril/cfg-blf-lantern.h | 3 +++ spaghetti-monster/anduril/version.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h index 6e30d55..63f507d 100644 --- a/spaghetti-monster/anduril/cfg-blf-lantern.h +++ b/spaghetti-monster/anduril/cfg-blf-lantern.h @@ -62,6 +62,9 @@ #define SIMPLE_UI_CEIL RAMP_DISCRETE_CEIL #define SIMPLE_UI_STEPS RAMP_DISCRETE_STEPS +// also at Sofirn's request, enable 2 click turbo +#define USE_2C_MAX_TURBO + #define USE_SOS_MODE #define USE_SOS_MODE_IN_BLINKY_GROUP diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h index f0c08a5..cb49013 100644 --- a/spaghetti-monster/anduril/version.h +++ b/spaghetti-monster/anduril/version.h @@ -1 +1 @@ -#define VERSION_NUMBER "20210815" +#define VERSION_NUMBER "20210825" -- cgit v1.2.3 From c32ae490226e7713492c78bea9168b250513a3a0 Mon Sep 17 00:00:00 2001 From: Gabriel Hart Date: Sun, 19 Sep 2021 14:22:43 -0500 Subject: SP10 Pro: use dynamic PWM, add hidden firefly, adjust candle amplitude, and tweak party strobe & LVP level --- spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h | 28 ++++++++++++++----------- spaghetti-monster/anduril/version.h | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h index 2d0ea7f..2dc0def 100644 --- a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h +++ b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h @@ -7,16 +7,22 @@ #define USE_DYNAMIC_UNDERCLOCKING -// PWM is mostly a "ninth" ramp from level_calc.py but with some extra lower values at the beginning of the ramp +// PWM generated by: level_calc_dyn.py ninth 1 147 7135 1 1 800 --pwm dyn:64:1024:255 +// and then three steps manually added to the front for the low channel (low channel PWM created manually) #define RAMP_LENGTH 150 -#define PWM1_LEVELS 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -#define PWM2_LEVELS 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,6,6,6,7,7,7,8,8,8,9,9,10,10,10,11,11,12,12,13,14,14,15,16,16,17,18,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37,38,40,41,43,45,46,48,50,52,54,56,58,60,63,65,67,70,73,75,78,81,84,87,90,93,97,100,104,107,111,115,119,123,128,132,137,141,146,151,156,162,167,173,179,185,191,197,204,210,217,224,232,239,247,255 +#define USE_DYN_PWM +#define PWM1_LEVELS 2,12,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +#define PWM2_LEVELS 0,0,0,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,6,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,9,10,10,10,10,10,11,11,11,11,11,11,11,11,12,12,13,13,14,15,15,16,16,17,18,19,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34,36,37,39,40,42,44,45,47,49,51,53,55,57,59,61,64,66,69,71,74,77,79,82,85,89,92,95,99,102,106,110,114,118,122,126,131,135,140,145,150,155,161,166,172,178,184,190,196,203,210,217,224,231,239,247,255 +#define PWM_TOPS 64,64,64,1024,966,909,851,792,733,674,614,554,493,883,815,747,679,611,543,474,816,762,709,655,602,549,745,700,655,610,566,522,652,613,575,537,625,591,557,523,491,555,525,496,467,514,487,461,436,470,447,424,402,381,406,387,367,349,332,350,334,318,303,288,275,262,250,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,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 PWM1_LEVELS 255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 +//#define PWM2_LEVELS 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,6,6,6,7,7,7,8,8,8,9,9,10,10,10,11,11,12,12,13,14,14,15,16,16,17,18,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,37,38,40,41,43,45,46,48,50,52,54,56,58,60,63,65,67,70,73,75,78,81,84,87,90,93,97,100,104,107,111,115,119,123,128,132,137,141,146,151,156,162,167,173,179,185,191,197,204,210,217,224,232,239,247,255 #define MAX_1x7135 80 -#define HALFSPEED_LEVEL 14 -#define QUARTERSPEED_LEVEL 6 +#define HALFSPEED_LEVEL 3 +#define QUARTERSPEED_LEVEL 3 -#define RAMP_SMOOTH_FLOOR 1 +#define RAMP_SMOOTH_FLOOR 3 #define RAMP_SMOOTH_CEIL 120 #define RAMP_DISCRETE_FLOOR RAMP_SMOOTH_FLOOR #define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL @@ -27,9 +33,6 @@ #define SIMPLE_UI_CEIL 150 #define SIMPLE_UI_STEPS 5 -// also at Sofirn's request, enable 2 click turbo -#define USE_2C_MAX_TURBO - // enable SOS in the blinkies group #define USE_SOS_MODE #define USE_SOS_MODE_IN_BLINKY_GROUP @@ -43,12 +46,13 @@ // stop panicking at ~30% power #define THERM_FASTER_LEVEL 105 +#define MIN_THERM_STEPDOWN 66 // must be > end of dynamic PWM range // slow down party strobe; this driver can't pulse for too short a time -#define PARTY_STROBE_ONTIME 6 +#define PARTY_STROBE_ONTIME 8 // the default of 26 looks a bit flat, so increase it -#define CANDLE_AMPLITUDE 40 +#define CANDLE_AMPLITUDE 50 -// enable 2 click turbo +// enable 2 click turbo (replaces USE_2C_MAX_TURBO) #define DEFAULT_2C_STYLE 1 diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h index cb49013..82d6a9f 100644 --- a/spaghetti-monster/anduril/version.h +++ b/spaghetti-monster/anduril/version.h @@ -1 +1 @@ -#define VERSION_NUMBER "20210825" +#define VERSION_NUMBER "20210919" -- cgit v1.2.3