OLED Bullet Counter with Blaster Prop

I’ve managed to suss most things out, but cant get the OLED bullet counter to work with OS7 and Proffie V3. I can show custom bmp animations and font names, but it then just defaults to the 8 Segment Bar graph display which doesn’t generally move. I say generally, as when i’m using the ak47 font on automatic, the end segment sometime disapears for a moment.

We seem to be sorely lacking instructions for how to set up bullet counters.
What little we have seem to be available here:

Let me know if you need help.

Yes, I found that post and tried adding the CONFIG_BOTTOM declaration, but it threw an error on compiling. I will try again tonight and feed back the specific error.

Compilation error: ‘Screen DisplayHelper1<Width, col_t>::GetScreen() [with int Width = 128; col_t = long unsigned int]’ marked ‘override’, but does not override

Current Error

Is there a way for BladeID to be shown on the OLED display? I tried searching for it but was not able to find anything useful.

would it be as simple as:

There is currently no code for showing the ID on the oled display.
Wouldn’t be hard to add though.

It looks like someone (me) broke the bullet count code ~3 years ago, guess it’s not used that much… I checked in a fix on github master. It compiles now, but I haven’t tested it.

Also, the actual code needed is slightly different, here is an example for an 128x32 display:

DisplayHelper<128, uint32_t,
  ClearRectangleOp<10, 80, 8, 24>,
  WriteBulletCountOp<10, 20, 5>
> display_controller;
SSD1306Template<128, uint32_t> display(&display_controller);

Thanks for the fix :slight_smile: I will have another go tonight.
Does the code detect the display height ? Or is it pre-configured to 32 ?

there is no detection.
If you have a 128x64 display, you would replace the two uint32_t with uint64_t.

I’ve decided to learn c++ !
Hopefully stop me asking silly questions :wink:
Got bullet counter working. I notice it overrides the display of .bmp files and font names between font changes.

Found that with 64 line oled, you can display both bullet count and battery. Going to see if I can alter ssd1306.h to turn off 2nd battery voltage, and move battery bar down :slight_smile:

Unlikely, C++ is like go - “a minute to learn, a lifetime to master”. There are very few people who can claim to know everything there is to know about C++.

It doesn’t have to do that. It’s the ClearRectangle operation that does that.