Dude what wrong with my config?

so I was adding a new blade style and an extra blade to my existing config, that seemed to be going ok.
I test compiled it and go these errors that I can’t figure out what is happening to cause them.

errors are,
line 63 error expected ‘}’ before ‘;’ token

line 22 note: to match this ‘{’

line 63 error cannot covert 'const char* ’ to ‘stylefactory*’ in initialization

i’m running build 5.7 with no issues.

any help would be appreciated :+1:

apparently my config is too long to post :rofl:
so here is the striped down version.

#ifdef CONFIG_TOP
#include "proffieboard_v2_config.h"
#define NUM_BLADES 4
#define NUM_BUTTONS 2
#define VOLUME 2000
const unsigned int maxLedsPerStrip = 144;
#define CLASH_THRESHOLD_G 2.5
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define COLOR_CHANGE_DIRECT
#define DISABLE_DIAGNOSTIC_COMMANDS
#endif

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


#ifdef CONFIG_PRESETS
Preset presets[] = {

{ "Rey_Graflex", "tracks/track1.wav",
    StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Rgb<180,130,0>>,RotateColorsX<Variation,Rgb<90,65,0>>>,LockupTrL<Layers<AlphaL<AudioFlickerL<White>,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>>,Scale<SwingSpeed<100>,Int<14000>,Int<18000>>>>,AlphaL<White,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>>,Int<10000>>>>,TrConcat<TrInstant,AlphaL<White,Bump<Scale<BladeAngle<>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>>,Int<20000>>>,TrFade<400>>,TrConcat<TrJoinR<TrWipe<100>,TrWipeIn<100>>,White,TrFade<300>>,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>>,ResponsiveBlastL<White,Int<400>,Int<100>,Int<400>,Scale<BladeAngle<0,16000>,Int<10000>,Int<30000>>,Int<10000>,EFFECT_CLASH>,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<TrWipeX<Scale<BladeAngle<>,Int<500>,Int<200>>>,TrWipeInX<Scale<BladeAngle<>,Int<800>,Int<300>>>,Black>>>(),
    StylePtr<Layers<ColorCycle<RotateColorsX<Variation,Red>,25,100,RotateColorsX<Variation,Rgb<180,130,0>>,25,3000,4000>,TransitionEffectL<TrConcat<TrInstant,White,TrFade<400>>,EFFECT_BLAST>,LockupTrL<AudioFlickerL<White>,TrInstant,TrFade<500>,SaberBase::LOCKUP_NORMAL>,TransitionEffectL<TrConcat<TrInstant,White,TrFade<400>>,EFFECT_CLASH>,InOutTrL<TrWipeIn<200>,TrFade<2000>,ColorCycle<RotateColorsX<Variation,Red>,25,100,RotateColorsX<Variation,Rgb<180,130,0>>,25,3000,7000>>>>(),
    StylePtr<Layers<AudioFlicker<RotateColorsX<Variation,Rgb<180,130,0>>,RotateColorsX<Variation,Rgb<90,65,0>>> ,LockupTrL<BrownNoiseFlickerL<White,Int<200>>,TrConcat<TrInstant,White,TrFade<300>>,TrFade<300>,SaberBase::LOCKUP_NORMAL>,ResponsiveLightningBlockL<AlphaL<Red,Int<0>>,TrConcat<TrInstant,AlphaL<White,Bump<Int<12000>,Int<18000>>>,TrFade<200>>,TrConcat<TrInstant,HumpFlickerL<AlphaL<White,Int<16000>>,30>,TrSmoothFade<600>>>,BlastL<White>,SimpleClashL<White>,InOutTrL<TrInstant,TrFade<300>,Layers<Black,TransitionEffectL<TrConcat<TrInstant,Pulsing<RotateColorsX<Variation,Rgb<180,130,0>>,RotateColorsX<Variation,Rgb<7,5,0>>,6000>,TrDelay<30000>,Pulsing<RotateColorsX<Variation,Rgb<180,130,0>>,RotateColorsX<Variation,Rgb<7,5,0>>,6000>,TrFade<1000>>,EFFECT_BOOT>,TransitionEffectL<TrConcat<TrInstant,Pulsing<RotateColorsX<Variation,Rgb<180,130,0>>,RotateColorsX<Variation,Rgb<7,5,0>>,6000>,TrDelay<30000>,Pulsing<RotateColorsX<Variation,Rgb<180,130,0>>,RotateColorsX<Variation,Rgb<7,5,0>>,6000>,TrFade<1000>>,EFFECT_NEWFONT>,TransitionEffectL<TrConcat<TrInstant,Pulsing<RotateColorsX<Variation,Rgb<180,130,0>>,RotateColorsX<Variation,Rgb<7,5,0>>,6000>,TrDelay<30000>,Pulsing<RotateColorsX<Variation,Rgb<180,130,0>>,RotateColorsX<Variation,Rgb<7,5,0>>,6000>,TrFade<1000>>,EFFECT_RETRACTION>>>>>(),
    StylePtr<Layers<RotateColorsX<Variation,Green>,TransitionEffectL<TrConcat<TrInstant,White,TrFade<400>>,EFFECT_BLAST>,LockupTrL<AudioFlickerL<White>,TrInstant,TrFade<500>,SaberBase::LOCKUP_NORMAL>,LockupTrL<AudioFlickerL<White>,TrInstant,TrFade<500>,SaberBase::LOCKUP_LIGHTNING_BLOCK>,TransitionEffectL<TrConcat<TrInstant,White,TrFade<400>>,EFFECT_CLASH>,InOutTrL<TrFade<500>,TrFade<500>,Layers<Black,TransitionEffectL<TrConcat<TrInstant,TransitionLoop<RotateColorsX<Variation,Green>,TrConcat<TrBoing<1200,2>,RotateColorsX<Variation,Rgb<0,10,0>>,TrFade<1200>>>,TrDelay<30000>,TransitionLoop<RotateColorsX<Variation,Green>,TrConcat<TrBoing<1200,2>,RotateColorsX<Variation,Rgb<0,10,0>>,TrFade<1200>>>,TrFade<500>>,EFFECT_RETRACTION>,TransitionEffectL<TrConcat<TrInstant,TransitionLoop<RotateColorsX<Variation,Green>,TrConcat<TrBoing<1200,2>,RotateColorsX<Variation,Rgb<0,10,0>>,TrFade<1200>>>,TrDelay<30000>,TransitionLoop<RotateColorsX<Variation,Green>,TrConcat<TrBoing<1200,2>,RotateColorsX<Variation,Rgb<0,10,0>>,TrFade<1200>>>,TrFade<500>>,EFFECT_NEWFONT>,TransitionEffectL<TrConcat<TrInstant,TransitionLoop<RotateColorsX<Variation,Green>,TrConcat<TrBoing<1200,2>,RotateColorsX<Variation,Rgb<0,10,0>>,TrFade<1200>>>,TrDelay<30000>,TransitionLoop<RotateColorsX<Variation,Green>,TrConcat<TrBoing<1200,2>,RotateColorsX<Variation,Rgb<0,10,0>>,TrFade<1200>>>,TrFade<500>>,EFFECT_BOOT>>>>>()},

{ "Power_Surge", "tracks/mars.wav",
    &style_charging,
    StyleNormalPtr<BLACK, BLACK, 300, 800>(),
    StyleNormalPtr<BLACK, BLACK, 300, 800>(), "Battery\nLevel"};

BladeConfig blades[] = {
 { 0, WS281XBladePtr<122, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
    WS281XBladePtr<5, blade4Pin, Color8::GRB, PowerPINS<bladePowerPin4, bladePowerPin5> >(),
    WS281XBladePtr<2, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin6> >(),
    WS281XBladePtr<1, blade3Pin, Color8::GRB, PowerPINS<bladePowerPin1> >()
  , CONFIGARRAY(presets) },
};
#endif

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif

You missed the closing } on your “Power_Surge” preset.

thanx for the help, I did find that one just before you replied.
just a bit stumped on the one for line 63 as I don’t know exactly what its trying to tell me?

I suppose as a last resort I could remove it, but I like having it there to let me know what the battery state is.

The missing } threw everything else off. Did you recompile after fixing it?

I did and it still throws up 'const char* to ‘stylefactory*’ in initialization.
seems a little strange as this used to compile fine before I added the last blade style and I’ve changed nothing with that part?

I did remove it and it compiles with no errors.
I added it by copying it from a config i know compiles and came up with the same code.

might have to live without this bit for the time being.

oh, duh. 4 blades. Only 3 styles in the battery level one.

1 Like

and as if by magic it compiles!

thank you! you are the dude!

1 Like