Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef CONFIG_TOP
- #include "proffieboard_v2_config.h"
- #define NUM_BLADES 4
- #define NUM_BUTTONS 2
- #define VOLUME 2250
- const unsigned int maxLedsPerStrip = 144;
- #define CLASH_THRESHOLD_G 3.0
- #define ENABLE_AUDIO
- #define ENABLE_MOTION
- #define ENABLE_WS2811
- #define ENABLE_SD
- #define COLOR_CHANGE_DIRECT
- #define DISABLE_DIAGNOSTIC_COMMANDS
- #define FETT263_SWING_ON
- #define FETT263_LOCKUP_DELAY 200
- #define FETT263_TWIST_ON
- #define FETT263_TWIST_OFF
- #define FETT263_STAB_ON
- #define FETT263_THRUST_ON
- #define SAVE_STATE
- #define MOTION_TIMEOUT 60 * 15 * 1000
- #define FETT263_BM_DISABLE_OFF_BUTTON
- #define FETT263_SWING_ON_SPEED 250
- #endif
- #ifdef CONFIG_PROP
- #include "../props/saber_fett263_buttons.h"
- #endif
- #ifdef CONFIG_PRESETS
- Preset presets[] = {
- { "Luke Skywalker - ROTJ", "Luke Skywalker - ROTJ/tracks/ROTJ.wav",
- StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Green>,RotateColorsX<Variation,Rgb<0,128,0>>>,AlphaL<LemonChiffon,SwingSpeed<600>>,LockupTrL<Layers<AlphaL<AudioFlickerL<Rgb<255,240,80>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<LemonChiffon,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Int<10000>>>>,TrConcat<TrInstant,TransitionEffect<Rgb<255,180,50>,LemonChiffon,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,TrFade<400>>,TrConcat<TrInstant,TransitionEffect<LemonChiffon,Rgb<255,180,50>,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,ResponsiveStabL<Red,TrWipeIn<600>,TrWipe<600>>,EffectSequence<EFFECT_BLAST,ResponsiveBlastL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<100>,EFFECT_BLAST>,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>>,Layers<ResponsiveBlastFadeL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<100>,EFFECT_BLAST>,Scale<SwingSpeed<200>,Int<10000>,Int<18000>>>,ResponsiveBlastFadeL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<100>,EFFECT_BLAST>,Scale<SwingSpeed<200>,Int<4000>,Int<10000>>>,ResponsiveBlastWaveL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<50>,EFFECT_BLAST>,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,BlastL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<50>,EFFECT_BLAST>>,ResponsiveBlastL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<50>,EFFECT_BLAST>>>>,ResponsiveClashL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<100>,EFFECT_CLASH>,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>,Int<20000>>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<800>>,EFFECT_IGNITION>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<1000>>,EFFECT_RETRACTION>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipeSparkTip<White,300>,TrWipeInSparkTip<White,500>,Black>>>(),
- StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Green>,RotateColorsX<Variation,Rgb<0,128,0>>> ,AlphaL<LemonChiffon,SwingSpeed<600>>,LockupTrL<BrownNoiseFlickerL<LemonChiffon,Int<200>>,TrConcat<TrInstant,LemonChiffon,TrFade<300>>,TrFade<300>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<AlphaL<Red,Int<0>>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,BlastL<LemonChiffon>,SimpleClashL<LemonChiffon>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<800>>,EFFECT_IGNITION>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<1000>>,EFFECT_RETRACTION>,InOutTrL<TrInstant,TrFade<300>,Pulsing<RotateColorsX<Variation,Rgb<150,255,150>>,RotateColorsX<Variation,Rgb<0,10,0>>,3000>>>>(),
- StylePtr<InOutHelper<Blinking<Black,Rgb<130,130,130>,1500,500>, 1, 1, Sequence<Rgb<130,130,130>, Black, 200, 30, 0b0000000000000000,0b0010101010101000>>>(),
- StylePtr<InOutHelper<Rgb<85,85,85>, 1, 1, Sequence<Rgb<85,85,85>, Black, 200, 30, 0b1010101010101010,0b1000000000000000>>>()},
- { "Obi-Wan Kenobi - ANH", "Obi-Wan Kenobi - ANH/tracks/ANH.wav",
- StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Blue>,RotateColorsX<Variation,Rgb<0,0,128>>>,AlphaL<LemonChiffon,SwingSpeed<600>>,LockupTrL<Layers<AlphaL<AudioFlickerL<Rgb<255,240,80>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<LemonChiffon,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Int<10000>>>>,TrConcat<TrInstant,TransitionEffect<Rgb<255,180,50>,LemonChiffon,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,TrFade<400>>,TrConcat<TrInstant,TransitionEffect<LemonChiffon,Rgb<255,180,50>,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,ResponsiveStabL<Red,TrWipeIn<600>,TrWipe<600>>,EffectSequence<EFFECT_BLAST,ResponsiveBlastL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<100>,EFFECT_BLAST>,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>>,Layers<ResponsiveBlastFadeL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<100>,EFFECT_BLAST>,Scale<SwingSpeed<200>,Int<10000>,Int<18000>>>,ResponsiveBlastFadeL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<100>,EFFECT_BLAST>,Scale<SwingSpeed<200>,Int<4000>,Int<10000>>>,ResponsiveBlastWaveL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<50>,EFFECT_BLAST>,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,BlastL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<50>,EFFECT_BLAST>>,ResponsiveBlastL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<50>,EFFECT_BLAST>>>>,ResponsiveClashL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<100>,EFFECT_CLASH>,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>,Int<20000>>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<800>>,EFFECT_IGNITION>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<1000>>,EFFECT_RETRACTION>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipeSparkTip<White,300>,TrWipeInSparkTip<White,500>,Black>>>(),
- StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Blue>,RotateColorsX<Variation,Rgb<0,0,128>>>,AlphaL<LemonChiffon,SwingSpeed<600>>,LockupTrL<BrownNoiseFlickerL<LemonChiffon,Int<200>>,TrConcat<TrInstant,LemonChiffon,TrFade<300>>,TrFade<300>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<AlphaL<Red,Int<0>>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,BlastL<LemonChiffon>,SimpleClashL<LemonChiffon>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<800>>,EFFECT_IGNITION>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<White>,TrFade<1000>>,EFFECT_RETRACTION>,InOutTrL<TrInstant,TrFade<300>,Pulsing<RotateColorsX<Variation,Rgb<150,150,255>>,RotateColorsX<Variation,Rgb<0,0,10>>,3000>>>>(),
- StylePtr<InOutHelper<Blinking<Black,Rgb<130,130,130>,1500,500>, 1, 1, Sequence<Rgb<130,130,130>, Black, 200, 30, 0b0000000000000000,0b0010101010101000>>>(),
- StylePtr<InOutHelper<Rgb<85,85,85>, 1, 1, Sequence<Rgb<85,85,85>, Black, 200, 30, 0b1010101010101010,0b1000000000000000>>>()},
- { "Battery", "",
- StylePtr<Black>(),
- &style_charging,
- StylePtr<Black>(),
- StylePtr<Black>(),
- "Battery\nlevel"},
- };
- struct AccentsLED {
- static constexpr float MaxAmps = 0.02;
- static constexpr float MaxVolts = 3.2;
- static constexpr float P2Amps = 0.10;
- static constexpr float P2Volts = 3.0;
- static constexpr float R = 0; // Resistor value
- static const int Red = 255;
- static const int Green = 255;
- static const int Blue = 255;
- };
- BladeConfig blades[] = {
- { 0,
- // Main Blade 126
- SubBlade(18, 143, WS2811XBladePtr<144, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >() ) ,
- // Crystal 2 and PCB 16
- SubBlade(0, 17, NULL),
- // Red arrow
- SimpleBladePtr<AccentsLED, NoLED, NoLED, NoLED, bladePowerPin4, -1, -1, -1>(),
- // Green Arrow
- SimpleBladePtr<AccentsLED, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(),
- CONFIGARRAY(presets) },
- };
- #endif
- #ifdef CONFIG_BUTTONS
- Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
- Button AuxButton(BUTTON_AUX, auxPin, "aux");
- #endif
Add Comment
Please, Sign In to add comment