Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * This is the config file for the Saberz Project M saber.
- * Specs:
- * Proffieboard V2.2
- * Li-Ion 18650 3.7V 15A 3120mAh PCB Protected Rechargeable Battery
- * 28mm speaker
- */
- #ifdef CONFIG_TOP
- #include "proffieboard_v2_config.h"
- #define NUM_BLADES 1// Only one blade per each hilt (no accents)
- #define NUM_BUTTONS 2// Uses two buttons
- #define VOLUME 2800//M aximum recommended volume is 3000
- const unsigned int maxLedsPerStrip = 269;
- #define CLASH_THRESHOLD_G 3.0
- #define ENABLE_AUDIO
- #define ENABLE_MOTION
- #define ENABLE_WS2811
- #define ENABLE_SD
- #define SAVE_PRESET// Saves the current font preset after kill-key engaged.
- #define ENABLE_SERIAL
- #define ENABLE_SSD1306
- #define IDLE_OFF_TIME 60 * 5 * 1000//shuts off power to all blades after 5 minutes, to help conserve battery when idle.
- #define DISABLE_COLOR_CHANGE
- #define FETT263_BATTLE_MODE_ALWAYS_ON
- // Battle Mode is always on, toggle controls deactivated
- // This will disable traditional Clash and Stab effects
- // (cannot be used with FETT263_BATTLE_MODE_START_ON)
- // Battle Mode is the mode in which Clash and Stab effects are automated by the OS
- #define FETT263_LOCKUP_DELAY 200
- // This is the "delay" in millis to determine Clash vs Lockup
- // Increase this value by 100 if too much bounce is experienced during clashes
- #endif
- //inlcludes customized button mapping.
- #ifdef CONFIG_PROP
- //#include "../props/saber_shtok_buttons.h"
- #include "../props/saber_fett263_buttons.h"
- #endif
- #ifdef CONFIG_PRESETS
- Preset presets[] =
- {
- {
- "Menace", "tracks/fates.wav",
- //Main Blade
- /* copyright Fett263 Simple (Primary Blade) OS6 Style
- https://fett263.com/fett263-proffieOS6-style-library.html#Simple
- OS6.7 v4.01
- Single Style
- Base Style: HumpFlicker Small (Single Color (50%))
- Base Color: Rgb<255,0,0> (0)
- --Effects Included--
- Ignition Effect: Standard Ignition
- Retraction Effect: Standard Retraction
- CoolDown Effect: Power Flash
- Lockup Effect: Responsive Lockup, Begin Effect: Real Clash, End Effect: Localized Absorb
- LightningBlock Effect: Responsive Lightning Block
- Drag Effect: Intensity Sparking Drag
- Melt Effect: Responsive Melt
- Stab Effect: AudioFlicker Stab
- Clash Effect: Responsive Clash
- */
- StylePtr<Layers<HumpFlicker<RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,Mix<Int<16448>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>,60>,TransitionEffectL<TrConcat<TrJoin<TrDelayX<RetractionTime<0>>,TrInstant>,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,0,0>>,TrFade<1000>>,EFFECT_RETRACTION>,TransitionEffectL<TrConcat<TrJoin<TrDelayX<WavLen<>>,TrWipeIn<200>>,AlphaL<AudioFlickerL<RgbArg<STAB_COLOR_ARG,Rgb<255,255,255>>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<2000>>>,TrWipe<200>>,EFFECT_STAB>,TransitionEffectL<TrConcat<TrInstant,AlphaL<RgbArg<CLASH_COLOR_ARG,Rgb<255,255,255>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-10000>>>,Scale<ClashImpactF<>,Int<12000>,Int<60000>>>>,TrFadeX<Scale<ClashImpactF<>,Int<200>,Int<400>>>>,EFFECT_CLASH>,LockupTrL<AlphaMixL<Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AudioFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>,BrownNoiseFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Int<200>>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,TrFade<400>>,TrConcat<TrInstant,AlphaL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-10000>>>,Int<13000>>>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,AudioFlicker<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Blue>,50,1>,TrConcat<TrInstant,AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Int<16000>>,30>,TrSmoothFade<600>>>,LockupTrL<AlphaL<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrConcat<TrJoin<TrDelay<4000>,TrWipeIn<200>>,AlphaL<BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Int<300>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrFade<4000>>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrConcat<TrWipeIn<100>,AlphaL<RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrFade<300>>,TrWipe<200>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipeX<IgnitionTime<300>>,TrWipeInX<RetractionTime<0>>,Black>>>(),
- },
- {
- "Crimson_Lord", "tracks/fates.wav",
- //Main Blade
- /* copyright Fett263 Simple (Primary Blade) OS6 Style
- https://fett263.com/fett263-proffieOS6-style-library.html#Simple
- OS6.7 v4.01
- Single Style
- Base Style: HumpFlicker Small (Single Color (50%))
- Base Color: Rgb<255,0,0> (0)
- --Effects Included--
- Ignition Effect: Standard Ignition
- Retraction Effect: Standard Retraction
- CoolDown Effect: Power Flash
- Lockup Effect: Responsive Lockup, Begin Effect: Real Clash, End Effect: Localized Absorb
- LightningBlock Effect: Responsive Lightning Block
- Drag Effect: Intensity Sparking Drag
- Melt Effect: Responsive Melt
- Stab Effect: AudioFlicker Stab
- Clash Effect: Responsive Clash
- */
- StylePtr<Layers<HumpFlicker<RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,Mix<Int<16448>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>,60>,TransitionEffectL<TrConcat<TrJoin<TrDelayX<RetractionTime<0>>,TrInstant>,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,0,0>>,TrFade<1000>>,EFFECT_RETRACTION>,TransitionEffectL<TrConcat<TrJoin<TrDelayX<WavLen<>>,TrWipeIn<200>>,AlphaL<AudioFlickerL<RgbArg<STAB_COLOR_ARG,Rgb<255,255,255>>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<2000>>>,TrWipe<200>>,EFFECT_STAB>,TransitionEffectL<TrConcat<TrInstant,AlphaL<RgbArg<CLASH_COLOR_ARG,Rgb<255,255,255>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-10000>>>,Scale<ClashImpactF<>,Int<12000>,Int<60000>>>>,TrFadeX<Scale<ClashImpactF<>,Int<200>,Int<400>>>>,EFFECT_CLASH>,LockupTrL<AlphaMixL<Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AudioFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>,BrownNoiseFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Int<200>>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,TrFade<400>>,TrConcat<TrInstant,AlphaL<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,19451>,Int<-10000>>>,Int<13000>>>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,AudioFlicker<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Blue>,50,1>,TrConcat<TrInstant,AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Int<16000>>,30>,TrSmoothFade<600>>>,LockupTrL<AlphaL<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrConcat<TrJoin<TrDelay<4000>,TrWipeIn<200>>,AlphaL<BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Int<300>>,SmoothStep<IntArg<DRAG_SIZE_ARG,28000>,Int<3000>>>,TrFade<4000>>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrConcat<TrWipeIn<100>,AlphaL<RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,SmoothStep<IntArg<MELT_SIZE_ARG,28000>,Int<4000>>>,TrFade<300>>,TrWipe<200>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipeX<IgnitionTime<300>>,TrWipeInX<RetractionTime<0>>,Black>>>(),
- },
- };
- BladeConfig blades[] =
- {
- {
- // blade ID resistor not used
- 0,
- // Main blade, uses data1 and LED 1,2,3 pads
- // MAIN BLADE – 269 = the number of LEDs on the NPXL connector (16) plus the number of LEDs in the blade (253):
- WS2811BladePtr<269, WS2811_800kHz|WS2811_GRB>(),
- CONFIGARRAY(presets)
- }
- };
- #endif
- #ifdef CONFIG_BUTTONS
- Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
- Button AuxButton(BUTTON_AUX, auxPin, "aux");
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement