Flashlight Firmware Repository

You had turbo as the second-to-last mode in one of the groups, and it was configured to step down to the second-to-last mode. So it stepped down from turbo to turbo.

The reason it didn’t do “mode_idx —;” before is that one of the default turbo modes is hidden / negative, and I didn’t want it to “step down” from turbo to strobe. Your version doesn’t have to worry about that though.

The “NON_WDT” bit should probably be renamed. The code was originally based on STAR which used the watchdog timer to measure time for turbo, but it took too much room so I got rid of that and replaced it with a non-watchdog version. At one point there was an option to switch between the two methods, WDT turbo and non-WDT turbo, but I removed one.

BTW, why do you have both red and white turned on at the same time in one of the mode groups?

Ok, I wasn’t understanding that. Makes sense now.

I was just playing around with stuff to see what it would look like. The light has two dedomed XP-L’s and a deep red XP-E on the same 20mm triple noctigon. It actually helps bring out the red spectrum quite a bit. My “CRI test” involves shining the light at my wife’s clothes in the closet. You don’t really notice much of a tint change, but the added red really makes the patterns “pop”, even more so than my Nichia light. It does some cool/interesting things to shadows too.

Just recently changed the firmware in the majority of my lights to BLF-A6 wonderful firmware just wish there was an e-switch version now

I just flashed my revised firmware, and something is wrong with the turbo timer. I’m testing it on my power supply, and it is stepping down after 4-5seconds. I tried values of both 60 and 90 ticks. What’s my problem? code paste

It sounds like the battery monitoring kicks in. Try to raise the voltage to at least 3.2V.

That’s with voltage at around 4v, and it only does it on turbo

Your power supply may not be stable on full output. Just to make sure increase the value on line 648 or disable battery monitoring.

Edit: In your code battery monitoring counts 8 ticks which is around 4 seconds.

I’ve never had any problems with my supply before, but I’ll try some different settings (or even just use a battery) when i get home.

Tweaked the firmware so the second group is low red, high red, low white, high white, beacon and set all the red modes to phase PWM and now only the red lights up! Thanks!

Looks like you and I have been working on similar projects. I should pay closer attention to this thread… TK probably thinks i don’t know how to read…

I Just tried running it straight from a battery and it works perfectly. I’m still a little confused, as my measurements show the power supply holding steady. Either way, the flashlight is working and I’m happy to finally say this project is “done.”

Thanks for the help.

I’ve also run into issues sometimes when testing things on a bench PSU instead of using a battery. It’s not usually so bad with lights, but some other hardware can behave pretty strangely with a dedicated power supply.

The PSU I’m using is limited to 5 amps, so high-powered lights hit a hard wall when they try to pull more than that. It’s fine at lower levels though. The really weird stuff only happens when I plug in devices with built-in chargers and other more complex circuits.

This is my Convoy/XinTD X3 firmware. It’s nothing that special or difficult, but since TK helped me with it I figured I’d share it here.

blf-A6 was the starting point, but as it sits all the hidden modes and mode reversing are commented out.

It still has the two mode groups.

The first group is for li-on use:

  • 4 modes, moon on the 2nd channel, then L>M>H on the main channel
  • LVP turned on

The second group is for use with the 3*AA carrier:

  • 3 modes, L>M>H all on the 2nd channel (to avoid over-drawing alkalines, ~760ma in my X3)
  • LVP turned off

Thanks! The no-LVP-on-AA trick is a good idea. I added it to the collection. :slight_smile:

Thank you ToyKeeper for hosting these shared FW's.

I haven't been keeping up with this area. Is there a place that has the UI's and operating perimeters of the various FW's and variations?

The closest thing is the repository index file, which is mostly intended for searching, not so much for reading. Beyond that, once you’ve found something compatible with your switch type and driver type, it’s mostly a matter of reading the text files included with the matching projects to figure out which ones sound best.

+1 ToyKeeper. Thank you for setting up the repository, and for the assistance you have provide in this thread.

+1!!

ugh, I’m so lost with this. I have everything (i think) that I need to flash, but I am lost. I’ve read this thread and the Star Firmware thread and it is info overload!!! can somebody point me in the right direction to a firmware that is a single mode 100% with LVP step-down. I saw one at the repository by toykeeper, but i’m not sure of the specifics as to what it does for LVP and at war voltage.

The only one I’m aware of is STAR_1mode.

From what I recall, it starts at max output, steps down gradually to a bit over half when it hits the turbo timeout, then stays at that level until voltage gets low. It then drops output by half each time the voltage gets too low, until it’s barely on, and then it finally shuts off.

The code is a little weird since it’s based on STAR and I changed as little as I could, so a lot of the code is unnecessary for only one mode. I should probably trim out the extra parts some time…