Advertisement
Sabersense

Detect and ID at Once

Jan 8th, 2024
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.49 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 999000000,1100000000
  21.  
  22. // #define DISABLE_DIAGNOSTIC_COMMANDS
  23. #define DISABLE_BASIC_PARSER_STYLES
  24.  
  25. #define IDLE_OFF_TIME 60 * 10 * 1000
  26. #define MOTION_TIMEOUT 60 * 10 * 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 complete hilt with chassis fully fitted.
  84. Preset blade[] = {
  85.  
  86. { "HiltIn;FontPrem/LS6Cave;common/Luke;common/Function", "tracks/luke_intro.wav",
  87. // Main Blade:
  88. 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>>>>(),
  89.  
  90. // Dummy Blade:
  91. StylePtr<Black>(),
  92.  
  93. // Crystal Chamber:
  94. StylePtr<Black>(),
  95.  
  96. // Plasma Emitter:
  97. StylePtr<Black>(),
  98.  
  99. // Accent Red:
  100. 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>>>>>>(),
  101.  
  102. // Accent Green:
  103. 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>>>>>>(),
  104. "green"},
  105.  
  106.  
  107. // ****************
  108.  
  109.  
  110. { "HiltIn;FontPrem/LS6CaveP;common/Luke;common/Function", "tracks/medley1.wav",
  111. // Main Blade:
  112. 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>>>(),
  113.  
  114. // Dummy Blade:
  115. StylePtr<Black>(),
  116.  
  117. // Crystal Chamber:
  118. StylePtr<Black>(),
  119.  
  120. // Plasma Emitter, Slow Heating Effect:
  121. StylePtr<Black>(),
  122.  
  123. // Accent Red:
  124. 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>>>>>>(),
  125.  
  126. // Accent Green:
  127. 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>>>>>>(),
  128. "green"},
  129.  
  130. };
  131. // ********************************************************
  132. // ********************************************************
  133. // ********************************************************
  134.  
  135. // Blade styles for chassis only.
  136. Preset no_blade[] = {
  137.  
  138.  
  139. { "FontPrem/LS6Cave;common/Luke;common/Function", "tracks/luke_intro.wav",
  140. // Shtok Connector 1:
  141. 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,425>,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"),
  142.  
  143. // Shtok Connector 2:
  144. 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,850>,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"),
  145.  
  146. // Crystal Chamber:
  147. 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>>>>(),
  148.  
  149. // Plasma Emitter:
  150. StylePtr<InOutHelper<SimpleClash<Lockup<BlastFadeout<RandomFlicker<White,Black>,ColorChange<TrInstant,Red,Red,Red,LightYellow,Blue,Blue,Red,Blue,Red,Red,Red,Red>,350>,Strobe<ColorChange<TrInstant,Rgb<200,255,255>,Rgb<200,255,255>,Rgb<200,255,255>,Rgb<200,255,255>,Rgb<200,255,255>,Rgb<200,255,255>,Rgb<200,255,255>,Rgb<200,255,255>,Yellow,Rgb<200,255,255>,Rgb<200,255,255>,Rgb<200,255,255>>,Black,20,16>,Strobe<ColorChange<TrInstant,White,White,White,White,White,White,Red,Rgb<200,255,255>,Red,White,White,White>,Black,20,16>>,Strobe<ColorChange<TrInstant,Yellow,LemonChiffon,Red,Yellow,Yellow,Yellow,Cyan,White,Yellow,Yellow,Yellow,Yellow>,Black,28,25>,260>,800,1000,InOutTrL<TrConcat<TrInstant,Black,TrFade<100>,White,TrFade<400>>,TrConcat<TrInstant,Rgb<50,14,0>,TrFade<2000>,Rgb<25,2,0>,TrFade<4600>>>>>(),
  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<Green,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Green,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>>>>(),
  157. "green"},
  158.  
  159.  
  160. // ****************
  161.  
  162.  
  163. { "FontPrem/LS6CaveP;common/Luke;common/Function", "tracks/medley1.wav",
  164. // Shtok Connector 1:
  165. 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,425>,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"),
  166.  
  167. // Shtok Connector 2:
  168. 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,850>,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"),
  169.  
  170. // Crystal Chamber:
  171. 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>>>(),
  172.  
  173. // Plasma Emitter, Slow Heating Effect:
  174. 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>>>>>>(),
  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<Green,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>,InOutTrL<TrInstant,TrInstant,TransitionLoop<Green,TrConcat<TrBoing<3000,9>,Black,TrDelay<2000>>>>>>(),
  181. "green"},
  182.  
  183. };
  184. // ********************************************************
  185. // ********************************************************
  186. // ********************************************************
  187.  
  188.  
  189. // Blade style for Charge Plug.
  190. Preset charger[] = {
  191.  
  192. { "FontStd2/Charger;common/Random;common/Function", "tracks/trail.wav",
  193. // Full range of colours.
  194. // Main Blade:
  195. ChargingStylePtr<BlackPower>(),
  196.  
  197. // Dummy Blade:
  198. StylePtr<Black>(),
  199.  
  200. // Crystal Chamber:
  201. StylePtr<Black>(),
  202.  
  203. // Plasma Emitter:
  204. StylePtr<Black>(),
  205.  
  206. // Switchbox Red:
  207. StylePtr<Black>(),
  208.  
  209. // Switchbox Green:
  210. StylePtr<InOutHelper<Red,300,800,Blinking<Green,Black,5000,100>>>(),
  211. "charger"},
  212.  
  213. };
  214. // ****************************************************************************
  215.  
  216. BladeConfig blades[] = {
  217. // Chassis Fitted in Hilt:
  218. { 660000.00,
  219. // Main Blade:
  220. WS281XBladePtr<142, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  221. // Dummy Blade:
  222. WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  223. // Crystal Chamber:
  224. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  225. // Plasma Emitter:
  226. SubBlade(1, 1, NULL),
  227. // Accent Red:
  228. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  229. // Accent Green:
  230. SubBlade(1, 1, NULL),
  231. CONFIGARRAY(blade) },
  232.  
  233. // Chassis Loose:
  234. { NO_BLADE,
  235. // Shtok Connector 1:
  236. SubBladeWithStride (0, 14, 2, WS281XBladePtr<16, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >() ),
  237. // Shtok Connector 2:
  238. SubBladeWithStride (1, 15, 2, NULL),
  239. // Crystal Chamber:
  240. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  241. // Plasma Emitter:
  242. SubBlade(1, 1, NULL),
  243. // Accent Red:
  244. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  245. // Accent Green:
  246. SubBlade(1, 1, NULL),
  247. CONFIGARRAY(no_blade) },
  248.  
  249. // Charge Plug:
  250. { 23000.00,
  251. // Main Blade:
  252. WS281XBladePtr<142, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  253. // Dummy Blade:
  254. WS281XBladePtr<1, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3>>(),
  255. // Crystal Chamber:
  256. SubBlade (0, 0, WS281XBladePtr<2, blade2Pin, Color8::RGB, PowerPINS<bladePowerPin2, bladePowerPin3>>()),
  257. // Plasma Emitter:
  258. SubBlade(1, 1, NULL),
  259. // Accent Red:
  260. SubBlade (0, 0, WS281XBladePtr<2, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5>>()),
  261. // Accent Green:
  262. SubBlade(1, 1, NULL),
  263. CONFIGARRAY(charger) },
  264.  
  265. };
  266. #endif
  267.  
  268. #ifdef CONFIG_BUTTONS
  269. Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
  270. Button AuxButton(BUTTON_AUX, auxPin, "aux");
  271. #endif
  272.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement