Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef CONFIG_TOP
- #include "proffieboard_v1_config.h"
- #define NUM_BLADES 2
- #define NUM_BUTTONS 2
- #define VOLUME 2000
- const unsigned int maxLedsPerStrip = 144;
- #define CLASH_THRESHOLD_G 1.0
- #define ENABLE_AUDIO
- #define ENABLE_WS2811
- #define ENABLE_SD
- #define DELAYED_OFF
- #define ENABLE_BLASTER_AUTO
- #define ENABLE_SSD1306
- #define MOTION_TIMEOUT 60 * 15 * 1000
- #define IDLE_OFF_TIME 60 * 10 * 1000
- #endif
- #ifdef CONFIG_PROP
- #include "../props/blaster.h"
- #endif
- #ifdef CONFIG_PRESETS
- Preset presets[] = {
- // Default basic blast color with red audio flicker on blast
- { "trooper;common", "common/tracks/march.wav",
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- "Imperial\nTrooper"},
- {"trooper;common","common/tracks/swars.wav",
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- "Imperial\nTrooper2"
- },
- {"bank2;common","common/tracks/swars.wav",
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- "bank2"},
- {"bank3;common","common/tracks/fates.wav",
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- "bank3"
- },
- {"bank4;common","common/tracks/credits.wav",
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- "bank5"
- },
- {"bank5;common","common/tracks/swars.wav",
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- "bank6"
- },
- {"blstr1;common","common/tracks/fett.wav",
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- "boba\nfett"
- },
- {"blstr1;common","common/tracks/theme.wav",
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- StylePtr<Lockup<BlastFadeout<BlastFadeout<Black,AudioFlicker<Black,Red>,250,EFFECT_FIRE>,AudioFlicker<Black,Blue>,1500,EFFECT_STUN>,AudioFlicker<Black,Red>>>(),
- "boba\nfett"
- },
- };
- template<int milliohms = 1200>
- struct CreeXPE2DRedTemplate {
- static constexpr float MaxAmps = 1.0;
- static constexpr float MaxVolts = 2.5;
- static constexpr float P2Amps = 0.35;
- static constexpr float P2Volts = 2.1;
- static constexpr float R = milliohms / 1000.0;
- static const int Red = 255;
- static const int Green = 0;
- static const int Blue = 0;
- };
- template<int milliohms = 1200>
- struct CreeXPE2DRed2Template {
- static constexpr float MaxAmps = 1.0;
- static constexpr float MaxVolts = 2.5;
- static constexpr float P2Amps = 0.35;
- static constexpr float P2Volts = 2.1;
- static constexpr float R = milliohms / 1000.0;
- static const int Red = 0;
- static const int Green = 255;
- static const int Blue = 0;
- };
- template<int milliohms = 300>
- struct CreeXPE2RBlueTemplate {
- static constexpr float MaxAmps = 1.0;
- static constexpr float MaxVolts = 3.4;
- static constexpr float P2Amps = 0.35;
- static constexpr float P2Volts = 3.1;
- static constexpr float R = milliohms / 1000.0;
- static const int Red = 0;
- static const int Green = 0;
- static const int Blue = 255;
- };
- BladeConfig blades[] = {
- { 0, SimpleBladePtr<CreeXPE2DRedTemplate<1200>, CreeXPE2DRed2Template<1200>,CreeXPE2BlueTemplate<300>, NoLED>(),
- WS2811BladePtr<14, WS2811_800kHz | WS2811_GRB, bladePin, PowerPINS<bladePowerPin6>>(),
- CONFIGARRAY(presets) },
- };
- #endif
- #ifdef CONFIG_BUTTONS
- Button FireButton(BUTTON_FIRE, powerButtonPin, "fire");
- Button ModeButton(BUTTON_MODE_SELECT, auxPin, "modeselect");
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement