Compliation error but might be something simple

Hello, been reading a lot and searching.
Couple things. I purchased a proffie board to sub into my Ronin hilt. I did not have the blade config, but got it from the manufacture. Otherwise the SD card was pretty bare.

I tried a simple profile but get a ;
Compilation error: expected primary-expression before 'class

I saw that these errors might not matter and I uploaded to the board. However, when I power it up I hear what sounds like directory not found?

here is the pastebin. Hopefully something simple and stupid I am missing.
Thank you.
// ProffieOS7 Config File#ifdef CONFIG_TOP#include "proffieboard_v2_config.h - Pastebin.com

can you click on the copy the message, this gives the whole error rather then a snippet.

once you copy that then hit the “</>” button in the post editor it will preformat the text and make it easier to read.

It’s a few things, your BladeConfig was incomplete when you input it into the Config Tool, the tool would have prompted you with the below message.

Unable to parse BladeConfig, you may have errors or missing information. This may cause compilation errors if not corrected.

Well, these are those compilation errors :wink:
There is a large block of text with an example and explanation of what your BladeConfig should look like right below where you input it. Without a complete BladeConfig the tool is unable to determine how your saber is wired so it doesn’t set up the Presets, etc. correctly.

In your case you are missing the closing “};”

You input:

BladeConfig blades[] = {
 { 0, WS281XBladePtr<130, bladePin, Color8::GRB, PowerPINS<bladePowerPin1, bladePowerPin2, bladePowerPin3> >(),
    WS281XBladePtr<8, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4> >(),
SimpleBladePtr<CH1LED, CH2LED, NoLED, NoLED,bladePowerPin5, bladePowerPin6, -1, -1>(), 
   CONFIGARRAY(presets) }, 

but left off the “};” on the next line.

It should be:

BladeConfig blades[] = {
 { 0, WS281XBladePtr<130, bladePin, Color8::GRB, PowerPINS<bladePowerPin1, bladePowerPin2, bladePowerPin3> >(),
    WS281XBladePtr<8, blade2Pin, Color8::GRB, PowerPINS<bladePowerPin4> >(),
SimpleBladePtr<CH1LED, CH2LED, NoLED, NoLED,bladePowerPin5, bladePowerPin6, -1, -1>(), 
   CONFIGARRAY(presets) }, 
};

Then the tool will know you actually have 3 blades wired so it will set your presets up with 3 styles each (in the order of the blades in BladeConfig).

Now if your saber doesn’t have 3 blades (any LEDs are counted as “blades”) then you may have the wrong config so I would reach out to your installer.

At any rate, as the prompt notes if you do not put the BladeConfig in correctly you will get compilation errors so you need to input the correct BladeConfig info to use the tool.

Ah. Thanks for the quick reply. When I copied it it did not give me the error so I thought it was correct but the 3 blade thing confused me as it doesnt have 3 blades.

I am at the airport heading to Galaxy’s Edge. Will send another message to the Pachstore to ask about the config.

Hmmm, it definitely should have given the prompt if you pasted that BladeConfig into the box as directed. I did a bunch of tests and it always returns an error prompt when your BladeConfig is pasted into the box as it was recorded.

At any rate, keep in mind any LEDs, accent, PCB ring, crystal, etc are considered “blades” in the OS. If you have no other LEDs on the saber other than the main blade then you probably have the wrong config, but if there are other LEDs in the hilt or chassis they would be considered “blades” if wired to LED pads and are represented in the BladeConfig. Unfortunately, only your installer would know for sure how they wired it and what they wired so you’ll want them to provide the config file and correct BladeConfig for you.

From there if you enter the full BladeConfig section provided (as the example shows) the tool will determine how many blades it needs to support and it will set the rest of the config up accordingly, just note updating the BladeConfig will reset your presets section so you’ll need to build them again to match the provided BladeConfig.

If you get further errors using the tool it’s better to post in the thread linked from the top of the tool “report any issues here” :wink:

1 Like

Perfect. I don’t think I do but will give the original config another try. Thanks again

One quick question. I was using 7.1 but the style editor for 7 but then when things didn’t work back to 6

I was just doing the Visions one you created but sounds like would be better going forward to use the 7 editor?

Not sure what you’re asking, OS version or Library? The Style Editor doesn’t have a version, it’s different than my Style Library. If you’re using OS7 then use OS7 library, if you’re using OS6 then use OS6 library.

thank you for all of your videos. Got it to work!

Still some things I am confused about.

  1. Web USB isnt working for me but I posted in another thread
  2. Fett I used your Style libray for Star wars visions.
    a) it says the twins Karre defaults to the split blue pink but I just seem to get the default color? Did I not select something in the editor?
    b) I thougjht when I enter track in the OS7 library that it would play that when I select the preset but it plays another one? is there a way to change that? I guess that “track” is the background music that can be played with that font?

The library generates correctly for me, post the style code you generated so I can see.

font.wav is played when you change presets. See the controls in your prop to play tracks.

thank you as always for the quick response.

  1. I updated the pastbin
    // ProffieOS7 Config File#ifdef CONFIG_TOP#include "proffieboard_v2_config.h - Pastebin.com

  2. I might not be using the correct terminology. But when you change presets there is typically a wav that identifies the font, like “i’m just a wanderer” that would be in the prop?

  1. You only have one style in your config “Ronin” if you want other styles you need to generate them and add to the config in appropriate preset.

  2. The file played when you change presets is named font.wav, it is in the font on your SD.

I am probably not understanding the library then. On this page you can select different options and when I do it this way, it looks like I get the different styles?

and then on the main blade config button I see the other options? but do I set the color there? How do I set the multicolor for Karre?

See the NOTES :wink:

If you select “Option” styles you then have to change your Style Option to the appropriate number via Edit Mode or ProffieOS Workbench or using the arguments in the config tool, otherwise only default is used. Watch the videos at the top of the Config Tool, to see how to set Arguments
If you’re not using or wanting to use options just change Default to the style you want and generate them individually.

1 Like