Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //BC_DarkShadow_6.x// ProffieOS version 6.x - BC manual update - Native WavLen!
- // Use 1 button config?
- #ifdef CONFIG_TOP
- #include "proffieboard_v3_config.h"
- #define NUM_BLADES 5
- #define NUM_BUTTONS 1
- #define VOLUME 500
- const unsigned int maxLedsPerStrip = 144;
- #define EXTRA_COLOR_BUFFER_SPACE 30 // New define that can speed up processing a bit. Basically, it can calculate the colors for the next blade (or the next frame for the same blade) even though it's not done feeding out the data for the data in the color buffer yet.
- #define CLASH_THRESHOLD_G 3.5
- #define ENABLE_AUDIO
- #define ENABLE_MOTION
- #define ENABLE_WS2811
- #define ENABLE_SD
- #define ENABLE_SERIAL // Bluetooth
- #define SHARED_POWER_PINS
- #define SAVE_STATE
- #define BLADE_DETECT_PIN blade4Pin
- #define BLADE_ID_CLASS SnapshotBladeID<bladeIdentifyPin> // This will make it use the speed-of-charging-a-capacitor method of blade ID which sometimes works without resistors
- #define ENABLE_DEVELOPER_COMMANDS
- #define IDLE_OFF_TIME 60 * 5 * 1000
- #define MOTION_TIMEOUT 60 * 5 * 1000
- #define FEMALE_TALKIE_VOICE // BC now canon
- #define VOLUME_MENU_CYCLE // BC now canon
- #define NO_REPEAT_RANDOM // BC now canon
- // ------- Gesture stuff -------
- // #define BC_SWING_ON // Motion time out causing false ignitions on preset switch. This is annoying but possibly resolved with I2C updates.
- // #define BC_STAB_ON
- #define BC_THRUST_ON
- #define BC_TWIST_ON
- #define BC_TWIST_OFF
- // #define BC_FORCE_PUSH
- // #define BC_FORCE_PUSH_LENGTH 5
- #define ENABLE_SPINS
- // #define GESTURE_AUTO_BATTLE_MODE
- #define BC_LOCKUP_DELAY 200
- #define ENABLE_ALL_EDIT_OPTIONS // Fett263 OS 6
- // #define DYNAMIC_BLADE_LENGTH
- // #define DYNAMIC_BLADE_DIMMING
- // #define DYNAMIC_CLASH_THRESHOLD
- // #define SAVE_VOLUME
- // #define SAVE_BLADE_DIMMING
- // #define SAVE_CLASH_THRESHOLD
- // #define SAVE_COLOR_CHANGE
- #endif
- #ifdef CONFIG_PRESETS
- Preset CTAbladein [] = {
- { "a_DARKSABER/DarkV3;common", "a_DARKSABER/DarkV3/tracks/Mandalorian.wav",
- StylePtr<Layers<
- Mix<SwingSpeed<400>,RotateColorsX<Variation,Rgb<80,100,150>>,RotateColorsX<Variation,Rgb<130,150,225>>>,
- BrownNoiseFlickerL<Stripes<5000,-300,RotateColorsX<Variation,Rgb<15,25,55>>,RotateColorsX<Variation,Rgb<60,75,120>>,RotateColorsX<Variation,Rgb<0,10,20>>,RotateColorsX<Variation,Rgb<40,50,75>>>,Int<38400>>,
- AudioFlickerL<RotateColorsX<Variation,Rgb<25,35,75>>>,
- AlphaL<RotateColorsX<Variation,Rgb<155,175,225>>,SwingSpeed<600>>,
- InOutTrL<TrWipe<300>,TrWipeInX<WavLen<EFFECT_RETRACTION>>>,
- // On-Demand Battery Level
- AlphaL<TransitionEffectL<TrConcat<TrSmoothFade<500>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<Scale<BatteryLevel,Int<0>,Int<35000>>,Int<-1>>>,TrDelay<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-1>>>,TrSmoothFade<1000>>,EFFECT_BATTERY_LEVEL>,Ifon<Int<0>,Int<32768>>>
- >>(),
- // HiltPCB
- StylePtr<Black>(),
- // Switches
- StylePtr<Layers<
- Pulsing<RotateColorsX<Variation,Rgb<100,100,150>>,Black,200>,
- //InOutTrL<TrInstant,TrInstant,Pulsing<RotateColorsX<Variation,Rgb<100,100,150>>,Black,2500>>>>(),
- InOutTrL<TrInstant,TrInstant,ColorSequence<500,Red,Green,Blue,Black>>>>(),
- // Pommel
- StylePtr<Layers<
- Pulsing<Blue,Black,200>,
- InOutTrL<TrInstant,TrInstant,Pulsing<Blue,Black,2500>>>>(),
- // Bluetooth
- StylePtr<Blue>(),
- " dark\n v3"},
- };
- //----------------------------------------------------------------------------------------------------------------------------------------
- Preset noblade[] = {
- // preset 0
- { "a_DARKSABER/DarkV3;common", "",
- // Main Blade
- StylePtr<Black>(),
- // HiltPCB
- StylePtr<Layers<
- Mix<SwingSpeed<400>,RotateColorsX<Variation,Rgb<100,100,150>>,RotateColorsX<Variation,Rgb<150,150,225>>>,
- BrownNoiseFlickerL<Stripes<5000,-300,RotateColorsX<Variation,Rgb<25,25,55>>,RotateColorsX<Variation,Rgb<75,75,120>>,RotateColorsX<Variation,Rgb<10,10,20>>,RotateColorsX<Variation,Rgb<50,50,75>>>,Int<38400>>,
- AudioFlickerL<RotateColorsX<Variation,Rgb<35,35,75>>>,
- AlphaL<RotateColorsX<Variation,Rgb<175,175,225>>,SwingSpeed<600>>,
- InOutTrL<TrWipe<300>,TrWipeIn<500>>,
- // On-Demand Battery Level
- AlphaL<TransitionEffectL<TrConcat<TrSmoothFade<500>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<Scale<BatteryLevel,Int<0>,Int<35000>>,Int<-1>>>,TrDelay<1000>,AlphaL<Mix<BatteryLevel,Red,Green>,SmoothStep<BatteryLevel,Int<-1>>>,TrSmoothFade<1000>>,EFFECT_BATTERY_LEVEL>,Ifon<Int<0>,Int<32768>>>
- >>(),
- // Switches
- StylePtr<Layers<
- Pulsing<RotateColorsX<Variation,Rgb<100,100,150>>,Black,200>,
- InOutTrL<TrInstant,TrInstant,Pulsing<RotateColorsX<Variation,Rgb<100,100,150>>,Black,2500>>>>(),
- // Pommel
- StylePtr<Layers<
- Pulsing<Blue,Black,200>,
- InOutTrL<TrInstant,TrInstant,Pulsing<Blue,Black,2500>>>>(),
- // Bluetooth
- StylePtr<Blue>(),
- " dark\n v3"},
- // preset 1
- { "testfont2a", "testfont2a/tracks/track1.wav",
- // Main Blade
- StylePtr<LengthFinder<>>(),
- // Hilt PCB
- StylePtr<Layers<
- Pulsing<Blue,Black,200>,
- InOutTrL<TrInstant,TrInstant,Pulsing<Blue,Black,2500>>>>(),
- // Switches
- StylePtr<Black>(),
- // Pommel
- StylePtr<Layers<
- Pulsing<Blue,Black,200>,
- InOutTrL<TrInstant,TrInstant,Pulsing<Blue,Black,2500>>>>(),
- // Bluetooth
- StylePtr<Blue>(),
- "testfont2a-preon/out-pstoff/in matching"},
- };
- struct AccentsLED {
- static constexpr float MaxAmps = 0.02;
- static constexpr float MaxVolts = 3.2;
- static constexpr float P2Amps = 0.10;
- static constexpr float P2Volts = 3.0;
- static constexpr float R = 0; // Resistor value
- static const int Red = 0;
- static const int Green = 0;
- static const int Blue = 255;
- };
- BladeConfig blades[] = {
- { 123, // BCA 123, 1" Ciel_Tan_A 132 D1_data_line = proffie_D1---> NPXL ctrpin---> bladePCB 330ohm--->Main blade strips
- WS281XBladePtr<132, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), // Main Blade
- WS281XBladePtr<5, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), // HiltPCB
- WS281XBladePtr<11, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5> >(), // Switches
- SimpleBladePtr<AccentsLED, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(), // Pommel
- SimpleBladePtr<CH3LED, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>(), // Bluetooth
- CONFIGARRAY(CTAbladein),
- "01_bladein_save"},
- { NO_BLADE, // D1_data_line = proffie_D1---> NPXL ctrpin---> bladePCB 330ohm--->Main blade strips
- WS281XBladePtr<132, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), // Main Blade
- WS281XBladePtr<5, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), // HiltPCB
- WS281XBladePtr<11, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin5> >(), // Switches
- SimpleBladePtr<AccentsLED, NoLED, NoLED, NoLED, bladePowerPin1, -1, -1, -1>(), // Pommel
- SimpleBladePtr<CH3LED, NoLED, NoLED, NoLED, bladePowerPin6, -1, -1, -1>(), // Bluetooth
- CONFIGARRAY(noblade),
- "00_NO_BLADE_save"},
- };
- #endif
- #ifdef CONFIG_BUTTONS
- Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
- Button AuxButton(BUTTON_AUX, auxPin, "aux");
- #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement