Advertisement
KidsTryThisAtHome

Omen

Apr 1st, 2022
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 19.03 KB | None | 0 0
  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 2.0
  8. #define ENABLE_AUDIO
  9. #define ENABLE_MOTION
  10. #define ENABLE_WS2811
  11. #define ENABLE_SD
  12. #define DISABLE_BASIC_PARSER_STYLES
  13. #define DISABLE_DIAGNOSTIC_COMMANDS
  14. // this disables some diagnostic commands to save memory
  15. //#define ENABLE_DEVELOPER_COMMANDS
  16. #define FETT263_LOCKUP_DELAY 150
  17. #define FETT263_SWING_ON
  18. #define FETT263_THRUST_ON
  19. #define FETT263_TWIST_ON
  20. #define FETT263_TWIST_ON_NO_BM
  21. #define FETT263_TWIST_OFF
  22. //#define FETT263_DUAL_MODE_SOUND
  23. #define ENABLE_SPINS
  24. #define FETT263_FORCE_PUSH
  25. /* #define FETT263_EDIT_MODE_MENU
  26. #define ENABLE_ALL_EDIT_OPTIONS */
  27. #define FETT263_CLASH_STRENGTH_SOUND
  28. //#define FETT263_MAX_CLASH 16
  29. #define FETT263_SAY_COLOR_LIST
  30. #define FETT263_SAY_COLOR_LIST_CC
  31. #define FETT263_SAY_BATTERY_PERCENT
  32. #define FETT263_BM_CLASH_DETECT 8
  33. #define NO_REPEAT_RANDOM
  34. #define IDLE_OFF_TIME 60 * 30 * 1000
  35. #define MOTION_TIMEOUT 60 * 15 * 1000
  36. //#define FETT263_MOTION_WAKE_POWER_BUTTON
  37. #define FETT263_MULTI_PHASE
  38. #define COLOR_CHANGE_DIRECT
  39. #define SAVE_STATE
  40. #define KEEP_SAVEFILES_WHEN_PROGRAMMING
  41. #define BLADE_DETECT_PIN 17
  42. #endif
  43.  
  44. #ifdef CONFIG_PROP
  45. #include "../props/saber_fett263_buttons.h"
  46. #endif
  47.  
  48. #ifdef CONFIG_PRESETS
  49.  
  50. Preset no_blade[] = {
  51.    { "0-NO_BLADE","",
  52.     StylePtr<Black>()
  53.     , },
  54.  
  55.    };
  56.    
  57.    
  58.    Preset blade[] = {
  59.  
  60.    { "OMEN_PROFFIE;common", "common/tracks/mars.wav",
  61.     StylePtr<Layers<
  62.  
  63.   //Magenta AudioFlicker
  64.   AudioFlicker<RotateColorsX<Variation,Rgb<130,0,215>>,RotateColorsX<Variation,Rgb<78,0,131>>>,
  65.  
  66.   //OS6 Unstable Deep Pink Swing
  67.   AlphaL<Stripes<2500,2000,BrownNoiseFlicker<RotateColorsX<Variation,Magenta>,Black,300>,BrownNoiseFlicker<RotateColorsX<Variation,Magenta>,Black,300>,RotateColorsX<Variation,DeepPink>,BrownNoiseFlicker<RotateColorsX<Variation,DeepPink>,Black,300>>,SwingSpeed<365>>,
  68.  
  69.   //OS6 Fett263 Responsive Intensity Lockup Effect with Sizzle Endlock Selection//OS6 Fett263 Responsive Lightning Block
  70.   ResponsiveLightningBlockL<Strobe<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,AudioFlicker<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Blue>,50,1>,TrConcat<TrInstant,AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<RgbArg<LB_COLOR_ARG,Rgb<255,255,255>>,Int<16000>>,30>,TrSmoothFade<600>>>,
  71.  
  72.   //OS6 Deep Pink Noise Responsive Sparking Emitter
  73.   AlphaL<RotateColorsX<Variation,DeepPink>,SmoothStep<Scale<NoisySoundLevel,Int<1500>,Int<7500>>,Int<-4000>>>,
  74.  
  75.   //OS6 Responsive Stab
  76.   ResponsiveStabL<AudioFlickerL<RgbArg<STAB_COLOR_ARG,Red>>,TrWipeInX<Percentage<WavLen<EFFECT_STAB>,50>>,TrFadeX<Percentage<WavLen<EFFECT_STAB>,50>>>,
  77.  
  78.   //OS5 Fett263 Multi-Blast
  79.   EffectSequence<EFFECT_BLAST,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,LocalizedClashL<White,80,30,EFFECT_BLAST>,ResponsiveBlastWaveL<White,Scale<SwingSpeed<400>,Int<500>,Int<200>>,Scale<SwingSpeed<400>,Int<100>,Int<400>>>,BlastL<White,200,200>,ResponsiveBlastFadeL<White,Scale<SwingSpeed<400>,Int<6000>,Int<12000>>,Scale<SwingSpeed<400>,Int<400>,Int<100>>>,ResponsiveBlastL<White,Scale<SwingSpeed<400>,Int<400>,Int<100>>,Scale<SwingSpeed<400>,Int<200>,Int<100>>,Scale<SwingSpeed<400>,Int<400>,Int<200>>>>,
  80.  
  81.   //OS6 Fett263 Real Clash
  82.   Mix<IsLessThan<ClashImpactF<>,Int<26000>>,TransitionEffectL<TrConcat<TrInstant,AlphaL<RgbArg<CLASH_COLOR_ARG,Rgb<255,187,108>>,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<12000>,Int<60000>>>>,TrFadeX<Scale<ClashImpactF<>,Int<200>,Int<400>>>>,EFFECT_CLASH>,TransitionEffectL<TrWaveX<RgbArg<CLASH_COLOR_ARG,Rgb<255,187,108>>,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>>>>,EFFECT_CLASH>>,
  83.  
  84.   //OS6 Erratic Unstable Pink Ignition Effect
  85.   TransitionEffectL<TrConcat<TrInstant,HumpFlicker<BrownNoiseFlicker<RotateColorsX<Variation,DeepPink>,Black,225>,AudioFlicker<RotateColorsX<Variation,Rgb<125,0,205>>,RotateColorsX<Variation,Rgb<53,0,101>>>,35>,TrDelayX<Percentage<WavLen<>,49>>>,EFFECT_IGNITION>,
  86.  
  87.   //OS6 Unstable Purple Ignition Effect
  88.   TransitionEffectL<TrConcat<TrInstant,Stripes<3000,-3500,RotateColorsX<Variation,Rgb<160,60,255>>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<21,0,52>>,Black>,BrownNoiseFlicker<RotateColorsX<Variation,Rgb<160,60,255>>,RotateColorsX<Variation,Rgb<21,0,52>>,200>,RandomPerLEDFlicker<RotateColorsX<Variation,Rgb<42,0,105>>,RotateColorsX<Variation,Rgb<21,0,52>>>>,TrFadeX<Percentage<WavLen<>,49>>>,EFFECT_IGNITION>,
  89.  
  90.   //OS6 Bright Retraction Effect
  91.   TransitionEffectL<TrConcat<TrInstant,HumpFlickerL<RotateColorsX<Variation,Rgb<160,60,255>>,40>,TrFadeX<Percentage<WavLen<>,200>>>,EFFECT_RETRACTION>,
  92.  
  93.   //OS6 Fett263 Intensity Drag
  94.   LockupTrL<AlphaL<RandomPerLEDFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>>,SmoothStep<IntArg<DRAG_SIZE_ARG,27500>,Int<5000>>>,TrConcat<TrExtend<4000,TrWipeIn<200>>,AlphaL<BrownNoiseFlickerL<RgbArg<DRAG_COLOR_ARG,Rgb<255,255,255>>,Int<300>>,SmoothStep<IntArg<DRAG_SIZE_ARG,29250>,Int<5000>>>,TrFade<4000>>,TrFade<300>,SaberBase::LOCKUP_DRAG>,
  95.  
  96.   //OS6 Fett263 Responsive Intensity Melt
  97.   LockupTrL<AlphaL<Remap<Scale<RampF,Int<65536>,Int<0>>,StaticFire<Mix<TwistAngle<>,OrangeRed,DarkOrange>,Mix<TwistAngle<>,OrangeRed,Orange>,0,3,5,3000,10>>,SmoothStep<IntArg<MELT_SIZE_ARG,26000>,Int<6000>>>,TrConcat<TrWipeIn<100>,AlphaL<Red,SmoothStep<Int<29000>,Int<8000>>>,TrExtend<2000,TrFade<300>>,AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<29000>,Int<8000>>>,TrFade<3000>>,TrFade<250>,SaberBase::LOCKUP_MELT>,
  98.  
  99.   //Fett263 Power Save, if using fett263's prop file hold Aux and click PWR while ON (pointing up) to dim blade in 25% increments.
  100.   EffectSequence<EFFECT_POWERSAVE,AlphaL<Black,Int<8192>>,AlphaL<Black,Int<16384>>,AlphaL<Black,Int<24576>>,AlphaL<Black,Int<0>>>,
  101.  
  102.   //OS6 Reversed Ignition/Retraction
  103.   InOutTrL<TrWipeInX<Percentage<WavLen<EFFECT_IGNITION>,4>>,TrWipeX<WavLen<EFFECT_RETRACTION>>>,
  104.  
  105.   //OS6 Noise Responsive Sparky Hilt Retraction
  106.   TransitionEffectL<TrConcat<TrInstant,AlphaL<BrownNoiseFlicker<Black,RotateColorsX<Variation,Rgb<125,0,205>>,150>,SmoothStep<Scale<NoisySoundLevel,Int<-1500>,Int<20000>>,Int<-4000>>>,TrFadeX<WavLen<EFFECT_POSTOFF>>>,EFFECT_RETRACTION>,
  107.  
  108.   //OS6 Spark-In Retraction
  109.   TransitionEffectL<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,Rgb<125,0,205>>,Bump<Scale<Trigger<EFFECT_POSTOFF,Int<0>,Int<0>,Percentage<WavLen<EFFECT_POSTOFF>,4>>,Int<0>,Int<32768>>,Int<15000>>>,TrFadeX<Percentage<WavLen<EFFECT_POSTOFF>,15>>>,EFFECT_RETRACTION>,
  110.  
  111.   //Fett263 On-Demand Battery Level, if using fett263's prop file Hold AUX and click PWR while OFF, the battery level is represented by the location on the blade; tip = full, hilt = low and color; green = full, yellow = half, red = low
  112.   TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<BatteryLevel,Int<10000>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<BatteryLevel,Int<10000>>>,TrFade<1000>>,EFFECT_BATTERY_LEVEL>,
  113.  
  114.   //Optional/alternate Fett263 Passive Battery Monitor (fett263 prop file not required), on boot (1st line) or font change (2nd line) you will get a visual indicator at the emitter of your current battery level. This also works without a blade if you have a lit emitter or blade plug. Green is Full, Red is Low (the color will blend from Green to Red as the battery is depleted), the indicator will fade out after 3000 ms and not display again until powered down and back up or fonts change.  
  115.   //TransitionEffectL<TrConcat<TrDelay<1500>,Black,TrFade<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<Int<0>,Int<6000>>>,TrFade<3000>>,EFFECT_BOOT>,
  116.   //TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<BatteryLevel,Red,Green>,Bump<Int<0>,Int<6000>>>,TrFade<3000>>,EFFECT_NEWFONT>,
  117.    
  118.   //OS6 Noise Responsive Charge-Up Preon
  119.   TransitionEffectL<TrConcat<TrInstant,AlphaL<Mix<Trigger<EFFECT_PREON,Percentage<WavLen<>,110>,Percentage<WavLen<>,50>,Percentage<WavLen<>,50>>,BrownNoiseFlicker<Black,RotateColorsX<Variation,Rgb<125,0,205>>,100>,RandomPerLEDFlicker<RotateColorsX<Variation,Magenta>,RotateColorsX<Variation,Rgb16<14386,0,14386>>>,StyleFire<Gradient<RotateColorsX<Variation,Rgb<125,0,205>>,RotateColorsX<Variation,Magenta>,RotateColorsX<Variation,DeepPink>,RotateColorsX<Variation,DeepPink>>,RotateColorsX<Variation,Rgb<60,0,100>>,0,2,FireConfig<0,2000,5>,FireConfig<0,2000,5>,FireConfig<0,2000,5>,FireConfig<0,2000,5>>>,SmoothStep<Scale<NoisySoundLevel,Int<-1000>,Int<20000>>,Int<-4000>>>,TrDelayX<Percentage<WavLen<>,110>>>,EFFECT_PREON>,
  120.  
  121.   //OS6 Spark-Out Preon
  122.   TransitionEffectL<TrConcat<TrInstant,AlphaL<RotateColorsX<Variation,Rgb<125,0,205>>,Bump<Scale<Trigger<EFFECT_PREON,WavLen<>,Percentage<WavLen<>,50>,Percentage<WavLen<>,50>>,Int<0>,Int<33768>>,Int<8000>>>,TrDelayX<WavLen<>>>,EFFECT_PREON>
  123.  
  124.   >>(),  "omen"},
  125.    
  126. };
  127.  
  128. BladeConfig blades[] = {
  129.  { 0, WS281XBladePtr<133, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()
  130.   , CONFIGARRAY(blade) },
  131.  
  132.  { NO_BLADE, WS281XBladePtr<133, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >()
  133.   , CONFIGARRAY(no_blade) },
  134.  
  135. };
  136. #endif
  137.  
  138. #ifdef CONFIG_BUTTONS
  139. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  140. Button AuxButton(BUTTON_AUX, auxPin, "aux");
  141. #endif
  142.  
  143.  
  144.  
  145.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement