Advertisement
Guest User

Untitled

a guest
Mar 27th, 2022
31
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #ifdef CONFIG_TOP
  2. #include "proffieboard_v2_config.h"
  3. #define NUM_BLADES 1
  4. #define NUM_BUTTONS 2
  5. #define VOLUME 1750
  6. const unsigned int maxLedsPerStrip = 144;
  7. #define CLASH_THRESHOLD_G 3.4
  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. #define IDLE_OFF_TIME 60*2*1000
  15. #define MOTION_TIMEOUT 60*10*1000
  16. #define SHARED_POWER_PINS
  17. #define DISABLE_DIAGNOSTIC_COMMANDS
  18. #define BLADE_DETECT_PIN 17
  19. #define SAVE_PRESET
  20. #define NO_REPEAT_RANDOM
  21. #define KEEP_SAVEFILES_WHEN_PROGRAMMING
  22. #define FETT263_SAY_COLOR_LIST
  23. #define FETT263_SAY_COLOR_LIST_CC
  24. #define ENABLE_ALL_EDIT_OPTIONS
  25. #define FETT263_EDIT_MODE_MENU
  26. #define DISABLE_BASIC_PARSER_STYLES
  27. #define FETT263_SAY_BATTERY_PERCENT
  28. #define FETT263_MULTI_PHASE
  29. #define FETT263_HOLD_BUTTON_OFF
  30. #define FETT263_HOLD_BUTTON_LOCKUP
  31. #define FETT263_TWIST_OFF
  32. #define FETT263_TWIST_ON
  33. #define FETT263_TWIST_ON_NO_BM
  34. #define FETT263_STAB_ON
  35. #define FETT263_STAB_ON_NO_BM
  36. #define FETT263_THRUST_ON
  37. #define FETT263_THRUST_ON_NO_BM
  38. #endif
  39.  
  40. #ifdef CONFIG_PROP
  41. #include "../props/saber_fett263_buttons.h"
  42. #endif
  43.  
  44. #ifdef CONFIG_PRESETS
  45.  
  46. Preset no_blade[] = {
  47. { "0-NO_BLADE;common","",
  48. StylePtr<Black>()},
  49.  
  50. };
  51.  
  52. Preset blade[] = {
  53.  
  54. { "SHOCK_BATON;common", "tracks/impmarch.wav",
  55. /* copyright Fett263 ComboBuilder (Primary Blade) OS6 Style
  56. https://fett263.com/fett263-proffieOS6-style-library.html#ComboBuilder
  57. OS6.6 v3.05
  58. This Style Contains 15552 Unique Combinations
  59. Style Options:
  60. Default (0): Shock Baton
  61. 1: ElectroStaff
  62. 2: Fallen Order Cal Kestis
  63.  
  64.  
  65. --Effects Included--
  66. Preon Effect Options: Default (0): Polar Spark (PreOn Color), 1: Disable, 2: Pulsing (PreOn Color)
  67. Ignition Effect Options: Default (0): Center In, 1: Standard Ignition, 2: Lightning Strike, 3: Cycle Up
  68. PowerUp Effect Options: Default (0): Disable, 1: Power Flash, 2: Power Surge (Unstable V1)
  69. Retraction Effect Options: Default (0): Center In, 1: Standard Retraction, 2: Run Up, 3: Cycle Down
  70. CoolDown Effect Options: Default (0): Disable, 1: Unstable Cool Down Reverse, 2: Power Burst Reverse, 3: Power Flash
  71. PostOff Effect Options: Default (0): Disable, 1: Emitter Spark (Emitter Size), 2: Emitter Glow (Emitter Size)
  72. Lockup Effect: Intensity Lockup V1, Begin Effect: Real Clash, End Effect: Full Blade Absorb
  73. LightningBlock Effect: Responsive Lightning Block
  74. Drag Effect: Intensity Sparking Drag
  75. Melt Effect: Intensity Melt
  76. Stab Effect: Normal Stab
  77. Blast Effect (Randomly Selected): Responsive Blast Wave (Random), Responsive Blast Ripple Fade
  78. Clash Effect: Real Clash V3
  79. Swing Effect Options: Default (0): Disable, 1: Bright Swing (Scaled Full Blade), 2: Unstable Swing (Scaled Full Blade)
  80. Battery Level: % Blade (Green to Red)
  81. */
  82. StylePtr<Layers<ColorSelect<IntArg<STYLE_OPTION_ARG,0>,TrInstant,BrownNoiseFlicker<BrownNoiseFlicker<RgbArg<BASE_COLOR_ARG,Rgb<80,50,210>>,Black,300>,Stripes<3000,-4000,Rgb<50,50,75>,Rgb<100,100,150>,Rgb<10,10,15>,Rgb<150,150,225>>,200>,StaticFire<Strobe<RgbArg<BASE_COLOR_ARG,Rgb<80,50,210>>,Strobe<Rgb<100,100,150>,RandomPerLEDFlicker<RgbArg<BASE_COLOR_ARG,Rgb<80,50,210>>,Black>,50,1>,100,1>,Mix<Int<6425>,Black,RgbArg<BASE_COLOR_ARG,Rgb<80,50,210>>>,0,5,2,1000,5>,Stripes<16000,-1000,RgbArg<BASE_COLOR_ARG,Rgb<80,50,210>>,Pulsing<Mix<Int<11565>,Black,RgbArg<BASE_COLOR_ARG,Rgb<80,50,210>>>,RgbArg<BASE_COLOR_ARG,Rgb<80,50,210>>,800>,RgbArg<BASE_COLOR_ARG,Rgb<80,50,210>>>>,ColorSelect<IntArg<SWING_OPTION_ARG,0>,TrInstant,AlphaL<Black,Int<0>>,AlphaL<RgbArg<SWING_COLOR_ARG,Rgb<191,255,255>>,Scale<IsLessThan<SwingSpeed<600>,Int<13600>>,Scale<SwingSpeed<600>,Int<-19300>,Int<32768>>,Int<0>>>,AlphaL<Stripes<2000,-3000,RgbArg<SWING_COLOR_ARG,Rgb<191,255,255>>,RandomPerLEDFlicker<RgbArg<SWING_COLOR_ARG,Rgb<191,255,255>>,Mix<Int<8192>,Black,RgbArg<SWING_COLOR_ARG,Rgb<191,255,255>>>>,RandomPerLEDFlicker<Mix<Int<3932>,Black,RgbArg<SWING_COLOR_ARG,Rgb<191,255,255>>>,RgbArg<SWING_COLOR_ARG,Rgb<191,255,255>>>>,Scale<IsLessThan<SwingSpeed<600>,Int<13600>>,Scale<SwingSpeed<600>,Int<-19300>,Int<32768>>,Int<0>>>>,TransitionEffectL<TrSelect<IntArg<IGNITION_POWER_UP_ARG,0>,TrInstant,TrConcat<TrJoin<TrDelayX<IgnitionTime<300>>,TrInstant>,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>,TrFade<1000>>,TrConcat<TrInstant,Stripes<3000,-3500,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>,RandomPerLEDFlicker<Mix<Int<7710>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>>,Black>,BrownNoiseFlicker<RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<7710>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>>,200>,RandomPerLEDFlicker<Mix<Int<16384>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>>,Mix<Int<7710>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>>>>,TrFade<1200>>>,EFFECT_IGNITION>,TransitionEffectL<TrSelect<IntArg<RETRACTION_COOL_DOWN_ARG,0>,TrInstant,TrConcat<TrJoin<TrDelayX<RetractionTime<0>>,TrInstant>,Stripes<3000,3500,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>,RandomPerLEDFlicker<Mix<Int<7710>,Black,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>>,Black>,BrownNoiseFlicker<RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<3855>,Black,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>>,200>,RandomPerLEDFlicker<Mix<Int<3137>,Black,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>>,Mix<Int<3855>,Black,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>>>>,TrFade<800>>,TrConcat<TrJoin<TrDelayX<RetractionTime<0>>,TrInstant>,Stripes<5000,2500,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>,Mix<Int<7710>,Black,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>>,Mix<Int<3855>,Black,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>>>,TrFade<800>>,TrConcat<TrJoin<TrDelayX<RetractionTime<0>>,TrInstant>,RgbArg<RETRACTION_COLOR_ARG,Rgb<255,255,255>>,TrFade<1000>>>,EFFECT_RETRACTION>,TransitionEffectL<TrConcat<TrJoin<TrDelayX<WavLen<>>,TrWipeIn<200>>,AlphaL<RgbArg<STAB_COLOR_ARG,Rgb<255,14,0>>,SmoothStep<IntArg<MELT_SIZE_ARG,27654>,Int<2000>>>,TrWipe<200>>,EFFECT_STAB>,MultiTransitionEffectL<TrRandom<TrWaveX<RgbArg<BLAST_COLOR_ARG,Rgb<191,255,255>>,Scale<EffectRandomF<EFFECT_BLAST>,Int<100>,Int<400>>,Int<100>,Scale<EffectRandomF<EFFECT_BLAST>,Int<100>,Int<400>>,Scale<BladeAngle<>,Int<28000>,Int<8000>>>,TrConcat<TrInstant,AlphaL<RgbArg<BLAST_COLOR_ARG,Rgb<191,255,255>>,Bump<Scale<BladeAngle<>,Int<3000>,Int<29000>>,Int<6000>>>,TrCenterWipeX<Int<100>,Scale<BladeAngle<>,Int<3000>,Int<29000>>>,AlphaL<Remap<CenterDistF<Scale<BladeAngle<>,Int<3000>,Int<29000>>>,Stripes<1600,-2000,RgbArg<BLAST_COLOR_ARG,Rgb<191,255,255>>,Mix<Int<2096>,Black,RgbArg<BLAST_COLOR_ARG,Rgb<191,255,255>>>>>,Bump<Scale<BladeAngle<>,Int<3000>,Int<29000>>,Int<32000>>>,TrJoin<TrSmoothFade<50>,TrCenterWipeX<Int<100>,Scale<BladeAngle<>,Int<3000>,Int<29000>>>>>>,EFFECT_BLAST>,AlphaL<TransitionEffectL<TrSelect<Scale<ClashImpactF<>,Int<0>,Int<4>>,TrConcat<TrInstant,AlphaL<RgbArg<CLASH_COLOR_ARG,Rgb<191,255,255>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Scale<ClashImpactF<>,Int<8000>,Int<12000>>>>,TrFadeX<Scale<ClashImpactF<>,Int<200>,Int<600>>>>,TrWaveX<RgbArg<CLASH_COLOR_ARG,Rgb<191,255,255>>,Scale<ClashImpactF<>,Int<100>,Int<400>>,Int<100>,Scale<ClashImpactF<>,Int<100>,Int<400>>,Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>>,TrSparkX<Remap<CenterDistF<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>>,Stripes<1500,-3000,RgbArg<CLASH_COLOR_ARG,Rgb<191,255,255>>,Mix<Int<16384>,Black,RgbArg<CLASH_COLOR_ARG,Rgb<191,255,255>>>>>,Int<100>,Scale<ClashImpactF<>,Int<100>,Int<400>>,Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>>,TrConcat<TrInstant,RgbArg<CLASH_COLOR_ARG,Rgb<191,255,255>>,TrFadeX<Scale<ClashImpactF<>,Int<200>,Int<400>>>>,TrConcat<TrInstant,RgbArg<CLASH_COLOR_ARG,Rgb<191,255,255>>,TrFadeX<Scale<ClashImpactF<>,Int<300>,Int<500>>>>>,EFFECT_CLASH>,Scale<ClashImpactF<>,Int<24000>,Int<32768>>>,LockupTrL<TransitionEffect<AlphaMixL<Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>,BrownNoiseFlickerL<RgbArg<LOCKUP_COLOR_ARG,Rgb<191,255,255>>,Int<200>>,StripesX<Int<1800>,Scale<NoisySoundLevel,Int<-3500>,Int<-5000>>,Mix<Int<6425>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<191,255,255>>>,RgbArg<LOCKUP_COLOR_ARG,Rgb<191,255,255>>,Mix<Int<12850>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<191,255,255>>>>>,AlphaL<AudioFlicker<RgbArg<LOCKUP_COLOR_ARG,Rgb<191,255,255>>,Mix<Int<10280>,Black,RgbArg<LOCKUP_COLOR_ARG,Rgb<191,255,255>>>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Int<13000>>>,TrJoin<TrDelay<8000>,TrInstant>,TrFade<3000>,EFFECT_LOCKUP_BEGIN>,TrConcat<TrJoin<TrDelay<50>,TrInstant>,Mix<IsLessThan<ClashImpactF<>,Int<26000>>,RgbArg<LOCKUP_COLOR_ARG,Rgb<191,255,255>>,AlphaL<RgbArg<LOCKUP_COLOR_ARG,Rgb<191,255,255>>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-12000>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<10000>>>,Sum<IntArg<LOCKUP_POSITION_ARG,16000>,Int<-10000>>>,Scale<ClashImpactF<>,Int<20000>,Int<60000>>>>>,TrFade<300>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Rgb<191,255,255>>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<RgbArg<LB_COLOR_ARG,Rgb<191,255,255>>,AudioFlicker<RgbArg<LB_COLOR_ARG,Rgb<191,255,255>>,Blue>,50,1>,TrConcat<TrInstant,AlphaL<RgbArg<LB_COLOR_ARG,Rgb<191,255,255>>,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<RgbArg<LB_COLOR_ARG,Rgb<191,255,255>>,Int<16000>>,30>,TrSmoothFade<600>>>,LockupTrL<AlphaL<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,29368>,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,29368>,Int<3000>>>,TrFade<4000>>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Remap<Scale<RampF,Int<65536>,Int<0>>,StaticFire<Mix<TwistAngle<>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>,Mix<TwistAngle<>,RotateColorsX<Int<3000>,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>,RotateColorsX<Int<3000>,Mix<Int<12000>,Black,RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>>>>,0,3,5,3000,10>>,SmoothStep<IntArg<MELT_SIZE_ARG,27654>,Int<4000>>>,TrConcat<TrWipeIn<100>,AlphaL<RgbArg<STAB_COLOR_ARG,Rgb<255,24,0>>,SmoothStep<IntArg<MELT_SIZE_ARG,27654>,Int<4000>>>,TrJoin<TrDelay<4000>,TrFade<300>>,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,27654>,Int<4000>>>,TrFade<4000>>,TrWipe<200>,SaberBase::LOCKUP_MELT>,InOutTrL<TrSelect<IntArg<IGNITION_OPTION_ARG,0>,TrCenterWipeInX<IgnitionTime<300>,Int<16384>>,TrWipeX<IgnitionTime<300>>,TrConcat<TrWipeInX<Mult<IgnitionTime<300>,Int<6553>>>,RandomBlink<30000,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>,Black>,TrJoin<TrDelayX<Mult<IgnitionTime<300>,Int<19660>>>,TrWipeInX<Mult<IgnitionTime<230>,Int<6553>>>>,Mix<SmoothStep<Scale<SlowNoise<Int<30000>>,IntArg<EMITTER_SIZE_ARG,1000>,Sum<Int<5000>,IntArg<EMITTER_SIZE_ARG,1000>>>,Int<-3000>>,Black,RgbArg<IGNITION_COLOR_ARG,Rgb<255,255,255>>>,TrWipeX<Mult<IgnitionTime<300>,Int<19660>>>>,TrColorCycleX<IgnitionTime<300>>>,TrSelect<IntArg<RETRACTION_OPTION_ARG,0>,TrCenterWipeInX<RetractionTime<0>,Int<16384>>,TrWipeInX<RetractionTime<0>>,TrWipeX<RetractionTime<0>>,TrColorCycleX<RetractionTime<0>>>,Black>,TransitionEffectL<TrSelect<IntArg<PREON_OPTION_ARG,0>,TrConcat<TrInstant,AlphaL<BrownNoiseFlicker<RgbArg<PREON_COLOR_ARG,Rgb<255,255,255>>,Rgb<100,100,150>,300>,LayerFunctions<SmoothStep<IntArg<PREON_SIZE_ARG,182>,Int<-4000>>,SmoothStep<Int<30768>,Int<4000>>>>,TrDelayX<WavLen<>>>,TrInstant,TrConcat<TrFadeX<Mult<Int<4096>,WavLen<EFFECT_PREON>>>,AlphaL<PulsingL<RgbArg<PREON_COLOR_ARG,Rgb<255,255,255>>,Int<800>>,SmoothStep<IntArg<PREON_SIZE_ARG,182>,Int<-4000>>>,TrDelayX<Mult<Int<28672>,WavLen<EFFECT_PREON>>>>>,EFFECT_PREON>,TransitionEffectL<TrSelect<IntArg<OFF_OPTION_ARG,0>,TrInstant,TrConcat<TrJoin<TrDelayX<RetractionTime<0>>,TrInstant>,AlphaL<BrownNoiseFlickerL<RgbArg<POSTOFF_COLOR_ARG,Rgb<255,255,255>>,Int<30>>,SmoothStep<Scale<SlowNoise<Int<2000>>,IntArg<EMITTER_SIZE_ARG,2000>,Sum<IntArg<EMITTER_SIZE_ARG,2000>,Int<3000>>>,Int<-4000>>>,TrDelayX<Scale<IsLessThan<WavLen<EFFECT_POSTOFF>,Int<200>>,WavLen<EFFECT_POSTOFF>,Int<4000>>>>,TrConcat<TrDelayX<RetractionTime<0>>,AlphaL<White,Int<0>>,TrJoin<TrDelay<1000>,TrInstant>,AlphaL<RgbArg<POSTOFF_COLOR_ARG,Rgb<255,255,255>>,SmoothStep<IntArg<EMITTER_SIZE_ARG,2000>,Int<-2000>>>,TrSmoothFadeX<Scale<IsLessThan<WavLen<EFFECT_POSTOFF>,Int<200>>,WavLen<EFFECT_POSTOFF>,Int<4000>>>>>,EFFECT_RETRACTION>,TransitionEffectL<TrConcat<TrJoin<TrDelay<2000>,TrWipe<1000>>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrWipeIn<1000>>,EFFECT_BATTERY_LEVEL>>>(),
  83. "shock baton"
  84. },
  85.  
  86. };
  87.  
  88. BladeConfig blades[] = {
  89. { 0, WS281XBladePtr<115, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
  90. CONFIGARRAY(blade) },
  91.  
  92. { NO_BLADE, WS281XBladePtr<115, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
  93. CONFIGARRAY(no_blade) },
  94. };
  95. #endif
  96.  
  97. #ifdef CONFIG_BUTTONS
  98. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  99. Button AuxButton(BUTTON_AUX, auxPin, "aux");
  100. #endif
Advertisement
RAW Paste Data Copied
Advertisement