Lil__Nicky

MHSPPU

Sep 6th, 2024
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.32 KB | None | 0 0
  1. //Proffieboard V2 Configuration by Powell's Power-Ups
  2. #ifdef CONFIG_TOP
  3. #include "proffieboard_v2_config.h"
  4. #define NUM_BLADES 4
  5. #define NUM_BUTTONS 1
  6. const unsigned int maxLedsPerStrip = 144;
  7. #define EXTRA_COLOR_BUFFER_SPACE 60
  8. #define VOLUME 2200
  9. #define BOOT_VOLUME 100
  10. #define CLASH_THRESHOLD_G 3
  11. #define ENABLE_AUDIO
  12. #define ENABLE_MOTION
  13. #define ENABLE_WS2811
  14. #define ENABLE_SD
  15. #define MOTION_TIMEOUT 60 * 5 * 1000
  16. #define IDLE_OFF_TIME 60 * 3 * 1000
  17. #define DISABLE_BASIC_PARSER_STYLES
  18. #define DISABLE_DIAGNOSTIC_COMMANDS
  19. #define SAVE_STATE
  20. #define NO_REPEAT_RANDOM
  21. #define COLOR_CHANGE_DIRECT
  22. #define ENABLE_SSD1306
  23. #define SHARED_POWER_PINS
  24. #define FETT263_SAY_COLOR_LIST_CC
  25. #define FETT263_SAY_BATTERY_PERCENT
  26. #define FETT263_BM_CLASH_DETECT 5
  27. #define FETT263_TWIST_ON
  28. #define FETT263_TWIST_ON_NO_BM
  29. #define FETT263_THRUST_ON
  30. #define FETT263_THRUST_ON_NO_BM
  31. #define FETT263_TWIST_OFF_NO_POSTOFF
  32. #define FETT263_FORCE_PUSH_ALWAYS_ON
  33. #define FETT263_FORCE_PUSH_LENGTH 3
  34. #endif
  35.  
  36. #ifdef CONFIG_PROP
  37. #include "../props/saber_fett263_buttons.h"
  38. #endif
  39.  
  40. #ifdef CONFIG_PRESETS
  41.  
  42. Preset presets[] = {
  43.  
  44. { "Stranger;common", "Stranger/tracks/track1.wav",
  45.  
  46. /* copyright Fett263 Simple (Primary Blade) OS7 Style
  47. https://www.fett263.com/fett263-proffieOS7-style-library.html#Simple
  48. OS7.14 v2.242p
  49. Single Style
  50. Base Style: RandomFlicker (Single Color (50%))
  51.  
  52. Base Color: BaseColorArg (0)
  53.  
  54. --Effects Included--
  55. Ignition Effect: SparkTip Ignition [Color: IgnitionColorArg]
  56. Retraction Effect: Standard Retraction [Color: RetractionColorArg]
  57. Lockup Effect:
  58. 0: mainLockMulti0Shape - Begin: Full Blade Flash - Style: Intensity AudioFlicker - End: Full Blade Absorb
  59. [Color: LockupColorArg]
  60. Lightning Block Effect:
  61. 0: mainLBMulti0Shape - Begin: Full Blade Flash - Style: Strobing AudioFlicker - End: Full Blade Absorb
  62. [Color: LBColorArg]
  63. Drag Effect:
  64. 0: mainDragMulti0Shape - Begin: Wipe In - Style: Intensity Sparking Drag - End: Wipe Out
  65. [Color: DragColorArg]
  66. Melt Effect:
  67. 0: mainMeltMulti0Shape - Begin: Wipe In - Style: Intensity Melt - End: Wipe Out
  68. [Color: StabColorArg]
  69. Stab Effect: AudioFlicker Stab [Color: DragColorArg]
  70. Blast Effect: Blast Fade (Sound Based) [Color: BlastColorArg]
  71. Clash Effect: Responsive Clash [Color: ClashColorArg]
  72. Swing Effect: Force Rage Unstable [Color: BaseColorArg]
  73. Battery Level: Blade Location (Green to Red)
  74. Display Volume: Blade Location [Color: AltColor2Arg]
  75. */
  76. StylePtr<Layers<RandomFlicker<RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,Mix<Int<16448>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>>,TransitionEffectL<TrConcat<TrJoin<TrDelay<5000>,TrFade<300>>,StripesX<Int<3500>,Scale<SlowNoise<Int<3000>>,Int<-2500>,Int<-3500>>,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,Mix<Int<10280>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>,RandomPerLEDFlicker<Mix<Int<2570>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>>,TrFade<300>>,EFFECT_FORCE>,TransitionEffectL<TrConcat<TrJoin<TrDelayX<WavLen<>>,TrWipeIn<200>>,AlphaL<AudioFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,SmoothStep<IntArg<MELT_SIZE_ARG,29554>,Int<2000>>>,TrWipe<200>>,EFFECT_STAB>,TransitionEffectL<TrConcat<TrInstant,AlphaMixL<Bump<EffectPosition<EFFECT_BLAST>,Scale<WavLen<>,Int<9000>,Int<12000>>>,RgbArg<BLAST_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<16384>,Black,RgbArg<BLAST_COLOR_ARG,Rgb<255,255,255>>>>,TrFade<300>>,EFFECT_BLAST>,TransitionEffectL<TrConcat<TrInstant,AlphaL<RgbArg<CLASH_COLOR_ARG,Rgb<255,255,255>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<-10000>>>,Scale<ClashImpactF<>,Int<12000>,Int<60000>>>>,TrFadeX<Scale<ClashImpactF<>,Int<200>,Int<400>>>>,EFFECT_CLASH>,LockupTrL<TransitionEffect<AlphaL<AlphaMixL<Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<-10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<22000>>>,AudioFlicker<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<12000>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>>,BrownNoiseFlicker<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<12000>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>,300>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<-10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<22000>>>>,AlphaL<AudioFlicker<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<20000>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,20677>,Int<-10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,TrExtend<5000,TrInstant>,TrFade<5000>,EFFECT_LOCKUP_BEGIN>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,TrFade<300>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,TrFade<400>>,SaberBase::LOCKUP_NORMAL,Int<1>>,ResponsiveLightningBlockL<Strobe<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,AudioFlicker<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Blue>,50,1>,TrConcat<TrExtend<200,TrInstant>,RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,TrFade<200>>,TrConcat<TrInstant,RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,TrFade<400>>,Int<1>>,LockupTrL<AlphaL<TransitionEffect<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Int<300>>,TrExtend<4000,TrInstant>,TrFade<4000>,EFFECT_DRAG_BEGIN>,SmoothStep<Scale<TwistAngle<>,IntArg<DRAG_SIZE_ARG,29554>,Int<30000>>,Int<3000>>>,TrWipeIn<200>,TrWipe<200>,SaberBase::LOCKUP_DRAG,Int<1>>,LockupTrL<AlphaL<Stripes<2000,4000,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,Mix<Sin<Int<50>>,Black,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>,Mix<Int<4096>,Black,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>>,SmoothStep<Scale<TwistAngle<>,IntArg<MELT_SIZE_ARG,29554>,Int<30000>>,Int<3000>>>,TrConcat<TrExtend<4000,TrWipeIn<200>>,AlphaL<HumpFlicker<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>,RotateColorsX<Int<3000>,Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,68,0>>>>>,100>,SmoothStep<Scale<TwistAngle<>,IntArg<MELT_SIZE_ARG,29554>,Int<30000>>,Int<3000>>>,TrFade<4000>>,TrWipe<200>,SaberBase::LOCKUP_MELT,Int<1>>,InOutTrL<TrWipeSparkTipX<RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>,BendTimePowInvX<IgnitionTime<150>,Mult<IntArg<IGNITION_OPTION2_ARG,10992>,Int<98304>>>>,TrWipeInX<BendTimePowInvX<RetractionTime<0>,Mult<IntArg<RETRACTION_OPTION2_ARG,10992>,Int<98304>>>>,Black>,TransitionEffectL<TrConcat<TrJoin<TrDelay<2000>,TrInstant>,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<BatteryLevel,Int<10000>>>,TrFade<300>>,EFFECT_BATTERY_LEVEL>,TransitionEffectL<TrConcat<TrExtend<2000,TrFade<100>>,AlphaL<RgbArg<ALT_COLOR2_ARG,Rgb<0,0,255>>,Bump<VolumeLevel,Int<8000>>>,TrFade<300>>,EFFECT_VOLUME_LEVEL>>>(),
  77.  
  78. /* copyright Fett263 Simple (Accent LED / PCB) OS7 Style
  79. https://www.fett263.com/fett263-proffieOS7-style-library.html#Simple
  80. OS7.14 v2.242p
  81. Single Style
  82. Base Style: AudioFlicker (Single Color (50%))
  83.  
  84. Off Behavior: Slow Run Forward [Color: BaseColorArg]
  85.  
  86. Base Color: BaseColorArg (0)
  87.  
  88. --Effects Included--
  89. Ignition Effect: SparkTip Ignition [Color: IgnitionColorArg]
  90. Retraction Effect: Fade Out [Color: RetractionColorArg]
  91. Lockup Effect:
  92. 0: accentLockMulti0Shape - Begin: Full Blade Flash - Style: Intensity AudioFlicker - End: Full Blade Absorb
  93. [Color: LockupColorArg]
  94. Lightning Block Effect:
  95. 0: accentLBMulti0Shape - Begin: Full Blade Flash - Style: Strobing AudioFlicker - End: Full Blade Absorb
  96. [Color: LBColorArg]
  97. Drag Effect: NoneMelt Effect: NoneClash Effect: Flash on Clash (Full Blade) [Color: ClashColorArg]
  98. Swing Effect: Force Rage Unstable [Color: BaseColorArg]
  99. */
  100. StylePtr<Layers<AudioFlicker<RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,Mix<Int<16448>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>>,TransitionEffectL<TrConcat<TrJoin<TrDelay<4000>,TrFade<300>>,StripesX<Int<3500>,Scale<SlowNoise<Int<3000>>,Int<-2500>,Int<-3500>>,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,Mix<Int<10280>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>,RandomPerLEDFlicker<Mix<Int<2570>,Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>>>,TrFade<300>>,EFFECT_FORCE>,TransitionEffectL<TrConcat<TrJoin<TrDelay<30>,TrInstant>,RgbArg<CLASH_COLOR_ARG,Rgb<255,255,255>>,TrFade<300>>,EFFECT_CLASH>,LockupTrL<TransitionEffect<AudioFlicker<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<12000>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>>,AudioFlicker<RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<20000>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>>>,TrExtend<5000,TrInstant>,TrFade<5000>,EFFECT_LOCKUP_BEGIN>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,TrFade<300>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<255,255,255>>,TrFade<400>>,SaberBase::LOCKUP_NORMAL,Int<1>>,LockupTrL<Strobe<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,AudioFlicker<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Blue>,50,1>,TrConcat<TrExtend<200,TrInstant>,RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,TrFade<200>>,TrConcat<TrInstant,RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,TrFade<400>>,SaberBase::LOCKUP_LIGHTNING_BLOCK,Int<1>>,InOutTrL<TrWipeSparkTipX<RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>,BendTimePowInvX<IgnitionTime<75>,Mult<IntArg<IGNITION_OPTION2_ARG,10992>,Int<98304>>>>,TrFadeX<BendTimePowInvX<RetractionTime<0>,Mult<IntArg<RETRACTION_OPTION2_ARG,10992>,Int<98304>>>>,TransitionLoop<Black,TrConcat<TrWipe<1000>,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,TrWipe<1000>>>>>>(),
  101.  
  102. /* copyright Fett263 (Accent LED / PCB) OS7 Style
  103. https://www.fett263.com/fett263-proffieOS7-style-library.html#Simple
  104. OS7.14 v2.242cp
  105. Single Style
  106. On Behavior: Solid Color [Color: BaseColorArg]
  107. Off Behavior: Blinking Off-On [Color: BaseColorArg]
  108.  
  109. Base Color: BaseColorArg (0)
  110.  
  111. --Effects Included--
  112. Ignition Effect: Instant [Color: IgnitionColorArg]
  113. Retraction Effect: Instant [Color: RetractionColorArg]
  114. Lockup Effect: NoneLightning Block Effect: NoneDrag Effect: NoneMelt Effect: None */
  115. StylePtr<Layers<RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,InOutTrL<TrInstant,TrInstant,Blinking<Black,RgbArg<BASE_COLOR_ARG,Rgb<255,0,0>>,500,500>>>>(),
  116.  
  117. /* copyright Fett263 (Accent LED / PCB) OS7 Style
  118. https://www.fett263.com/fett263-proffieOS7-style-library.html#Simple
  119. OS7.14 v2.242cp
  120. Single Style
  121. On Behavior: Solid Color [Color: BaseColorArg]
  122. Off Behavior: Blinking On-Off [Color: BaseColorArg]
  123.  
  124. Base Color: BaseColorArg (0)
  125.  
  126. --Effects Included--
  127. Ignition Effect: Instant [Color: IgnitionColorArg]
  128. Retraction Effect: Instant [Color: RetractionColorArg]
  129. Lockup Effect: NoneLightning Block Effect: NoneDrag Effect: NoneMelt Effect: None */
  130. StylePtr<Layers<RgbArg<BASE_COLOR_ARG,Rgb<0,255,0>>,InOutTrL<TrInstant,TrInstant,Blinking<RgbArg<BASE_COLOR_ARG,Rgb<0,255,0>>,Black,500,500>>>>(),
  131.  
  132. "Stranger"
  133.  
  134. },
  135.  
  136. };
  137.  
  138. struct RedLED {
  139. static constexpr float MaxAmps = 0.02;
  140. static constexpr float MaxVolts = 2.2;
  141. static constexpr float P2Amps = 0.01;
  142. static constexpr float P2Volts = 2.0;
  143. static constexpr float R = 75;
  144. static const int Red = 255;
  145. static const int Green = 0;
  146. static const int Blue = 0;
  147.  
  148. };
  149.  
  150. struct GreenLED {
  151. static constexpr float MaxAmps = 0.02;
  152. static constexpr float MaxVolts = 3.2;
  153. static constexpr float P2Amps = 0.01;
  154. static constexpr float P2Volts = 3.0;
  155. static constexpr float R = 22;
  156. static const int Red = 0;
  157. static const int Green = 255;
  158. static const int Blue = 0;
  159.  
  160. };
  161.  
  162. BladeConfig blades[] = {
  163.  
  164. { 0, WS281XBladePtr<122, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
  165.  
  166. WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
  167.  
  168. SimpleBladePtr<RedLED, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>(),
  169.  
  170. SimpleBladePtr<GreenLED, NoLED, NoLED, NoLED, bladePowerPin5, -1, -1, -1>(),
  171.  
  172. CONFIGARRAY(presets) },
  173. };
  174. #endif
  175.  
  176. #ifdef CONFIG_BUTTONS
  177. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  178. #endif
Advertisement
Add Comment
Please, Sign In to add comment