Blade ignition timing

Hey all… a little help. Can anyone tell me where in the ProffieOS code do I adjust the ignition on/off timing? I thought at one point I had figured it out, but no. The time between hitting the on/off button the actual time the blade goes on/off is too tong for my taste and want to take it down a bit.

Thanks in advance for your help!

Depends entirely on OS version and specific style.

The ignition time should be instant, generally speaking, unless you have IgnitionDelay<> in the blade style, a preon sound, or some odd button setting.
The off time is dependent on the prop file. Whatever duration you have set for the button, (HELD_MEDIUM, HELD_LONG etc…) and what that duration’s timing is set to is what it’s going to do.

What exactly are you experiencing?

Hey NoSloppy…

I had to go back to a vid I made to check… I thought it was both the on and off, but it looks like it’s just during the shut off. Pretty much, I press and hold the button and it takes about 3 seconds before the blade retracts. Turning it on it’s pretty much instant ignition, also the blade extension/retraction is a bit slow as well.

The hold-to-retract time is controlled by the prop. What prop are you using in your config file?
The extend/retract time is controlled by the style, which may in turn delegate it to the font by using WavLen<> or something, what style are you using in your config file?

Please post your config file, and we’ll be able to provide more specific advice.

Hey Profezzorn…

Here is my config:

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 1
#define NUM_BUTTONS 1
#define VOLUME 1400
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 3.0
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#endif

#ifdef  CONFIG_PROP
#include "../props/saber_sa22c_buttons.h"
#endif


#ifdef CONFIG_PRESETS
Preset presets[] = {
   { "TeensySF", "tracks/venus.wav",
   StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Green>,RotateColorsX<Variation,Rgb<0,200,0>>>,AlphaL<NavajoWhite,SwingSpeed<600>>,LockupTrL<Layers<AlphaL<AudioFlickerL<White>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<White,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Int<10000>>>>,TrConcat<TrInstant,White,TrFade<400>>,TrConcat<TrInstant,White,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,ResponsiveStabL<Red,TrWipeIn<600>,TrWipe<600>>,ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>,Int<400>>,SimpleClashL<White>,LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,InOutTrL<TrWipe<300>,TrWipeIn<500>,Black>>>(), "cyan"},
   
};
BladeConfig blades[] = {
 { 0, WS281XBladePtr<86, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(), CONFIGARRAY(presets) },
};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
#endif

Thank you

You can add the following define to change the hold time for power off:

#define BUTTON_HELD_LONG_TIMEOUT 1500

If you want to make it shorter than 1000 you might need to change the medium time as well:

#define BUTTON_HELD_MEDIUM_TIMEOUT 1000

As for the extension and retraction times, you can find them at the end of your style:

InOutTrL<TrWipe<300>,TrWipeIn<500>>

You can change these to something smaller to make it ignite/retract faster.

You may also want to consider writing your style like this to make it easier to read:

StylePtr<Layers<
  AudioFlicker<RotateColorsX<Variation,Green>,RotateColorsX<Variation,Rgb<0,200,0>>>,
  AlphaL<NavajoWhite,SwingSpeed<600>>,
  LockupTrL<Layers<
    AlphaL<AudioFlickerL<White>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,
    AlphaL<White,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<4000>,Int<26000>>,Int<6000>>,Int<10000>>>>,TrConcat<TrInstant,White,TrFade<400>>,TrConcat<TrInstant,White,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,
  ResponsiveLightningBlockL<Strobe<White,AudioFlicker<White,Blue>,50,1>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,
  ResponsiveStabL<Red>,
  ResponsiveBlastL<White,Int<400>,Scale<SwingSpeed<200>,Int<100>,Int<400>>>,
  SimpleClashL<White>,
  LockupTrL<AlphaL<BrownNoiseFlickerL<White,Int<300>>,SmoothStep<Int<30000>,Int<5000>>>,TrWipeIn<400>,TrFade<300>,SaberBase::LOCKUP_DRAG>,
  LockupTrL<AlphaL<Mix<TwistAngle<>,Red,Orange>,SmoothStep<Int<28000>,Int<5000>>>,TrWipeIn<600>,TrFade<300>,SaberBase::LOCKUP_MELT>,
  InOutTrL<TrWipe<300>,TrWipeIn<500>>>>()
1 Like

Hey Profezzorn…

Thank you for the help! As you can probably tell, I’m still learning =]

No worries. That’s true for everybody. :slight_smile: