Advertisement
Sabersense

Detect and ID Take 4

Jan 12th, 2024
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.91 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 2000
  6. #define BOOT_VOLUME 400
  7. const unsigned int maxLedsPerStrip = 144;
  8. #define CLASH_THRESHOLD_G 3.7
  9. #define ENABLE_AUDIO
  10. #define ENABLE_MOTION
  11. #define ENABLE_WS2811
  12. #define ENABLE_SD
  13.  
  14. #define BLADE_DETECT_PIN 22 // Aux2/Button3 pin
  15. #define BLADE_ID_CLASS BridgedPullupBladeID<bladeIdentifyPin, 9>
  16.  
  17. #define ENABLE_POWER_FOR_ID PowerPINS<bladePowerPin2, bladePowerPin3>
  18. #define BLADE_ID_SCAN_MILLIS 1000
  19. #define BLADE_ID_TIMES 10
  20. #define NO_BLADE_ID_RANGE 500000,800000
  21.  
  22. // #define DISABLE_DIAGNOSTIC_COMMANDS
  23. #define DISABLE_BASIC_PARSER_STYLES
  24.  
  25. #define IDLE_OFF_TIME 15 * 60 * 1000
  26. #define MOTION_TIMEOUT 15 * 60 * 1000
  27.  
  28. #define SAVE_STATE
  29. // #define SAVE_VOLUME
  30. // #define SAVE_PRESET
  31. // #define SAVE_COLOR_CHANGE
  32. #define SHARED_POWER_PINS
  33.  
  34. // #define ENABLE_SPINS
  35. #define NO_REPEAT_RANDOM
  36. // #define KEEP_SAVEFILES_WHEN_PROGRAMMING
  37.  
  38. #define ENABLE_ALL_EDIT_OPTIONS
  39. #define FETT263_EDIT_MODE_MENU
  40. #define FETT263_SAY_COLOR_LIST
  41. #define FETT263_SAY_COLOR_LIST_CC
  42. #define FETT263_MULTI_PHASE
  43. #define FETT263_DUAL_MODE_SOUND
  44. // #define FETT263_QUOTE_PLAYER_START_ON
  45. // #define FETT263_MOTION_WAKE_POWER_BUTTON
  46. // #define FETT263_HOLD_BUTTON_OFF
  47. // #define FETT263_HOLD_BUTTON_LOCKUP
  48.  
  49.  
  50. #endif
  51.  
  52. #ifdef CONFIG_PROP
  53. #include "../props/saber_fett263_buttons.h"
  54. #endif
  55.  
  56.  
  57. // ****************************************************************************
  58. #ifdef CONFIG_STYLES
  59.  
  60. // ------------BLADE ID/BLADE PLUG CHARGING--------------
  61. // Use for BladeID with blade plug charging setup
  62. // to keep FETs powered when charging.
  63. // Use ChargingStylePtr<BlackPower>(), for charging blade style.
  64. class BlackPower {
  65. public:
  66. LayerRunResult run(BladeBase* base) {
  67. return LayerRunResult::UNKNOWN;
  68. }
  69. SimpleColor getColor(int led) {
  70. return SimpleColor(Color16(0,0,0));
  71. }
  72. };
  73.  
  74.  
  75. // -------------BLUETOOTH/MOTOR ON/OFF DEFINES----------
  76. // using ON = Rgb<255,255,255>; // Use StylePtr<ON>(),
  77. // using OFF = Rgb<0,0,0>; // Use StylePtr<OFF>(),
  78. #endif
  79.  
  80. #ifdef CONFIG_PRESETS
  81.  
  82. // ****************************************************************************
  83. // Blade styles for chassis only.
  84. Preset chassis[] = {
  85.  
  86. { "PreCore;FontPrem/LS6Cave;common/Luke;common/Function", "tracks/luke_intro.wav",
  87. // Shtok Connector 1:
  88. StylePtr<Layers<Layers<Blinking<Black,ColorSelect<Sum<Variation,IntArg<STYLE_OPTION_ARG,0>>,TrFade<50>,ColorChange<TrInstant,DeepSkyBlue>,Blue,Cyan,DodgerBlue,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure>,500,500>,InOutTrL<TrWipe<200>,TrWipeInX<WavLen<EFFECT_RETRACTION>>>,TransitionEffectL<TrConcat<TrWipe<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrWipeIn<1000>>,EFFECT_BATTERY_LEVEL>>>>("~ ~ 4"),
  89.  
  90. // Shtok Connector 2:
  91. StylePtr<Layers<Layers<Blinking<ColorSelect<Sum<Variation,IntArg<STYLE_OPTION_ARG,0>>,TrFade<50>,ColorChange<TrInstant,DeepSkyBlue>,Blue,Cyan,DodgerBlue,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure>,Black,500,500>,InOutTrL<TrWipe<200>,TrWipeInX<WavLen<EFFECT_RETRACTION>>>,TransitionEffectL<TrConcat<TrWipe<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrWipeIn<1000>>,EFFECT_BATTERY_LEVEL>>>>("~ ~ 4"),
  92.  
  93. // Crystal Chamber:
  94. StylePtr<Layers<RandomFlicker<ColorChange<TrInstant,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure,DeepSkyBlue,Blue,Cyan,DodgerBlue>,ColorChange<TrInstant,Rgb<0,205,0>,Rgb<22,205,22>,Rgb<205,0,0>,Rgb<205,0,205>,Rgb<205,62,115>,Rgb<205,205,0>,Rgb<205,79,0>,Rgb<178,205,205>,Rgb<0,107,205>,Rgb<0,0,205>,Rgb<0,205,205>,Rgb<0,60,205>>>,TransitionEffectL<TrConcat<TrInstant,BrownNoiseFlickerL<AlphaL<White,Int<16000>>,Int<50>>,TrSmoothFade<600>>,EFFECT_LOCKUP_END>,LockupTrL<Strobe<White,Black,25,28>,TrConcat<TrInstant,White,TrFade<200>>,TrFade<300>,SaberBase::LOCKUP_NORMAL>,LockupTrL<AlphaL<White,LayerFunctions<Bump<Scale<SlowNoise<Int<2000>>,Int<3000>,Int<16000>>,Scale<BrownNoiseF<Int<10>>,Int<14000>,Int<8000>>>,Bump<Scale<SlowNoise<Int<2300>>,Int<26000>,Int<8000>>,Scale<NoisySoundLevel,Int<5000>,Int<10000>>>,Bump<Scale<SlowNoise<Int<2300>>,Int<20000>,Int<30000>>,Scale<IsLessThan<SlowNoise<Int<1500>>,Int<8000>>,Scale<NoisySoundLevel,Int<5000>,Int<0>>,Int<0>>>>>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>,SaberBase::LOCKUP_LIGHTNING_BLOCK>,ResponsiveStabL<Red>,BlastL<White,400>,SimpleClashL<Strobe<Yellow,Black,25,28>,200>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,RandomFlicker<Red,Black>,RandomFlicker<Yellow,Red>>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipe<800>,TrWipeIn<650>,BlackPower>>>(),
  95.  
  96. // Plasma Emitter:
  97. StylePtr<IgnitionDelay<3000,Layers<Rgb<180,20,0>,InOutTrL<TrConcat<TrFade<5000>,Rgb<2,0,0>,TrFade<4000>,Rgb<30,4,0>,TrFade<4000>,Rgb<80,10,0>,TrFade<3000>>,TrConcat<TrFade<1500>,Rgb<80,10,0>,TrFade<2000>,Rgb<40,4,0>,TrFade<2500>,Rgb<5,0,0>,TrFade<3000>>>>>>(),
  98.  
  99. // Accent Red:
  100. StylePtr<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Green,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Green,TrBoing<2000,5>>>>>>(),
  101.  
  102. // Accent Green:
  103. StylePtr<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Green,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Green,TrBoing<2000,5>>>>>>(),
  104. "green"},
  105.  
  106.  
  107. // ****************
  108.  
  109.  
  110. { "PreCore;FontPrem/LS6CaveP;common/Luke;common/Function", "tracks/medley1.wav",
  111. // Shtok Connector 1:
  112. StylePtr<Layers<Layers<Blinking<Black,ColorSelect<Sum<Variation,IntArg<STYLE_OPTION_ARG,0>>,TrFade<50>,ColorChange<TrInstant,DeepSkyBlue>,Blue,Cyan,DodgerBlue,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure>,500,500>,InOutTrL<TrWipe<200>,TrWipeInX<WavLen<EFFECT_RETRACTION>>>,TransitionEffectL<TrConcat<TrWipe<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrWipeIn<1000>>,EFFECT_BATTERY_LEVEL>>>>("~ ~ 4"),
  113.  
  114. // Shtok Connector 2:
  115. StylePtr<Layers<Layers<Blinking<ColorSelect<Sum<Variation,IntArg<STYLE_OPTION_ARG,0>>,TrFade<50>,ColorChange<TrInstant,DeepSkyBlue>,Blue,Cyan,DodgerBlue,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure>,Black,500,500>,InOutTrL<TrWipe<200>,TrWipeInX<WavLen<EFFECT_RETRACTION>>>,TransitionEffectL<TrConcat<TrWipe<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrWipeIn<1000>>,EFFECT_BATTERY_LEVEL>>>>("~ ~ 4"),
  116.  
  117. // Crystal Chamber:
  118. StylePtr<Layers<Layers<ColorChange<TrInstant,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure,DeepSkyBlue,Blue,Cyan,DodgerBlue>,RandomL<ColorChange<TrInstant,Rgb<0,205,0>,Rgb<22,205,22>,Rgb<205,0,0>,Rgb<205,0,205>,Rgb<205,62,115>,Rgb<205,205,0>,Rgb<205,79,0>,Rgb<178,205,205>,Rgb<0,107,205>,Rgb<0,0,205>,Rgb<0,205,205>,Rgb<0,60,205>>>>,TransitionEffectL<TrConcat<TrInstant,BrownNoiseFlickerL<AlphaL<White,Int<16000>>,Int<50>>,TrSmoothFade<600>>,EFFECT_LOCKUP_END>,LockupTrL<Strobe<White,Black,25,28>,TrConcat<TrInstant,White,TrFade<200>>,TrFade<300>,SaberBase::LOCKUP_NORMAL>,LockupTrL<AlphaL<White,LayerFunctions<Bump<Scale<SlowNoise<Int<2000>>,Int<3000>,Int<16000>>,Scale<BrownNoiseF<Int<10>>,Int<14000>,Int<8000>>>,Bump<Scale<SlowNoise<Int<2300>>,Int<26000>,Int<8000>>,Scale<NoisySoundLevel,Int<5000>,Int<10000>>>,Bump<Scale<SlowNoise<Int<2300>>,Int<20000>,Int<30000>>,Scale<IsLessThan<SlowNoise<Int<1500>>,Int<8000>>,Scale<NoisySoundLevel,Int<5000>,Int<0>>,Int<0>>>>>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>,SaberBase::LOCKUP_LIGHTNING_BLOCK>,ResponsiveStabL<Red>,BlastL<White,400>,SimpleClashL<Strobe<Yellow,Black,25,28>,200>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,RandomFlicker<Red,Black>,RandomFlicker<Yellow,Red>>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipe<800>,TrWipeIn<650>>,TransitionEffectL<TrDelay<10000>,EFFECT_PREON>>>(),
  119.  
  120. // Plasma Emitter:
  121. StylePtr<IgnitionDelay<3000,Layers<Rgb<180,20,0>,InOutTrL<TrConcat<TrFade<5000>,Rgb<2,0,0>,TrFade<4000>,Rgb<30,4,0>,TrFade<4000>,Rgb<80,10,0>,TrFade<3000>>,TrConcat<TrFade<1500>,Rgb<80,10,0>,TrFade<2000>,Rgb<40,4,0>,TrFade<2500>,Rgb<5,0,0>,TrFade<3000>>>>>>(),
  122.  
  123. // Accent Red:
  124. StylePtr<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Green,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Green,TrBoing<2000,5>>>>>>(),
  125.  
  126. // Accent Green:
  127. StylePtr<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Green,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Green,TrBoing<2000,5>>>>>>(),
  128. "green"},
  129.  
  130. };
  131. // ********************************************************
  132. // ********************************************************
  133. // ********************************************************
  134.  
  135.  
  136. // Blade styles for complete hilt with chassis fully fitted.
  137. Preset hilt[] = {
  138.  
  139. { "PreHilt;FontPrem/LS6Cave;common/Luke;common/Function", "tracks/luke_intro.wav",
  140. // Main Blade:
  141. StylePtr<Layers<Layers<ColorCycle<ColorSelect<Sum<Variation,IntArg<STYLE_OPTION_ARG,0>>,TrFade<50>,ColorChange<TrInstant,DeepSkyBlue>,Blue,Cyan,DodgerBlue,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure>,0,1,ColorSelect<Sum<Variation,IntArg<STYLE_OPTION_ARG,0>>,TrFade<50>,ColorChange<TrInstant,DeepSkyBlue>,Blue,Cyan,DodgerBlue,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure>,70,1000,6000>,TransitionEffectL<TrConcat<TrWipe<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrWipeIn<1000>>,EFFECT_BATTERY_LEVEL>>>>("~ ~ 4"),
  142.  
  143. // Dummy Blade:
  144. StylePtr<Black>(),
  145.  
  146. // Crystal Chamber:
  147. StylePtr<Black>(),
  148.  
  149. // Plasma Emitter:
  150. StylePtr<Black>(),
  151.  
  152. // Accent Red:
  153. StylePtr<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Red,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Red,TrBoing<2000,5>>>>>>(),
  154.  
  155. // Accent Green:
  156. StylePtr<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Red,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Red,TrBoing<2000,5>>>>>>(),
  157. "green"},
  158.  
  159.  
  160. // ****************
  161.  
  162.  
  163. { "PreHilt;FontPrem/LS6CaveP;common/Luke;common/Function", "tracks/medley1.wav",
  164. // Main Blade:
  165. StylePtr<Layers<Layers<ColorCycle<ColorSelect<Sum<Variation,IntArg<STYLE_OPTION_ARG,0>>,TrFade<50>,ColorChange<TrInstant,DeepSkyBlue>,Blue,Cyan,DodgerBlue,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure>,0,1,ColorSelect<Sum<Variation,IntArg<STYLE_OPTION_ARG,0>>,TrFade<50>,ColorChange<TrInstant,DeepSkyBlue>,Blue,Cyan,DodgerBlue,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure>,70,1000,6000>,TransitionEffectL<TrConcat<TrWipe<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrDelay<2000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-10>>>,TrWipeIn<1000>>,EFFECT_BATTERY_LEVEL>>>>("~ ~ 4"),
  166.  
  167. // Dummy Blade:
  168. StylePtr<Black>(),
  169.  
  170. // Crystal Chamber:
  171. StylePtr<Black>(),
  172.  
  173. // Plasma Emitter:
  174. StylePtr<Black>(),
  175.  
  176. // Accent Red:
  177. StylePtr<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Red,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Red,TrBoing<2000,5>>>>>>(),
  178.  
  179. // Accent Green:
  180. StylePtr<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Red,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Red,TrBoing<2000,5>>>>>>(),
  181. "green"},
  182.  
  183. };
  184. // ********************************************************
  185. // ********************************************************
  186. // ********************************************************
  187.  
  188. // Blade styles for complete hilt with chassis fully fitted plus LGT blade.
  189. Preset lgt_blade[] = {
  190.  
  191. { "PreBlade;FontPrem/LS6Cave;common/Luke;common/Function", "tracks/luke_intro.wav",
  192. // Main Blade:
  193. StylePtr<Layers<RandomFlicker<ColorChange<TrInstant,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure,DeepSkyBlue,Blue,Cyan,DodgerBlue>,ColorChange<TrInstant,Rgb<0,205,0>,Rgb<22,205,22>,Rgb<205,0,0>,Rgb<205,0,205>,Rgb<205,62,115>,Rgb<205,205,0>,Rgb<205,79,0>,Rgb<178,205,205>,Rgb<0,107,205>,Rgb<0,0,205>,Rgb<0,205,205>,Rgb<0,60,205>>>,TransitionEffectL<TrConcat<TrInstant,BrownNoiseFlickerL<AlphaL<White,Int<16000>>,Int<50>>,TrSmoothFade<600>>,EFFECT_LOCKUP_END>,LockupTrL<Strobe<White,Black,25,28>,TrConcat<TrInstant,White,TrFade<200>>,TrFade<300>,SaberBase::LOCKUP_NORMAL>,LockupTrL<AlphaL<White,LayerFunctions<Bump<Scale<SlowNoise<Int<2000>>,Int<3000>,Int<16000>>,Scale<BrownNoiseF<Int<10>>,Int<14000>,Int<8000>>>,Bump<Scale<SlowNoise<Int<2300>>,Int<26000>,Int<8000>>,Scale<NoisySoundLevel,Int<5000>,Int<10000>>>,Bump<Scale<SlowNoise<Int<2300>>,Int<20000>,Int<30000>>,Scale<IsLessThan<SlowNoise<Int<1500>>,Int<8000>>,Scale<NoisySoundLevel,Int<5000>,Int<0>>,Int<0>>>>>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>,SaberBase::LOCKUP_LIGHTNING_BLOCK>,ResponsiveStabL<Red>,BlastL<White,400>,SimpleClashL<Strobe<Yellow,Black,25,28>,200>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,RandomFlicker<Red,Black>,RandomFlicker<Yellow,Red>>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipe<800>,TrWipeIn<650>>>>(),
  194.  
  195. // Dummy Blade:
  196. StylePtr<Black>(),
  197.  
  198. // Crystal Chamber:
  199. StylePtr<Black>(),
  200.  
  201. // Plasma Emitter:
  202. StylePtr<Black>(),
  203.  
  204. // Accent Red:
  205. StylePtr<Blinking<Red,Blue,2500,500>>(),
  206.  
  207. // Accent Green:
  208. StylePtr<Blinking<Blue,Red,2500,500>>(),
  209. "green"},
  210.  
  211.  
  212. // ****************
  213.  
  214.  
  215. { "PreBlade;FontPrem/LS6CaveP;common/Luke;common/Function", "tracks/medley1.wav",
  216. // Main Blade:
  217. StylePtr<Layers<Layers<ColorChange<TrInstant,Green,Rgb<28,255,28>,Red,Magenta,Rgb<255,80,154>,Yellow,Orange,Azure,DeepSkyBlue,Blue,Cyan,DodgerBlue>,RandomL<ColorChange<TrInstant,Rgb<0,205,0>,Rgb<22,205,22>,Rgb<205,0,0>,Rgb<205,0,205>,Rgb<205,62,115>,Rgb<205,205,0>,Rgb<205,79,0>,Rgb<178,205,205>,Rgb<0,107,205>,Rgb<0,0,205>,Rgb<0,205,205>,Rgb<0,60,205>>>>,TransitionEffectL<TrConcat<TrInstant,BrownNoiseFlickerL<AlphaL<White,Int<16000>>,Int<50>>,TrSmoothFade<600>>,EFFECT_LOCKUP_END>,LockupTrL<Strobe<White,Black,25,28>,TrConcat<TrInstant,White,TrFade<200>>,TrFade<300>,SaberBase::LOCKUP_NORMAL>,LockupTrL<AlphaL<White,LayerFunctions<Bump<Scale<SlowNoise<Int<2000>>,Int<3000>,Int<16000>>,Scale<BrownNoiseF<Int<10>>,Int<14000>,Int<8000>>>,Bump<Scale<SlowNoise<Int<2300>>,Int<26000>,Int<8000>>,Scale<NoisySoundLevel,Int<5000>,Int<10000>>>,Bump<Scale<SlowNoise<Int<2300>>,Int<20000>,Int<30000>>,Scale<IsLessThan<SlowNoise<Int<1500>>,Int<8000>>,Scale<NoisySoundLevel,Int<5000>,Int<0>>,Int<0>>>>>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>,SaberBase::LOCKUP_LIGHTNING_BLOCK>,ResponsiveStabL<Red>,BlastL<White,400>,SimpleClashL<Strobe<Yellow,Black,25,28>,200>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,RandomFlicker<Red,Black>,RandomFlicker<Yellow,Red>>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipe<800>,TrWipeIn<650>>,TransitionEffectL<TrDelay<10000>,EFFECT_PREON>>>(),
  218.  
  219. // Dummy Blade:
  220. StylePtr<Black>(),
  221.  
  222. // Crystal Chamber:
  223. StylePtr<Black>(),
  224.  
  225. // Plasma Emitter:
  226. StylePtr<Black>(),
  227.  
  228. // Accent Red:
  229. StylePtr<Blinking<Red,Blue,2500,500>>(),
  230.  
  231. // Accent Green:
  232. StylePtr<Blinking<Blue,Red,2500,500>>(),
  233. "green"},
  234.  
  235. };
  236. // ********************************************************
  237. // ********************************************************
  238. // ********************************************************
  239.  
  240.  
  241.  
  242.  
  243. // Blade style for Charge Plug.
  244. Preset charger[] = {
  245.  
  246. { "FontStd2/Charger;common/Random;common/Function", "tracks/trail.wav",
  247. // Full range of colours.
  248. // Main Blade:
  249. ChargingStylePtr<BlackPower>(),
  250.  
  251. // Dummy Blade:
  252. StylePtr<Black>(),
  253.  
  254. // Crystal Chamber:
  255. StylePtr<Black>(),
  256.  
  257. // Plasma Emitter:
  258. StylePtr<Black>(),
  259.  
  260. // Switchbox Red:
  261. StylePtr<Black>(),
  262.  
  263. // Switchbox Green:
  264. StylePtr<InOutHelper<Red,300,800,Blinking<Green,Black,5000,50>>>(),
  265. "charger"},
  266.  
  267. };
  268. // ****************************************************************************
  269. // Mode 1 - Chassis Loose:
  270. BladeConfig blades[] = {
  271. { NO_BLADE*2,
  272. // Shtok Connector 1:
  273. SubBladeWithStride (0, 14, 2, WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >() ),
  274. // Shtok Connector 2:
  275. SubBladeWithStride (1, 15, 2, NULL),
  276. // Crystal Chamber:
  277. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  278. // Plasma Emitter:
  279. SubBlade(1, 1, NULL),
  280. // Accent Red:
  281. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  282. // Accent Green:
  283. SubBlade(1, 1, NULL),
  284. CONFIGARRAY(chassis) },
  285.  
  286.  
  287. // Mode 2 - Chassis Fitted in Hilt:
  288. { NO_BLADE,
  289. // Main Blade:
  290. WS281XBladePtr<6, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  291. // Dummy Blade:
  292. WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  293. // Crystal Chamber:
  294. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  295. // Plasma Emitter:
  296. SubBlade(1, 1, NULL),
  297. // Accent Red:
  298. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  299. // Accent Green:
  300. SubBlade(1, 1, NULL),
  301. CONFIGARRAY(hilt) },
  302.  
  303.  
  304. // Mode 3a - Chassis Fitted in Hilt with LGT Blade:
  305. { 32000.00,
  306. // Main Blade:
  307. WS281XBladePtr<142, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  308. // Dummy Blade:
  309. WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  310. // Crystal Chamber:
  311. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  312. // Plasma Emitter:
  313. SubBlade(1, 1, NULL),
  314. // Accent Red:
  315. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  316. // Accent Green:
  317. SubBlade(1, 1, NULL),
  318. CONFIGARRAY(lgt_blade) },
  319.  
  320.  
  321. // Mode 4 - Chassis Fitted in Hilt with Charge Plug:
  322. { 22000.00,
  323. // Main Blade:
  324. WS281XBladePtr<142, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  325. // Dummy Blade:
  326. WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  327. // Crystal Chamber:
  328. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  329. // Plasma Emitter:
  330. SubBlade(1, 1, NULL),
  331. // Accent Red:
  332. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  333. // Accent Green:
  334. SubBlade(1, 1, NULL),
  335. CONFIGARRAY(charger) },
  336.  
  337. };
  338. #endif
  339.  
  340.  
  341. #ifdef CONFIG_BUTTONS
  342. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  343. Button AuxButton(BUTTON_AUX, auxPin, "aux");
  344. #endif
  345.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement