Skip to content

Conversation

gustavoalara
Copy link

Summary of New Features

Firmware Improvements

The firmware has been refactored to support a much deeper level of customization, especially regarding the NeoPixel LED strip.
Full support has been added for 7-Segment Counters, and NeoPixel LED strip functionality has been expanded:


7-Segment Counter:

Full functionality has been implemented for whmxe-595-2 counters based on the 74HC595 shift register, allowing life or ammo to be displayed.

image

Additionally, the two-character message shown on the 7-segment counter when the device is powered on is customizable. This message is configured from the GUI.


NeoPixel LED Strip Effects:

A complete system has been created, including life and ammo bars with gradient colors and a dynamic effects engine (Fire, Ice, Plasma, Beam, Knight Rider) with a 10-color palette, all configurable via serial command.


Multi-Sector LED Strip:

The most significant improvement is the ability to divide a single NeoPixel LED strip into up to four functional and independent sectors:

  • Fixed LED Sector: A number of LEDs at the beginning of the strip whose color is set from the GUI and is not affected by any other function. Ideal for indicating the player’s color.

  • Life Bar Sector: A group of LEDs functioning as a life bar, with a customizable color gradient.

  • Ammo Bar Sector: A group of LEDs functioning as an ammo bar, also with a customizable color gradient.

  • Effects Sector: A group of LEDs dedicated exclusively to displaying dynamic visual effects (Fire, Ice, etc.).

This feature is configured through new settings in the GUI, allowing you to define the start LED and the number of LEDs for each sector.


LED Effects Assignment to Buttons:

It is now also possible to assign any of the above-mentioned effects to some of the lightgun’s buttons (Trigger, Gun A, Gun B, Gun C, Pump Action, Pedal, Alt Pedal, Start, and Select) both On-Screen and Off-Screen, allowing a greater degree of customization for your OpenFIRE lightgun.


GUI Improvements (OpenFIRE-App)

To support the new firmware features, the desktop application has been updated as follows:


Board Layout tab:

Communication pins for the counter have been added for assignment in the board diagram.


image


NeoPixel Section in Gun Settings tab:

A new group has been added within the NeoPixel section for “LED Segment Configuration,” where you can define the start LED and the length of the life bar, ammo bar, and effects sector.
Real-time validation has been implemented to prevent saving configurations where segments overlap or exceed the total number of LEDs, including an error message showing the overlap issue.

image

A new group has been added for assigning effects to buttons.

image

7-Seg Counter Section in settings Tab:

Activation of the 7-segment counter and the initial counter type value has been added (modifiable via serial commands).
A new text field has been added to enter the custom startup message for the 7-segment counter.

image

Serial Port Communication (Mamehooker)

New Mode Commands (M):

Command Function
MCx1: Sets the 7-segment counter to Life Mode.
MCx2: Sets the 7-segment counter to Ammo Mode.
MCx0: Turns off the 7-segment counter.

New Effect Commands (FX):

All effects now follow a unified format: <FX{Effect}x{Color}x{State}>

Effect Codes:

F = Fire
I = Ice
P = Plasma
B = Beam (Flash)
K = Knight Rider

Color Palette:

R = Red
G = Green
B = Blue
O = Orange
P = Purple
Y = Yellow
C = Cyan
M = Magenta
W = White
L = Lime

State:

1 = Activate
0 = Deactivate

Examples:
Activate Fire effect in Orange: <FXFxOx1>
Activate Ice effect in Cyan: <FXIxCx1>
Activate Knight Rider in Blue: <FXKxBx1>
Deactivate any effect: <FX...x0> (e.g., <FXFxOx0>)

Existing Life and Ammo Commands:

<FDLx{nn}> - Value for life
<FDAx{nn}> - Value for ammo

Examples:

<FDLx45> - Sets life to 45 (on the LED bar it is converted into a percentage, with the first value received being considered 100%).

<FDAx99> - Sets ammo to 99 (on the LED bar it is converted into a percentage, with the first value received being considered 100%).

Change OpenFireCounter to OpenFIREcounter for naming convention
Change OpenFireCounter to OpenFIREcounter for naming convention
* Added Neopixel Life/Amno Bar

* Added Neopixel LED Effects

* added the new effects commands

* Improved and consolidated serial commands for effects
* LED Effects and LED bar by sectors

* Remove ML command and modify FDL/FDA

Remove ML command as is not need with the new multi sector led approach and modify FDL/FDA to handle the target sector

* Modified updateNeoPixelBar declaration

* fix error on plasmaeffect function
* Enables/Disables effects when press buttons

* Commandt to enable/disable effects on buttons

* Added button effect

* Added button effects

* Added button effects

* Added Effects to Buttons

* Added Effects to Buttons

* rolled back the previous change

* rolled back the previous change

* Added Effects to Buttons

* get current effect declaration

* getCurrentEffect function

* reworked buttons to effects functions

* fixed buttons names

* forgot to remove invalid function

* fucking bad memory

* added held variable

* rolled back (bad interpretation)

* fixed bad interpretations

* test data

* moron again

* Fixed Test data in the incorrect place

* moved checkAllButtonEffects to second core

* Improved leds redraw

* Improved leds redraw

* fix errors

* another little fix

* added effect origin detection

* added effect source detection

* added effect source detection

* added effect source detection

* fucking little finger

* Fixed  changes on variable names

* fixed error with activeButton condition

The condition was using the old varaiable name

* Added variables to remember the last serial effect

* Modified function to detect last serial effect

* Modified function to detect last serial effect

* Modified function to detect last serial effect

* creating public declarations and getters

* Modified function to detect last serial effect

* Modified function to detect last serial effect

* Modified function to detect last serial effect

* fixed duplication of variables

* removed test data

* Consolidated names

* little check when receiving new settings

* Added test data again for debug

* Consolidate button effects names due to overflow

* Consolidated button effect names due to overflow
@SeongGino
Copy link
Member

Apologies for the delay, but given the scale of this PR it'll take more time than usual for me to review. ❤️

@gustavoalara
Copy link
Author

gustavoalara commented Aug 13, 2025

Fantastic! I really appreciate that these changes are being accepted! And please, @SeongGino there’s no need to apologize for the delay!

I made the modifications you well suggested regarding the names for the definitions related to the 7-segment counter… but while making those changes, I also added a 5th segment for the NeoPixel LED strips. In this case, I added the possibility for the status signals (off-screen, docked mode, etc.) to also have their own segment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants