NoSloppy

Untitled

Feb 26th, 2021
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.81 KB | None | 0 0
  1. #ifdef CONFIG_TOP
  2. #include "proffieboard_v2_config.h"
  3. #define NUM_BLADES 1
  4. #define NUM_BUTTONS 1
  5. #define VOLUME 2200
  6. const unsigned int maxLedsPerStrip = 144;
  7. #define CLASH_THRESHOLD_G 3.5
  8. #define ENABLE_AUDIO
  9. #define ENABLE_MOTION
  10. #define ENABLE_WS2811
  11. #define ENABLE_SD
  12. #define COLOR_CHANGE_DIRECT
  13. #define DISABLE_DIAGNOSTIC_COMMANDS
  14. #define SA22C_SWING_ON
  15. #define SA22C_TWIST_ON
  16. #define SA22C_TWIST_OFF
  17. #define IDLE_OFF_TIME 60*5*1000
  18. #endif
  19.  
  20. #ifdef CONFIG_PROP
  21. #include "../props/saber_sa22c_buttons.h"
  22. #endif
  23.  
  24.  
  25. #ifdef CONFIG_PRESETS
  26.  
  27. Preset presets[] = {
  28. { "KRossguardv3", "tracks/Maceboot.wav",
  29. StylePtr<
  30. Layers<
  31. AudioFlicker<RotateColorsX<Variation,Rgb16<169,0,65535>>,RotateColorsX<Variation,Rgb16<1,1982,9304>>>,
  32. TransitionEffectL<TrConcat<TrFade<400>,Mix<SwingSpeed<400>,AudioFlickerL<RotateColorsX<Variation,Rgb<150,150,255>>>,White>,TrDelay<30000>,Mix<SwingSpeed<400>,AudioFlickerL<RotateColorsX<Variation,Rgb<150,150,255>>>,White>,TrFade<800>>,EFFECT_FORCE>,
  33. AlphaL<RotateColorsX<Variation,Rgb<150,150,255>>,SwingSpeed<400>>,
  34. TransitionEffectL<TrConcat<TrInstant,White,TrFade<1200>>,EFFECT_LOCKUP_END>,
  35. ResponsiveLockupL<Strobe<White,BrownNoiseFlicker<White,Red,300>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Int<16000>>>,TrFade<400>>,TrFade<100>,Scale<BladeAngle<>,Int<28000>,Int<2000>>,Scale<SwingSpeed<100>,Int<10000>,Int<14000>>>,
  36. ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Yellow>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<LemonChiffon,Int<16000>>,30>,TrSmoothFade<600>>>,
  37. AlphaL<TransitionEffect<Rgb16<27912,44108,65535>,Rgb<128,0,0>,TrInstant,TrConcat<TrFade<2500>,Red,TrFade<2800>,Orange,TrFade<2500>>,EFFECT_IGNITION>,Bump<Int<0>,Int<2000>>>,
  38. ResponsiveStabL<Red>,
  39. ResponsiveBlastWaveL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>>,
  40. ResponsiveBlastWaveL<NavajoWhite,Int<300>,Int<100>,Int<300>,Int<28000>,Int<8000>,EFFECT_CLASH>,
  41. TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<RotateColorsX<Variation,Rgb<150,150,255>>>,TrFade<1200>>,EFFECT_IGNITION>,
  42. LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,
  43. LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,
  44. InOutTrL<TrWipeX<Scale<BladeAngle<>,Int<1100>,Int<150>>>,TrWipeInX<Scale<BladeAngle<>,Int<900>,Int<300>>>>,
  45. TransitionEffectL<TrConcat<TrInstant,AlphaL<Rgb16<27912,44108,65535>,Bump<Int<0>,Int<10000>>>,TrFade<3000>,AlphaL<Orange,Bump<Int<0>,Int<8000>>>,TrFade<3000>,AlphaL<Red,Bump<Int<0>,Int<6000>>>,TrFade<2000>>,EFFECT_RETRACTION>>
  46. >()},
  47.  
  48. { "JediCommando", "tracks/JediTheme01.wav",
  49. StylePtr<Layers<Stripes<9000,-900,RotateColorsX<Variation,Green>,Pulsing<RotateColorsX<Variation,Rgb16<24485,63295,4438>>,RotateColorsX<Variation,Rgb16<6791,65535,4702>>,200>,RotateColorsX<Variation,Green>>,TransitionEffectL<TrConcat<TrFade<600>,RandomFlicker<RotateColorsX<Variation,Rgb16<2243,65535,1175>>,RotateColorsX<Variation,Rgb16<2243,65535,1175>>>,TrDelay<30000>,RotateColorsX<Variation,Green>,TrFade<800>>,EFFECT_FORCE>,LockupTrL<Layers<AlphaL<AudioFlickerL<White>,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<White,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Int<10000>>>>,TrConcat<TrInstant,AlphaL<White,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Int<20000>>>,TrFade<400>>,TrConcat<TrInstant,White,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>>>,AlphaL<RotateColorsX<Variation,GreenYellow>,SmoothStep<Scale<SlowNoise<Int<7000>>,Int<400>,Int<8000>>,Int<-22000>>>,ResponsiveStabL<Red>,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>>,ResponsiveClashL<White,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>,Int<20000>>,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<TrWipeX<Scale<BladeAngle<>,Int<900>,Int<200>>>,TrWipeInX<Scale<BladeAngle<>,Int<1000>,Int<600>>>>>>()},
  50.  
  51.  
  52. { "TheReturn", "tracks/JediTheme01.wav",
  53. StylePtr<Layers<Stripes<6000,-2300,RotateColorsX<Variation,Rgb16<65535,0,6467>>,RotateColorsX<Variation,Rgb16<20996,0,9110>>,RotateColorsX<Variation,Rgb16<37562,3463,78>>>,LockupTrL<Layers<AlphaL<AudioFlickerL<Rgb<255,225,0>>,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<NavajoWhite,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Int<10000>>>>,TrConcat<TrInstant,AlphaL<TransitionEffect<Rgb<255,225,0>,NavajoWhite,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Int<20000>>>,TrFade<400>>,TrConcat<TrJoinR<TrWipe<100>,TrWipeIn<100>>,White,TrJoinR<TrWipe<100>,TrWipeIn<100>>>,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>>>,MultiTransitionEffectL<TrConcat<TrDelay<300>,AlphaL<White,SwingSpeed<400>>,TrDelay<15000>,AlphaL<AudioFlickerL<White>,SmoothStep<Int<6000>,Int<-4000>>>,TrFade<500>>,EFFECT_STAB>,AlphaL<Mix<IsLessThan<BladeAngle<>,Int<26000>>,MultiTransitionEffectL<TrConcat<TrWipeIn<200>,White,TrWipeIn<200>>,EFFECT_STAB>,MultiTransitionEffectL<TrConcat<TrWipe<200>,White,TrWipe<200>>,EFFECT_STAB>>,Int<32768>>,ResponsiveBlastWaveL<TransitionEffect<Rgb<255,225,0>,NavajoWhite,TrInstant,TrFade<50>,EFFECT_BLAST>,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>>,ResponsiveBlastWaveL<White,Int<300>,Int<100>,Int<300>,Int<28000>,Int<8000>,EFFECT_CLASH>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<RotateColorsX<Variation,Rgb<160,60,255>>>,TrFade<1200>>,EFFECT_IGNITION>,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,200>,TrWipeInSparkTip<White,500,100>>,TransitionEffectL<TrConcat<TrInstant,AlphaL<BrownNoiseFlickerL<White,Int<90>>,SmoothStep<Scale<SlowNoise<Int<3000>>,Int<500>,Int<3000>>,Int<-500>>>,TrDelay<2000>>,EFFECT_RETRACTION>>>()},
  54.  
  55.  
  56. { "Senate Majority", "tracks/JediTheme01.wav",
  57. StylePtr<Layers<RandomFlicker<RotateColorsX<Variation,Rgb16<65535,52,52>>,RotateColorsX<Variation,Rgb16<26511,4569,7>>>,AlphaL<RotateColorsX<Variation,Rgb16<64410,6308,729>>,Scale<IsLessThan<SwingSpeed<400>,Int<20600>>,Scale<SwingSpeed<600>,Int<-19300>,Int<32768>>,Int<0>>>,LockupTrL<Layers<AlphaL<AudioFlickerL<Rgb<255,240,80>>,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<LemonChiffon,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Int<10000>>>>,TrConcat<TrInstant,AlphaL<TransitionEffect<Rgb<255,180,50>,LemonChiffon,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,Bump<Scale<BladeAngle<>,Int<28000>,Int<8000>>,Int<20000>>>,TrFade<400>>,TrConcat<TrInstant,AlphaL<Mix<SmoothStep<Scale<BladeAngle<>,Int<18000>,Int<8000>>,Int<1000>>,Stripes<1500,2500,TransitionEffect<DarkOrange,Rgb<255,180,50>,TrInstant,TrFade<50>,EFFECT_LOCKUP_BEGIN>,Red>,Stripes<1500,-2500,TransitionEffect<DarkOrange,Rgb<255,180,50>,TrInstant,TrFade<50>,EFFECT_LOCKUP_BEGIN>,Red>>,Int<18000>>,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>>>,AlphaL<RotateColorsX<Variation,DarkOrange>,Bump<Int<0>,Scale<TwistAngle<5>,Int<2000>,Int<10000>>>>,MultiTransitionEffectL<TrConcat<TrDelay<300>,AudioFlickerL<White>,TrDelay<15000>,AlphaL<AudioFlickerL<White>,SmoothStep<Int<6000>,Int<-4000>>>,TrFade<500>>,EFFECT_STAB>,AlphaL<Mix<IsLessThan<BladeAngle<>,Int<26000>>,MultiTransitionEffectL<TrConcat<TrWipeIn<200>,White,TrWipeIn<200>>,EFFECT_STAB>,MultiTransitionEffectL<TrConcat<TrWipe<200>,White,TrWipe<200>>,EFFECT_STAB>>,Int<32768>>,ResponsiveBlastWaveL<TransitionEffect<Rgb<255,240,80>,LemonChiffon,TrInstant,TrFade<50>,EFFECT_BLAST>,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>>,ResponsiveBlastWaveL<White,Int<300>,Int<100>,Int<300>,Int<28000>,Int<8000>,EFFECT_CLASH>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<Yellow>,TrFade<300>>,EFFECT_IGNITION>,AlphaL<Rgb16<13896,1,1>,SmoothStep<Scale<SlowNoise<Int<2400>>,Int<22000>,Int<40000>>,Int<22000>>>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,Rgb<255,200,0>,DarkOrange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipeSparkTip<White,70>,TrWipeInSparkTip<Moccasin,600,200>>,TransitionEffectL<TrConcat<TrInstant,AlphaL<BrownNoiseFlickerL<NavajoWhite,Int<10>>,SmoothStep<Scale<SlowNoise<Int<1000>>,Int<100>,Int<1000>>,Int<-20>>>,TrDelay<1400>>,EFFECT_RETRACTION>>>()},
  58.  
  59.  
  60. { "KRossguardv3", "tracks/CantinaSong01.wav",
  61. &style_charging, "Battery\nLevel"}
  62. };
  63.  
  64. BladeConfig blades[] = {
  65. { 0, WS281XBladePtr<124, bladePin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin5> >(), CONFIGARRAY(presets) },
  66. };
  67. #endif
  68.  
  69. #ifdef CONFIG_BUTTONS
  70. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  71. #endif
Advertisement
Add Comment
Please, Sign In to add comment