Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2022
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.74 KB | None | 0 0
  1. #ifdef CONFIG_TOP
  2. #include "proffieboard_v2_config.h"
  3. #define NUM_BLADES 6
  4. #define NUM_BUTTONS 2
  5. #define VOLUME 1000
  6. const unsigned int maxLedsPerStrip = 144;
  7. #define CLASH_THRESHOLD_G 2.7
  8. #define ENABLE_AUDIO
  9. #define ENABLE_MOTION
  10. #define ENABLE_WS2811
  11. #define ENABLE_SD
  12. #define ENABLE_SSD1306
  13. #define COLOR_CHANGE_DIRECT
  14. // this enables "click to change"
  15. #define SA22C_SWING_ON
  16. #define SA22C_TWIST_OFF
  17. #define SA22C_FORCE_PUSH
  18. //#define GESTURE_AUTO_BATTLE_MODE
  19. #define MOTION_TIMEOUT 60 * 15 * 1000
  20. //#define ORIENTATION ORIENTATION_USB_TOWARDS_BLADE
  21. #define ENABLE_SPINS
  22. #define SHARED_POWER_PINS
  23. #endif
  24.  
  25. //FET 1- Not Used
  26. //FET 2- Main Blade/PCB
  27. //FET 3- Main Blade/PCB
  28. //FET 4- Crystal Chamber Ring- 15px
  29. //FET 5- Button Accent, Side Accent, CC- 3px
  30.  
  31.  
  32. //Data 1- Npx PCB- 16px
  33. //Data 2- Main Blade
  34. //Data 3- Button Accent, CC, Side Accent Sub Array- 3px
  35. //Data 4- Crystal Chamber Ring- 15px
  36.  
  37. #ifdef CONFIG_PRESETS
  38. Preset presets[] = {
  39. { "Yoda", "tracks/track1.wav",
  40. //NPX PCB
  41. StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Green>,RotateColorsX<Variation,Rgb<0,128,0>>>,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>>>,TransitionEffectL<TrConcat<TrInstant,HumpFlickerL<White,40>,TrFade<800>>,EFFECT_IGNITION>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<RotateColorsX<Variation,Rgb<90,180,255>>>,TrFade<1200>>,EFFECT_RETRACTION>,InOutTrL<TrWipeSparkTip<White,300>,TrWipeInSparkTip<White,500>,Black>>>(),
  42. //Main Blade
  43. StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Green>,RotateColorsX<Variation,Rgb<0,128,0>>>,AlphaL<AlphaL<Moccasin,Scale<IsLessThan<SwingSpeed<600>,Int<13600>>,Scale<SwingSpeed<600>,Int<-19300>,Int<32768>>,Int<0>>>,SmoothStep<Scale<Scale<IsLessThan<SwingSpeed<600>,Int<13600>>,Scale<SwingSpeed<600>,Int<-19300>,Int<32768>>,Int<0>>,Int<28000>,Int<14000>>,Int<16000>>>,LockupTrL<Layers<AlphaL<AudioFlickerL<Rgb<255,150,0>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<Moccasin,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>>,Int<10000>>>>,TrConcat<TrInstant,AlphaL<TransitionEffect<Rgb<255,150,0>,Moccasin,TrInstant,TrFade<200>,EFFECT_LOCKUP_BEGIN>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>>,Int<20000>>>,TrFade<400>>,TrConcat<TrInstant,TransitionEffect<Moccasin,Rgb<255,150,0>,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>>,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,ResponsiveClashL<TransitionEffect<Rgb<255,150,0>,Moccasin,TrInstant,TrFade<100>,EFFECT_CLASH>,TrInstant,TrFade<400>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>,Int<20000>>,TransitionEffectL<TrConcat<TrInstant,HumpFlickerL<Rgb<150,255,150>,40>,TrFade<800>>,EFFECT_IGNITION>,TransitionEffectL<TrConcat<TrInstant,HumpFlickerL<RotateColorsX<Variation,Rgb<150,255,150>>,40>,TrFade<1200>>,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<TrWipe<300>,TrWipeInX<Scale<BladeAngle<>,Int<800>,Int<300>>>,Black>>>(),
  44. //Button Accent Sub Array 1
  45. StylePtr<InOutHelper<AudioFlicker<Green,Rgb16<0,13655,0>>,300,800,Pulsing<Sparkle<Green,White,50>,Black,1800>>>(),
  46. //CC Accent Sub Array 2
  47. StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Green>,RotateColorsX<Variation,Rgb<0,128,0>>> ,LockupTrL<BrownNoiseFlickerL<White,Int<200>>,TrConcat<TrInstant,White,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<Moccasin>,TransitionEffectL<TrConcat<TrInstant,HumpFlickerL<White,40>,TrFade<800>>,EFFECT_IGNITION>,TransitionEffectL<TrConcat<TrInstant,AudioFlickerL<RotateColorsX<Variation,Rgb<150,255,150>>>,TrFade<1200>>,EFFECT_RETRACTION>,InOutTrL<TrInstant,TrFade<300>,Black>>>(),
  48. //Side Accent Sub Array 3
  49. StylePtr<InOutHelper<AudioFlicker<Rgb<0,125,0>,Green>,300,800>>(),
  50. //CC Ring
  51. StylePtr<Layers<ColorCycle<RotateColorsX<Variation,HoneyDew>,25,100,RotateColorsX<Variation,Green>,25,300,4000>,InOutTrL<TrFade<500>,TrFade<500>,ColorCycle<RotateColorsX<Variation,HoneyDew>,25,100,RotateColorsX<Variation,Green>,25,300,4000>>>>(),"yoda"},
  52. };
  53.  
  54. BladeConfig blades[] = {
  55. { 0, // blade ID resistor not used
  56. // NPX PCB- 16px Data 1 FET 2,3
  57. WS2811BladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
  58. // Main Blade- (XX)px Data 2 FETs 2,3
  59. WS281XBladePtr<122, blade2Pin, Color8::GRBw, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
  60. // Button Accent, CC, Side Accent Sub Array (IN THAT ORDER) Fet 5, Data 3
  61. SubBlade(0, 0, WS281XBladePtr<3, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5> >()),
  62. SubBlade(1, 1, NULL),
  63. SubBlade(2, 2, NULL),
  64. // CC Ring- 16px Data4 FET 4
  65. WS2811BladePtr<16, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin4> >(),
  66. CONFIGARRAY(presets) },
  67. };
  68. #endif
  69.  
  70. #ifdef CONFIG_BUTTONS
  71. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  72. Button AuxButton(BUTTON_AUX, auxPin, "aux");
  73. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement