From 3ba75a34d480592061fb1e32bf3f14d7d6c93a44 Mon Sep 17 00:00:00 2001 From: Isilmerie Date: Tue, 15 Oct 2024 02:58:05 -0400 Subject: [PATCH] Add personal configurations --- .gitignore | 2 +- users.cfg | 2 + users/isilmerie/anduril.h | 76 +++++++++++ .../models/hank-emisar-d4k-3ch/anduril.h | 123 ++++++++++++++++++ .../models/hank-noctigon-dm11-nofet/anduril.h | 86 ++++++++++++ .../models/hank-noctigon-kr4/anduril.h | 102 +++++++++++++++ .../models/sofirn-lt1s-pro/anduril.h | 123 ++++++++++++++++++ .../models/sofirn-sp36-t1616/anduril.h | 78 +++++++++++ 8 files changed, 591 insertions(+), 1 deletion(-) create mode 100644 users.cfg create mode 100644 users/isilmerie/anduril.h create mode 100644 users/isilmerie/models/hank-emisar-d4k-3ch/anduril.h create mode 100644 users/isilmerie/models/hank-noctigon-dm11-nofet/anduril.h create mode 100644 users/isilmerie/models/hank-noctigon-kr4/anduril.h create mode 100644 users/isilmerie/models/sofirn-lt1s-pro/anduril.h create mode 100644 users/isilmerie/models/sofirn-sp36-t1616/anduril.h diff --git a/.gitignore b/.gitignore index 8cc955f2..f7842846 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,4 @@ venv/ *.o *.old *.otl -users.cfg + diff --git a/users.cfg b/users.cfg new file mode 100644 index 00000000..bbb12a24 --- /dev/null +++ b/users.cfg @@ -0,0 +1,2 @@ +isilmerie + diff --git a/users/isilmerie/anduril.h b/users/isilmerie/anduril.h new file mode 100644 index 00000000..77b28da7 --- /dev/null +++ b/users/isilmerie/anduril.h @@ -0,0 +1,76 @@ +// ----- SIMPLE/ADVANCED UI ----- + + +// use Advanced UI by default +#undef SIMPLE_UI_ACTIVE +#define SIMPLE_UI_ACTIVE 0 + +// allow switching ramp styles in Simple UI +#undef USE_SIMPLE_UI_RAMPING_TOGGLE +#define USE_SIMPLE_UI_RAMPING_TOGGLE + + + + + +// ----- AUXILIARY LEDS ----- + +// enable quick aux switch (from PR #5) +#undef USE_QUICK_AUX_SWITCH +#define USE_QUICK_AUX_SWITCH + + + + + +// ----- RAMP SETTINGS ----- + +// use smooth ramping style +#undef RAMP_STYLE +#define RAMP_STYLE 0 // 0 = smooth, 1 = stepped + +// 10 minute manual memory timer +#undef DEFAULT_MANUAL_MEMORY_TIMER +#define DEFAULT_MANUAL_MEMORY_TIMER 10 + +// stay at floor when ramping up from off +#undef DEFAULT_DONT_RAMP_AFTER_MOON +#define DEFAULT_DONT_RAMP_AFTER_MOON 1 + +// disable turbo in Simple UI +#undef DEFAULT_2C_STYLE_SIMPLE +#define DEFAULT_2C_STYLE_SIMPLE 0 + +// use smooth steps +#undef DEFAULT_SMOOTH_STEPS_STYLE +#define DEFAULT_SMOOTH_STEPS_STYLE 1 + + + + + + +// ----- BLINKY/UTILITY MODES ----- + +// nothing yet + + + + +// ----- STROBE/MOOD MODES ----- + + +// nothing yet + + + + + +// ----- MISC ----- + + +// autolock: 10 mins +#undef USE_AUTOLOCK +#define USE_AUTOLOCK +#undef DEFAULT_AUTOLOCK_TIME +#define DEFAULT_AUTOLOCK_TIME 10 diff --git a/users/isilmerie/models/hank-emisar-d4k-3ch/anduril.h b/users/isilmerie/models/hank-emisar-d4k-3ch/anduril.h new file mode 100644 index 00000000..a0d6386b --- /dev/null +++ b/users/isilmerie/models/hank-emisar-d4k-3ch/anduril.h @@ -0,0 +1,123 @@ +// ----- AUXILIARY LEDS ----- + + +// turn off aux LEDs on ramping mode +#undef USE_AUX_RGB_LEDS_WHILE_ON +#undef USE_INDICATOR_LED_WHILE_RAMPING + +// aux LEDs on off: voltage (9) high (2) +#undef RGB_LED_OFF_DEFAULT +#define RGB_LED_OFF_DEFAULT 0x29 + +// aux LEDs on lockout: voltage (9) low (1) +#undef RGB_LED_LOCKOUT_DEFAULT +#define RGB_LED_LOCKOUT_DEFAULT 0x19 + +// turn off post-off voltage reading +#undef DEFAULT_POST_OFF_VOLTAGE_SECONDS +#define DEFAULT_POST_OFF_VOLTAGE_SECONDS 0 + + + + + +// ----- RAMP LEVELS ----- + + +// Smooth Ramp settings +#undef RAMP_SMOOTH_FLOOR +#define RAMP_SMOOTH_FLOOR 1 +#undef RAMP_SMOOTH_CEIL +#define RAMP_SMOOTH_CEIL 150 +#undef DEFAULT_RAMP_SPEED +#define DEFAULT_RAMP_SPEED 1 // ramp speed: default, brightness range is too narrow to be slower + +// Stepped Ramp settings +#undef RAMP_DISCRETE_FLOOR +#define RAMP_DISCRETE_FLOOR RAMP_SMOOTH_FLOOR +#undef RAMP_DISCRETE_CEIL +#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL +#undef RAMP_DISCRETE_STEPS +#define RAMP_DISCRETE_STEPS 9 // 9 steps + +// Simple UI Ramp Stepped Ramp settings +#undef SIMPLE_UI_FLOOR +#define SIMPLE_UI_FLOOR RAMP_SMOOTH_FLOOR +#undef SIMPLE_UI_CEIL +#define SIMPLE_UI_CEIL RAMP_SMOOTH_CEIL // not too bright +#undef SIMPLE_UI_STEPS +#define SIMPLE_UI_STEPS 5 // 5 steps + + + + + +// ----- RAMP SETTINGS ----- + + +// don't use manual memory +#undef DEFAULT_MANUAL_MEMORY_TIMER +#define DEFAULT_MANUAL_MEMORY_TIMER 0 + +// use turbo style 1 (2C goes to turbo) because ceiling and turbo are equal +#undef DEFAULT_2C_STYLE +#define DEFAULT_2C_STYLE 1 + + + + + +// ----- CHANNEL SETTINGS ----- + + +// use white channel by default +#undef DEFAULT_CHANNEL_MODE +#define DEFAULT_CHANNEL_MODE CM_ALL + +// enable R, G, B, RGB, GB, RG, RB, HSV channels (0-7) +// don't enable autotint (8) and aux (9-15) channels +#undef CHANNEL_MODES_ENABLED +#define CHANNEL_MODES_ENABLED 0b0000000011111111 + +// use blue channel to warn factory reset +// use white channel to signal factory reset +#undef FACTORY_RESET_WARN_CHANNEL +#define FACTORY_RESET_WARN_CHANNEL CM_LED4 +#undef FACTORY_RESET_SUCCESS_CHANNEL +#define FACTORY_RESET_SUCCESS_CHANNEL CM_ALL + +// use red channel to wait for a click in a config menu +// use green channel to signal an inputted click +#undef CONFIG_WAITING_CHANNEL +#define CONFIG_WAITING_CHANNEL CM_MAIN2 +#undef CONFIG_BLINK_CHANNEL +#define CONFIG_BLINK_CHANNEL CM_LED3 + + + + + +// ----- BLINKY/UTILITY MODES ----- + + +// use white aux channel by default for blinkies +#undef DEFAULT_BLINK_CHANNEL +#define DEFAULT_BLINK_CHANNEL CM_AUXWHT + +// use red and blue channels for police strobe +#undef POLICE_COLOR_STROBE_CH1 +#define POLICE_COLOR_STROBE_CH1 CM_MAIN2 +#undef POLICE_COLOR_STROBE_CH2 +#define POLICE_COLOR_STROBE_CH2 CM_LED4 + + + + + +// ----- MISC ----- + + +// in ramp mode, 4C goes back to the previous channel instead of going to lockout mode +// from PR #50 +#undef USE_PREVIOUS_CHANNEL +#define USE_PREVIOUS_CHANNEL diff --git a/users/isilmerie/models/hank-noctigon-dm11-nofet/anduril.h b/users/isilmerie/models/hank-noctigon-dm11-nofet/anduril.h new file mode 100644 index 00000000..c1d4cea5 --- /dev/null +++ b/users/isilmerie/models/hank-noctigon-dm11-nofet/anduril.h @@ -0,0 +1,86 @@ +// ----- AUXILIARY LEDS ----- + + +// aux LEDs on off: voltage (9) high (2) +#undef RGB_LED_OFF_DEFAULT +#define RGB_LED_OFF_DEFAULT 0x29 + +// aux LEDs on lockout: voltage (9) low (1) +#undef RGB_LED_LOCKOUT_DEFAULT +#define RGB_LED_LOCKOUT_DEFAULT 0x19 + +// turn off post-off voltage reading +#undef DEFAULT_POST_OFF_VOLTAGE_SECONDS +#define DEFAULT_POST_OFF_VOLTAGE_SECONDS 0 + + + + + +// ----- RAMP LEVELS ----- + + +// Smooth Ramp settings +#undef RAMP_SMOOTH_FLOOR +#define RAMP_SMOOTH_FLOOR 1 +#undef RAMP_SMOOTH_CEIL +#define RAMP_SMOOTH_CEIL 150 // fully regulated through ramp +#undef DEFAULT_RAMP_SPEED +#define DEFAULT_RAMP_SPEED 2 // ramp speed: half + +// Stepped Ramp settings +#undef RAMP_DISCRETE_FLOOR +#define RAMP_DISCRETE_FLOOR RAMP_SMOOTH_FLOOR +#undef RAMP_DISCRETE_CEIL +#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL +#undef RAMP_DISCRETE_STEPS +#define RAMP_DISCRETE_STEPS 9 // 9 steps + +// Simple UI Ramp Stepped Ramp settings +#undef SIMPLE_UI_FLOOR +#define SIMPLE_UI_FLOOR 10 +#undef SIMPLE_UI_CEIL +#define SIMPLE_UI_CEIL 90 +#undef SIMPLE_UI_STEPS +#define SIMPLE_UI_STEPS 5 // 5 steps, spaced 20 levels apart + + + + + +// ----- RAMP SETTINGS ----- + + +// set manual memory to step 2 of Stepped Ramp +#undef DEFAULT_MANUAL_MEMORY +#define DEFAULT_MANUAL_MEMORY 20 + +// use turbo style 1 (2C goes to turbo) because ceiling and turbo are equal +#undef DEFAULT_2C_STYLE +#define DEFAULT_2C_STYLE 1 + + + + + +// ----- CHANNEL SETTINGS ----- + + +// use main emitter/s by default +#undef DEFAULT_CHANNEL_MODE +#define DEFAULT_CHANNEL_MODE CM_MAIN + +// enable only main channel +#undef CHANNEL_MODES_ENABLED +#define CHANNEL_MODES_ENABLED 0b0000000000000001 + + + + + +// ----- BLINKY/UTILITY MODES ----- + + +// use white aux channel by default for blinkies +#undef DEFAULT_BLINK_CHANNEL +#define DEFAULT_BLINK_CHANNEL CM_AUXWHT diff --git a/users/isilmerie/models/hank-noctigon-kr4/anduril.h b/users/isilmerie/models/hank-noctigon-kr4/anduril.h new file mode 100644 index 00000000..ff350bbc --- /dev/null +++ b/users/isilmerie/models/hank-noctigon-kr4/anduril.h @@ -0,0 +1,102 @@ +// ----- AUXILIARY LEDS ----- + + +// aux LEDs on off: voltage (9) high (2) +#undef RGB_LED_OFF_DEFAULT +#define RGB_LED_OFF_DEFAULT 0x29 + +// aux LEDs on lockout: voltage (9) low (1) +#undef RGB_LED_LOCKOUT_DEFAULT +#define RGB_LED_LOCKOUT_DEFAULT 0x19 + +// turn off post-off voltage reading +#undef DEFAULT_POST_OFF_VOLTAGE_SECONDS +#define DEFAULT_POST_OFF_VOLTAGE_SECONDS 0 + + + + + +// ----- RAMP LEVELS ----- + + +// Smooth Ramp settings +#undef RAMP_SMOOTH_FLOOR +#define RAMP_SMOOTH_FLOOR 1 +#undef RAMP_SMOOTH_CEIL +#define RAMP_SMOOTH_CEIL 130 // max regulated level +#undef DEFAULT_RAMP_SPEED +#define DEFAULT_RAMP_SPEED 2 // ramp speed: half + +// Stepped Ramp settings +#undef RAMP_DISCRETE_FLOOR +#define RAMP_DISCRETE_FLOOR RAMP_SMOOTH_FLOOR +#undef RAMP_DISCRETE_CEIL +#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL +#undef RAMP_DISCRETE_STEPS +#define RAMP_DISCRETE_STEPS 9 // 9 steps + +// Simple UI Ramp Stepped Ramp settings +#undef SIMPLE_UI_FLOOR +#define SIMPLE_UI_FLOOR 10 +#undef SIMPLE_UI_CEIL +#define SIMPLE_UI_CEIL 90 +#undef SIMPLE_UI_STEPS +#define SIMPLE_UI_STEPS 5 // 5 steps, spaced 20 levels apart + + + + + +// ----- RAMP SETTINGS ----- + + +// set manual memory to step 2 of Stepped Ramp +#undef DEFAULT_MANUAL_MEMORY +#define DEFAULT_MANUAL_MEMORY 17 + +// use turbo style 3 (2C cycles between standby/ramp, ceiling, and turbo) +// from Pull Request #38 +#undef DEFAULT_2C_STYLE +#define DEFAULT_2C_STYLE 3 + + + + + +// ----- CHANNEL SETTINGS ----- + + +// use main emitter/s by default +#undef DEFAULT_CHANNEL_MODE +#define DEFAULT_CHANNEL_MODE CM_MAIN + +// enable only main channel +#undef CHANNEL_MODES_ENABLED +#define CHANNEL_MODES_ENABLED 0b0000000000000001 + + + + + +// ----- BLINKY/UTILITY MODES ----- + + +// use white aux channel by default for blinkies +#undef DEFAULT_BLINK_CHANNEL +#define DEFAULT_BLINK_CHANNEL CM_AUXWHT + +// stock voltage reading is higher than actual: lower by 0.04 V +#undef VOLTAGE_FUDGE_FACTOR +#define VOLTAGE_FUDGE_FACTOR -1 + + + + + +// ----- MISC ----- + +// use S2 leakage current for ultralow mode on level 1/150 +// from https://github.com/stcarlso/anduril/tree/ultra-low-mode +#undef DEFAULT_ULTRA_LOW_MODE +#define DEFAULT_ULTRA_LOW_MODE 3 diff --git a/users/isilmerie/models/sofirn-lt1s-pro/anduril.h b/users/isilmerie/models/sofirn-lt1s-pro/anduril.h new file mode 100644 index 00000000..805aecf7 --- /dev/null +++ b/users/isilmerie/models/sofirn-lt1s-pro/anduril.h @@ -0,0 +1,123 @@ +// ----- INDICATOR LED ----- + +// indicator LED on off: high (2) +// indicator LED on lockout: low (1) +#undef INDICATOR_LED_DEFAULT_MODE +#define INDICATOR_LED_DEFAULT_MODE ((1<<2) + 2) + + + + + +// ----- RAMP LEVELS ----- + + +// Smooth Ramp settings +#undef RAMP_SMOOTH_FLOOR +#define RAMP_SMOOTH_FLOOR 1 +#undef RAMP_SMOOTH_CEIL +#define RAMP_SMOOTH_CEIL 150 // lt1s pro doesn't get very hot on turbo +#undef DEFAULT_RAMP_SPEED +#define DEFAULT_RAMP_SPEED 2 // ramp speed: half + +// Stepped Ramp settings +#undef RAMP_DISCRETE_FLOOR +#define RAMP_DISCRETE_FLOOR RAMP_SMOOTH_FLOOR +#undef RAMP_DISCRETE_CEIL +#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL +#undef RAMP_DISCRETE_STEPS +#define RAMP_DISCRETE_STEPS 9 // 9 steps + +// Simple UI Ramp Stepped Ramp settings +#undef SIMPLE_UI_FLOOR +#define SIMPLE_UI_FLOOR RAMP_SMOOTH_FLOOR +#undef SIMPLE_UI_CEIL +#define SIMPLE_UI_CEIL RAMP_SMOOTH_CEIL // low heat generation +#undef SIMPLE_UI_STEPS +#define SIMPLE_UI_STEPS 5 // 5 steps + + + + + +// ----- RAMP SETTINGS ----- + + +// 4 hour manual memory timer +#undef DEFAULT_MANUAL_MEMORY_TIMER +#define DEFAULT_MANUAL_MEMORY_TIMER 240 + +// set manual memory to step 2 of Stepped Ramp +#undef DEFAULT_MANUAL_MEMORY +#define DEFAULT_MANUAL_MEMORY 20 + +// use turbo style 1 (2C goes to turbo) because ceiling and turbo are equal +#undef DEFAULT_2C_STYLE +#define DEFAULT_2C_STYLE 1 + + + + + +// ----- CHANNEL SETTINGS ----- + + +// use white channel by default +#undef DEFAULT_CHANNEL_MODE +#define DEFAULT_CHANNEL_MODE CM_WHITE + +// enable only white (0), red (3), and white+red channel (4) +// don't enable warm-cool (1) and red-warm-cool (2) autotint +#undef CHANNEL_MODES_ENABLED +#define CHANNEL_MODES_ENABLED 0b00011001 + +// use white channel to warn factory reset +// use red channel to signal factory reset +#undef FACTORY_RESET_WARN_CHANNEL +#define FACTORY_RESET_WARN_CHANNEL CM_WHITE +#undef FACTORY_RESET_SUCCESS_CHANNEL +#define FACTORY_RESET_SUCCESS_CHANNEL CM_RED + +// use white channel to wait for a click in a config menu +// use red channel to signal an inputted click +#undef CONFIG_WAITING_CHANNEL +#define CONFIG_WAITING_CHANNEL CM_WHITE +#undef CONFIG_BLINK_CHANNEL +#define CONFIG_BLINK_CHANNEL CM_RED + + + + + +// ----- BLINKY/UTILITY MODES ----- + + +// use red channel by default for blinkies +#undef DEFAULT_BLINK_CHANNEL +#define DEFAULT_BLINK_CHANNEL CM_RED + + + + + +// ----- MISC ----- + + +// autolock: 30 mins +#undef USE_AUTOLOCK +#define USE_AUTOLOCK +#undef DEFAULT_AUTOLOCK_TIME +#define DEFAULT_AUTOLOCK_TIME 30 + +// in ramp mode, 4C goes back to the previous channel instead of going to lockout mode +// from PR #50 +#undef USE_PREVIOUS_CHANNEL +#define USE_PREVIOUS_CHANNEL + +// Use 256 clock cycle to eliminate audible PWM (note: this puts the frequency at twice the max spec of the red channel chip) +// https://budgetlightforum.com/t/group-buy-lt1s-pro-with-anduril2-nichia-519a-660nm-red-leds/71123/520 +// level_calc.py 4.001 1 150 7135 1 0.2 600 --pwm dyn:78:16383:255:3.333 +#undef PWM1_LEVELS +#define PWM1_LEVELS 1,2,2,3,5,6,7,9,10,11,13,14,15,16,16,19,20,21,22,23,24,25,26,27,28,29,30,30,31,31,32,32,33,33,33,33,33,33,32,32,31,31,30,30,30,29,28,28,27,27,26,25,25,24,23,23,22,22,21,21,21,21,21,20,21,21,21,21,22,22,23,24,24,25,27,28,29,30,32,33,34,35,37,38,39,41,42,44,45,47,49,50,52,54,56,58,59,61,63,66,68,70,72,74,77,79,82,84,87,89,92,95,98,100,103,106,110,113,116,119,123,126,129,133,137,140,144,148,152,156,160,164,169,173,177,182,187,191,196,201,206,211,216,221,227,232,238,243,249,255 +#undef PWM_TOPS +#define PWM_TOPS 16382,8173,7835,9623,13594,12799,12042,11328,10656,10026,10395,9740,9137,8582,8071,8086,7606,7164,6756,6380,6032,5710,5410,5132,4873,4631,4404,4048,3861,3561,3406,3153,3021,2806,2610,2431,2267,2117,1979,1852,1680,1576,1431,1345,1266,1151,1047,988,898,849,772,702,665,605,549,521,472,449,407,388,369,352,336,304,306,292,279,267,268,257,258,258,247,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,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255 diff --git a/users/isilmerie/models/sofirn-sp36-t1616/anduril.h b/users/isilmerie/models/sofirn-sp36-t1616/anduril.h new file mode 100644 index 00000000..eb706a6e --- /dev/null +++ b/users/isilmerie/models/sofirn-sp36-t1616/anduril.h @@ -0,0 +1,78 @@ +// ----- INDICATOR LED ----- + +// indicator LED on off: high (2) +// indicator LED on lockout: low (1) +#undef INDICATOR_LED_DEFAULT_MODE +#define INDICATOR_LED_DEFAULT_MODE ((1<<2) + 2) + + + + + +// ----- RAMP LEVELS ----- + + +// Smooth Ramp settings +#undef RAMP_SMOOTH_FLOOR +#define RAMP_SMOOTH_FLOOR 1 +#undef RAMP_SMOOTH_CEIL +#define RAMP_SMOOTH_CEIL 150 // q8 plus has enough thermal mass to handle this +#undef DEFAULT_RAMP_SPEED +#define DEFAULT_RAMP_SPEED 2 // ramp speed: half + +// Stepped Ramp settings +#undef RAMP_DISCRETE_FLOOR +#define RAMP_DISCRETE_FLOOR RAMP_SMOOTH_FLOOR +#undef RAMP_DISCRETE_CEIL +#define RAMP_DISCRETE_CEIL RAMP_SMOOTH_CEIL +#undef RAMP_DISCRETE_STEPS +#define RAMP_DISCRETE_STEPS 9 // 9 steps + +// Simple UI Ramp Stepped Ramp settings +#undef SIMPLE_UI_FLOOR +#define SIMPLE_UI_FLOOR 15 +#undef SIMPLE_UI_CEIL +#define SIMPLE_UI_CEIL 75 // max regulated level +#undef SIMPLE_UI_STEPS +#define SIMPLE_UI_STEPS 5 // 5 steps, spaced 15 levels apart + + + + + +// ----- RAMP SETTINGS ----- + + +// set manual memory to step 2 of Stepped Ramp +#undef DEFAULT_MANUAL_MEMORY +#define DEFAULT_MANUAL_MEMORY 20 + +// use turbo style 1 (2C goes to turbo) because ceiling and turbo are equal +#undef DEFAULT_2C_STYLE +#define DEFAULT_2C_STYLE 1 + + + + + +// ----- CHANNEL SETTINGS ----- + + +// use main emitter/s by default +#undef DEFAULT_CHANNEL_MODE +#define DEFAULT_CHANNEL_MODE CM_MAIN + +// enable only main emitter channel +#undef CHANNEL_MODES_ENABLED +#define CHANNEL_MODES_ENABLED 0b00000001 + + + + + +// ----- BLINKY/UTILITY MODES ----- + + +// use indicator led by default for blinkies +#undef DEFAULT_BLINK_CHANNEL +#define DEFAULT_BLINK_CHANNEL CM_AUX