When i try to update the Presets, i get the following error
error: cannot convert 'Preset*' to 'BladeBase*' in initialization
115 | CONFIGARRAY(presets) }
| ^~~~~~~
| |
| Preset*
Heres what i have for the Presets and the bladeConfig
Preset presets[] = {
{ "Luke;MC", "tracks/Luke.wav",
StylePtr<InOutHelper<OnSpark<Blast<LocalizedClash<Lockup<AudioFlicker<Green,Rgb16<0,38402,0>>,Pulsing<Gradient<AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>,HumpFlicker<OrangeRed,Pink,50>,AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>>,Gradient<AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>,HumpFlicker<OrangeRed,Pink,50>,AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>>,3500>,Gradient<AudioFlicker<Cyan,DeepSkyBlue>,AudioFlicker<Cyan,DeepSkyBlue>,HumpFlicker<Pink,OrangeRed,50>>>,Pink>,Pink>,Pink,400>,200,500>>()
},
{ "BatteryLevel", "tracks/none.wav",
StylePtr<InOutHelperX<Gradient<Red,Orange,Yellow,Green,Green,Green,Green>, BatteryLevel>>()
}
};
BladeConfig blades[] = {
{ 0, WS281XBladePtr<128, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
CONFIGARRAY(presets) }
};
Im very new to proffieboards so im not sure if im doing this right or not. Also, what pin should i use for the data line of the LED stick? Would the data line be bladePowerPin2
Im powering the stick using the onboard 5v pad.
Here is my entire custom config file
#ifdef CONFIG_TOP
#include "proffieboard_v3_config.h"
#define NUM_BLADES 2
#define NUM_BUTTONS 1
#define VOLUME 1400
const unsigned int maxLedsPerStrip = 128;
#define CLASH_THRESHOLD_G 1.8
#define ENABLE_AUDIO
#define ENABLE_MOTION
#define ENABLE_WS2811
#define ENABLE_SD
#define ENABLE_SERIAL
#define DISABLE_DIAGNOSTIC_COMMANDS
#define ORIENTATION ORIENTATION_USB_TOWARDS_BLADE
#define FETT263_MULTI_PHASE
#define FETT263_TWIST_ON_NO_BM
#define FETT263_TWIST_ON
#define FETT263_TWIST_OFF
#define FETT263_STAB_ON_NO_BM
#define FETT263_STAB_ON
#define FETT263_SWING_ON_SPEED 500
#define FETT263_SWING_ON_NO_BM
#define FETT263_SWING_ON
#define FETT263_SWING_OFF
#define MOTION_TIMEOUT 60 * 3 * 1000
#define FETT263_THRUST_ON
#define FETT263_THRUST_OFF
#define FETT263_DISABLE_COPY_PRESET
#define ENABLE_SSD1306
// Max 20 characters
#define BLE_PASSWORD "your password"
// Max 32 characters.
#define BLE_NAME "Your Saber Name"
// Max 9 characters
#define BLE_SHORTNAME "Saber"
#define MOTION_TIMEOUT 60 * 3 * 800
#endif
#ifdef CONFIG_PROP
#include "../props/saber_fett263_buttons.h"
#endif
#ifdef CONFIG_PRESETS
// Fire speed, valid values are 1 - 10
#define FIRE1_SPEED 2
// How long to wait before firing up crossguards.
#define FIRE1_DELAY 800
// Each of these have three values: A, B, C
// A = non-random intensity
// B = random intensity
// C = cooling
// The first two control temperature, and as we add
// A + rnd(B) to the base of the blade each animation frame.
// The second controls how rapidly the fire cools down
// This is used during normal operation.
#define FIRE1_NORMAL 0, 1000, 2
// This is used when a clash occurs
#define FIRE1_CLASH 3000, 0, 0
// This is used during lockup.
#define FIRE1_LOCKUP 0, 5000, 10
// Helper
#define FIRE1PTR(NUM, DELAY) \
StyleFirePtr<RED, YELLOW, NUM, DELAY, FIRE1_SPEED, \
FIRE1_NORMAL, FIRE1_CLASH, FIRE1_LOCKUP>()
//#define bladePowerPin1 4
#define MOSFET_CONTROL_PIN 8 // Define the MOSFET pin
#define NEOPIXEL_BATTERY_LEVEL_PIN 5
#define HALL_SENSOR_PIN 7 // Pin 7 for Hall effect sensor
#define MOTOR_PWM_PIN 8 // Pin for motor PWM control
#define MOTOR_DIR_PIN 9 // Pin for motor direction
#define ROTATIONS_COUNT 20
Preset presets[] = {
{ "Luke;MC", "tracks/Luke.wav",
StylePtr<InOutHelper<OnSpark<Blast<LocalizedClash<Lockup<AudioFlicker<Green,Rgb16<0,38402,0>>,Pulsing<Gradient<AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>,HumpFlicker<OrangeRed,Pink,50>,AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>>,Gradient<AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>,HumpFlicker<OrangeRed,Pink,50>,AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>,AudioFlicker<Green,Rgb16<0,38402,0>>>,3500>,Gradient<AudioFlicker<Cyan,DeepSkyBlue>,AudioFlicker<Cyan,DeepSkyBlue>,HumpFlicker<Pink,OrangeRed,50>>>,Pink>,Pink>,Pink,400>,200,500>>()
},
{ "BatteryLevel", "tracks/none.wav",
StylePtr<InOutHelperX<Gradient<Red,Orange,Yellow,Green,Green,Green,Green>, BatteryLevel>>()
}
};
BladeConfig blades[] = {
{ 0, WS281XBladePtr<128, bladePin, Color8::GRB, PowerPINS<bladePowerPin2, bladePowerPin3> >(),
CONFIGARRAY(presets) }
};
#include "../props/prop_base.h"
#endif
#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
Button AuxButton(BUTTON_AUX, auxPin, "aux");
#endif