Can someone help me with some firmware please?

I myself modified STAR momentary to do something similar to what you are asking for. Read this.

Edit: A link to a newer version of the firmware can be found here.

ToyKeeper mentioned that she has something similar in her repository.

I have since added a nice ramping feature with 19 brightness levels.

The fun and challenge of flashlight FW coding is to take someone else’s code that works but not exactly like what you want and then tweaking it to do what you want. The trap is that you are never completely happy with the UI and run out of code space and wishing that you can get another 1 KiB to add that one extra feature to make the perfect UI.