Advertisement
Sabersense

Detect and ID Take 3

Jan 11th, 2024 (edited)
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.73 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 990000000,1100000000
  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 no_blade[] = {
  85.  
  86. { "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<Green,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Green,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>>>>(),
  104. "green"},
  105.  
  106.  
  107. // ****************
  108.  
  109.  
  110. { "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<Green,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Green,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>>>>(),
  128. "green"},
  129.  
  130. };
  131. // ********************************************************
  132. // ********************************************************
  133. // ********************************************************
  134.  
  135.  
  136. // Blade styles for complete hilt with chassis fully fitted.
  137. Preset hilt[] = {
  138.  
  139. { "IDHilt;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<Red,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Red,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>>>>(),
  157. "green"},
  158.  
  159.  
  160. // ****************
  161.  
  162.  
  163. { "IDHilt;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<Red,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Red,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>>>>(),
  181. "green"},
  182.  
  183. };
  184. // ********************************************************
  185. // ********************************************************
  186. // ********************************************************
  187.  
  188. // Blade styles for complete hilt with chassis fully fitted plus KR blade.
  189. Preset lgt_blade[] = {
  190.  
  191. { "IDBlade;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<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Rgb<170,170,170>,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Rgb<170,170,170>,TrBoing<2000,5>>>>>>(),
  206.  
  207. // Accent Green:
  208. StylePtr<Layers<TransitionLoop<Rgb<170,170,170>,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Rgb<170,170,170>,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>>>>(),
  209. "green"},
  210.  
  211.  
  212. // ****************
  213.  
  214.  
  215. { "IDBlade;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<Layers<TransitionLoop<Black,TrConcat<TrDelay<3000>,Rgb<170,170,170>,TrBoing<2000,5>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Black,TrConcat<TrDelay<3000>,Rgb<170,170,170>,TrBoing<2000,5>>>>>>(),
  230.  
  231. // Accent Green:
  232. StylePtr<Layers<TransitionLoop<Rgb<170,170,170>,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Rgb<170,170,170>,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>>>>(),
  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. // ****************************************************************************
  270. // ****************************************************************************
  271. // Mode 1 - Chassis Loose:
  272. BladeConfig blades[] = {
  273. { NO_BLADE,
  274. // Shtok Connector 1:
  275. SubBladeWithStride (0, 14, 2, WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >() ),
  276. // Shtok Connector 2:
  277. SubBladeWithStride (1, 15, 2, NULL),
  278. // Crystal Chamber:
  279. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  280. // Plasma Emitter:
  281. SubBlade(1, 1, NULL),
  282. // Accent Red:
  283. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  284. // Accent Green:
  285. SubBlade(1, 1, NULL),
  286. CONFIGARRAY(no_blade) },
  287.  
  288.  
  289. // Mode 2 - Chassis Fitted in Hilt:
  290. { 636000,
  291. // { NO_BLADE*2,
  292. // Main Blade:
  293. WS281XBladePtr<6, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  294. // Dummy Blade:
  295. WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  296. // Crystal Chamber:
  297. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  298. // Plasma Emitter:
  299. SubBlade(1, 1, NULL),
  300. // Accent Red:
  301. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  302. // Accent Green:
  303. SubBlade(1, 1, NULL),
  304. CONFIGARRAY(hilt) },
  305.  
  306.  
  307. // Mode 3 - Chassis Fitted in Hilt with LGT Blade:
  308. { 32700,
  309. // Main Blade:
  310. WS281XBladePtr<142, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  311. // Dummy Blade:
  312. WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  313. // Crystal Chamber:
  314. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  315. // Plasma Emitter:
  316. SubBlade(1, 1, NULL),
  317. // Accent Red:
  318. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  319. // Accent Green:
  320. SubBlade(1, 1, NULL),
  321. CONFIGARRAY(lgt_blade) },
  322.  
  323.  
  324. // Mode 4 - Chassis Fitted in Hilt with Charge Plug:
  325. { 22000,
  326. // Main Blade:
  327. WS281XBladePtr<142, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  328. // Dummy Blade:
  329. WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  330. // Crystal Chamber:
  331. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  332. // Plasma Emitter:
  333. SubBlade(1, 1, NULL),
  334. // Accent Red:
  335. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  336. // Accent Green:
  337. SubBlade(1, 1, NULL),
  338. CONFIGARRAY(charger) },
  339.  
  340. };
  341. #endif
  342.  
  343.  
  344. #ifdef CONFIG_BUTTONS
  345. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  346. Button AuxButton(BUTTON_AUX, auxPin, "aux");
  347. #endif
  348.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement