Arduino error

Hello again all.

I received an error when trying to change my num_blades from 4 to 2. I was told by someone that I don’t need 4 for my saber because the 4 blade style setup was only for the krossguard which I don’t have. It seemed to make sense to me because I’ve seen other configs with only 2, so I edited all of my blade styles to have 2 and changed my num_blades to 2 and I received this error:

In file included from C:\Users\pbdkk\Desktop\ProffieOS-v5.9\ProffieOS\ProffieOS.ino:582:
C:\Users\pbdkk\Desktop\ProffieOS-v5.9\ProffieOS\config\s3config.h:37:4: error: too many initializers for 'Preset'
   37 |    };
      |    ^
In file included from C:\Users\pbdkk\Desktop\ProffieOS-v5.9\ProffieOS\ProffieOS.ino:582:
C:\Users\pbdkk\Desktop\ProffieOS-v5.9\ProffieOS\config\s3config.h:447:1: error: too many initializers for 'BladeConfig'
  447 | };
      | ^
exit status 1
Error compiling for board Proffieboard V2.

s3config.h (42.7 KB)

Looks like you forgot to fix the “no_blade” preset array.
Presumably you just delete line 32 and 33 and it might work better.

That did fix the first error, but this one still pops up:

Your blade array entries also still have 4 entries.
I’m guessing that line 437, 438, 443 & 444 should go away. (Note that these lines will have moded in your config file since you edited it.)

I removed those lines, but unfortunately that caused six more errors to pop up. I am going to revert back to the original config with 4 styles and leave it be. It wasn’t a necessary change, just something I thought would simplify it a little more, but it turned into a bigger problem than I anticipated. Thank you anyway for helping.

It really shouldn’t be that hard, so let me know if you want to try again.

I retried these steps again and it worked this time so I’m not sure what I did wrong the first round but it worked. Thanks for your help.

1 Like