Advertisement
Guest User

E11 Proffie 1.5 Config

a guest
Jul 29th, 2023
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.22 KB | None | 0 0
  1. #ifdef CONFIG_TOP
  2. #include "proffieboard_v1_config.h"
  3. #define NUM_BLADES 2
  4. #define NUM_BUTTONS 2
  5. #define VOLUME 2000
  6. const unsigned int maxLedsPerStrip = 144;
  7. #define CLASH_THRESHOLD_G 1.0
  8. #define ENABLE_AUDIO
  9. #define ENABLE_WS2811
  10. #define ENABLE_SD
  11. #define DELAYED_OFF
  12. #define ENABLE_BLASTER_AUTO
  13. #define ENABLE_SSD1306
  14. #define MOTION_TIMEOUT 60 * 15 * 1000
  15. #define IDLE_OFF_TIME 60 * 10 * 1000
  16. #endif
  17.  
  18. #ifdef CONFIG_PROP
  19. #include "../props/blaster.h"
  20. #endif
  21.  
  22. #ifdef CONFIG_PRESETS
  23.  
  24. Preset presets[] = {
  25.  
  26. // Default basic blast color with red audio flicker on blast
  27.  
  28. { "trooper;common", "common/tracks/march.wav",
  29.  
  30. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  31.  
  32. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  33. "Imperial\nTrooper"},
  34.  
  35.  
  36.  
  37. {"trooper;common","common/tracks/swars.wav",
  38.  
  39. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  40.  
  41. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  42. "Imperial\nTrooper2"
  43. },
  44.  
  45.  
  46.  
  47. {"bank2;common","common/tracks/swars.wav",
  48. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  49.  
  50. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  51. "bank2"},
  52.  
  53.  
  54.  
  55. {"bank3;common","common/tracks/fates.wav",
  56.  
  57. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  58.  
  59. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  60. "bank3"
  61.  
  62.  
  63. },
  64.  
  65.  
  66.  
  67. {"bank4;common","common/tracks/credits.wav",
  68.  
  69. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  70.  
  71. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  72. "bank5"
  73. },
  74.  
  75.  
  76.  
  77. {"bank5;common","common/tracks/swars.wav",
  78.  
  79. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  80.  
  81. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  82. "bank6"
  83. },
  84.  
  85. {"blstr1;common","common/tracks/fett.wav",
  86.  
  87. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  88.  
  89. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  90. "boba\nfett"
  91.  
  92.  
  93. },
  94.  
  95. {"blstr1;common","common/tracks/theme.wav",
  96.  
  97. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  98.  
  99. StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
  100. "boba\nfett"
  101.  
  102.  
  103. },
  104.  
  105.  
  106.  
  107.  
  108. };
  109.  
  110. template<int milliohms = 1200>
  111.  
  112. struct CreeXPE2DRedTemplate {
  113.  
  114. static constexpr float MaxAmps = 1.0;
  115.  
  116. static constexpr float MaxVolts = 2.5;
  117.  
  118. static constexpr float P2Amps = 0.35;
  119.  
  120. static constexpr float P2Volts = 2.1;
  121.  
  122. static constexpr float R = milliohms / 1000.0;
  123.  
  124. static const int Red = 255;
  125.  
  126. static const int Green = 0;
  127.  
  128. static const int Blue = 0;
  129.  
  130. };
  131.  
  132. template<int milliohms = 1200>
  133.  
  134. struct CreeXPE2DRed2Template {
  135.  
  136. static constexpr float MaxAmps = 1.0;
  137.  
  138. static constexpr float MaxVolts = 2.5;
  139.  
  140. static constexpr float P2Amps = 0.35;
  141.  
  142. static constexpr float P2Volts = 2.1;
  143.  
  144. static constexpr float R = milliohms / 1000.0;
  145.  
  146. static const int Red = 0;
  147.  
  148. static const int Green = 255;
  149.  
  150. static const int Blue = 0;
  151.  
  152. };
  153.  
  154. template<int milliohms = 300>
  155.  
  156. struct CreeXPE2RBlueTemplate {
  157.  
  158. static constexpr float MaxAmps = 1.0;
  159.  
  160. static constexpr float MaxVolts = 3.4;
  161.  
  162. static constexpr float P2Amps = 0.35;
  163.  
  164. static constexpr float P2Volts = 3.1;
  165.  
  166. static constexpr float R = milliohms / 1000.0;
  167.  
  168. static const int Red = 0;
  169.  
  170. static const int Green = 0;
  171.  
  172. static const int Blue = 255;
  173.  
  174. };
  175.  
  176.  
  177.  
  178. BladeConfig blades[] = {
  179.  
  180. { 0, SimpleBladePtr<CreeXPE2DRedTemplate<1200>, CreeXPE2DRed2Template<1200>,CreeXPE2BlueTemplate<300>, NoLED>(),
  181.  
  182. WS2811BladePtr<14, WS2811_800kHz | WS2811_GRB, bladePin, PowerPINS<bladePowerPin6>>(),
  183.  
  184. CONFIGARRAY(presets) },
  185.  
  186. };
  187. #endif
  188.  
  189.  
  190.  
  191. #ifdef CONFIG_BUTTONS
  192. Button FireButton(BUTTON_FIRE, powerButtonPin, "fire");
  193. Button ModeButton(BUTTON_MODE_SELECT, auxPin, "modeselect");
  194. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement