I have found what works best for me, and just thought I’d share in case someone else can benefit from it, or feels like discussing it.
So, since commented lines are ignored by the compiler, what I do is have a constant, complete, organized list of ALL the #defines I might ever use, and simply treat this list as a checkmark list to turn options on and off on a per-saber basis.
I have a “test” config file named BC_Testbed.h that I use to test new boards with, try new features, experiment with code edit results etc… This config always gets updated to include the latest supported #defines and features.
So, when making a new config, I can always start with copying the CONFIG_TOP info from that universal test config. It also allows for easy updates to older config files when I pull a dusty saber from the shelf.
I categorize the defines by blade, audio, gestures etc, and each section contains the pertinent defines.
Here’s the current version. It does include some now-dead stuff, unofficial stuff, notes-to-self labeled “BC” and things, but you can get the general idea.
I suggest viewing on a screen that will allow it to show wider than the website here can render, to avoid excessive wrapped text.
Feel free to ask anything about any of this.
// BC_ID7_7.x
#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 1
#define NUM_BUTTONS 1
// #define DUAL_POWER_BUTTONS // BC Make both buttons identical for 1-btn use... useful?
// ------ Audio Stuff --------
#define VOLUME 1200
#define BOOT_VOLUME 200
#define ENABLE_AUDIO
// #define SPEAK_BLADE_ID
// #define ENABLE_I2S_OUT
// #define ENABLE_SPDIF_OUT
// #define LINE_OUT_VOLUME 2000 // SPDIF out
#define FILTER_CUTOFF_FREQUENCY 100
#define FILTER_ORDER 8
// #define FEMALE_TALKIE_VOICE // BC now canon
#define NO_REPEAT_RANDOM // BC now canon
#define KILL_OLD_PLAYERS // BC now canon
#define DISABLE_TALKIE // BC Prob only in extreme need conditions
// ------ Blade Stuff ------
#define ENABLE_WS2811
const unsigned int maxLedsPerStrip = 144;
// New define that can speed up processing a bit. Basically, it can calculate the colors for the next
// blade (or the next frame for the same blade) even though it's not done feeding out the data for the
// data in the color buffer yet.Equivalent to just indrasing maxLedsPerStrip.
#define EXTRA_COLOR_BUFFER_SPACE 30
// #define SHARED_POWER_PINS
// #define BLADE_DETECT_PIN blade3Pin
// #define ENABLE_POWER_FOR_ID PowerPINS<bladePowerPin2, bladePowerPin3>
// #define BLADE_ID_CLASS ExternalPullupBladeID<bladeIdentifyPin, 33000>
// #define BLADE_ID_CLASS BridgedPullupBladeID<bladeIdentifyPin, 9> // TX pad
// #define BLADE_ID_CLASS SnapshotBladeID<bladeIdentifyPin> // This will make it use the speed-of-charging-a-capacitor method of blade ID which sometimes works without resistors.
// Blade ID can detect if a blade is connected or not, but it won't actually reach the NO_BLADE value, so I would recommend using something like 200000 instead of NO_BLADE.
// ------ SD Card Stuff -------
#define ENABLE_SD
//#define SAVE_STATE
// #define SAVE_VOLUME
// #define SAVE_PRESET
#define SAVE_COLOR_CHANGE
// #define SAVE_DYNAMIC_DIMMING
// #define KEEP_SAVEFILES_WHEN_PROGRAMMING // upload overwrites presets.ini/tmp unless this is defined
// ------- OLED stuff ----------
// #define ENABLE_SSD1306
// #define OLED_FLIP_180 // BC now canon
// #define USE_AUREBESH_FONT // BC now canon
// #define PLI_OFF_TIME 60 * 5 * 1000
// #define OLED_USE_BLASTER_IMAGES
// #define POV_INCLUDE_FILE "1024px-Star_Wars_Logo.svg_144_SC_POV_data.h"
// #define POV_INCLUDE_FILE "Raiden_123_FC_POV_data.h"
// #define POV_INCLUDE_FILE "JohnCena_144_8b_POV_data.h"
// ------ System Stuff --------
// #define ENABLE_SERIAL //Bluetooth
// #define DISABLE_COLOR_CHANGE
// #define ENABLE_DEVELOPER_COMMANDS
#define DISABLE_DIAGNOSTIC_COMMANDS
#define IDLE_OFF_TIME 60 * 5 * 1000
#define MOTION_TIMEOUT 60 * 5 * 1000
// #define ORIENTATION ORIENTATION_FETS_TOWARDS_BLADE
// #define ORIENTATION ORIENTATION_USB_TOWARDS_BLADE
// #define ORIENTATION ORIENTATION_TOP_TOWARDS_BLADE
// #define ORIENTATION ORIENTATION_BOTTOM_TOWARDS_BLADE
// #define ORIENTATION ORIENTATION_SDA_TOWARDS_BLADE
// #define ORIENTATION ORIENTATION_SERIAL_TOWARDS_BLADE
// The following changes the angle required to register twists on curved hilts.
// Example is for assaj ventress curved hit install
// #define ORIENTATION_ROTATION 0,-20,0
// #define CONFIG_STARTUP_DELAY 15000 // BC now canon
#define DISABLE_BASIC_PARSER_STYLES // Standard, Advanced, Old School original templated styles etc...
// ------- Motion and Gesture stuff -------
#define ENABLE_MOTION
#define CLASH_THRESHOLD_G 3.5
// #define BC_SWING_ON // Motion time out causing false ignitions on preset switch. This is annoying but possibly resolved with I2C updates.
// #define BC_STAB_ON
#define BC_THRUST_ON
// #define BC_TWIST_ON
#define BC_TWIST_OFF
// #define BC_FORCE_PUSH
// #define BC_FORCE_PUSH_LENGTH 5
#define ENABLE_AUTO_SWING_BLAST // BC Multiblast continues as long as swinging within 1 second.
#define ENABLE_SPINS
#define ENABLE_AUTO_SPINS_BLAST // Same as auto-multi-blast but for spins. 2 second window. **Required modified prop_base.h
// #define GESTURE_AUTO_BATTLE_MODE
#define BC_LOCKUP_DELAY 200
// #define NO_BLADE_NO_GEST_ONOFF // If using blade detect, No Blade = No Gesture ignitions or retractions
// ------- Custom / Experimental / Alpha-Beta stuff ---------
// #define AUTO_HUMSTART****** DEAD // BC now canon as ProffieOSHumDelay in config.ini
// #define LOW_BATT_ONCE // BC - THIS NEEDS TO BE CheckLowBattery(), see PR **Requires modified hybrid_font.h file.
// #define LOW_BATT_WARNINGS_TIERED // meh...just annoying if not accurate..likely. **Requires modified hybrid_font.h file.
// #define ENABLE_GESTURE_MENU // PSISTORM prop - cool stuff! the TrySound else beep void.
// #define BLADE_ID_MONITORED // Constant monitoring of blade resistor value. BladeConfig set to what's detected.
// -------- BC Prop Stuff --------
// #define NO_VOLUME_MENU // self evident. But why?
// #define BC_SWAP // Otherwise 4th held click is SPAM BLAST toggle
// -------- Blaster Stuff ----------
// #define ENABLE_BLASTER_AUTO
// #define BLASTER_SHOTS_UNTIL_EMPTY 15 // (whatever number)
// #define BLASTER_JAM_PERCENTAGE 10 // if not defined, random.
#endif
#ifdef CONFIG_PROP
#include "../props/saber_BC_buttons_personal.h"
//#include "../scripts/motion_startup_recorder.h"
#endif
#ifdef CONFIG_PRESETS
//----Aliases for effects sets via 'using'----
#include "aliases/TrueWhites/BC_effects_1.h" // For Green, light Blue, ...light colored blades
// #include "aliases/TrueWhites/BC_effects_1_BlastRotate.h" // EffectSequence driven different blast animations
// #include "aliases/TrueWhites/BC_effects_2.h" // for crystals chambers or accents
#include "aliases/TrueWhites/BC_effects_Red.h" // For Red or dark blades
#include "aliases/TrueWhites/BC_effects_White.h" // For White blades
// #include "aliases/TrueWhites/BC_12color_8effect_SS.h" // Uses BC_SWAP for base blade color. All in one blade style like EffectScroll from ol' CC Fork. 96 possible blade combos in one style. .
using OnDemandVolumeLevel = TransitionEffectL<TrConcat<TrExtendX<Int<1000>,TrSmoothFade<200>>,AlphaL<Gradient<Blue,Green>,SmoothStep<VolumeLevel,Int<-1>>>,TrSmoothFade<500>>,EFFECT_VOLUME_LEVEL>;
using OnDemandBatteryLevel = AlphaL<TransitionEffectL<TrConcat<TrSmoothFade<500>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<Scale<BatteryLevel,Int<0>,Int<35000>>,Int<-1>>>,TrDelay<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-1>>>,TrSmoothFade<1000>>,EFFECT_BATTERY_LEVEL>,Ifon<Int<0>,Int<32768>>>;
/* __Presets List___
aa_Syndicate/MachineCity
aa_HarrySolo/KAIJU
aa_HarrySolo/DESTABILIZE
aa_HarrySolo/STASIS
aa_JayDalorian/OdaNobunaga
aa_JayDalorian/Blastermode
aa_JayDalorian/Decimate (collab)
aa_Kyberphonic/Metamorphose
aa_NoSloppy/TheMaw
aa_Juansith/Red_Five
*/
Preset ID7 [] = {
...presets follow.....