Flashlight Firmware Repository

I can try.
There is a line in the .c file, “define RAMP_FET 1,10,42,75,122,133,255”. Each of those numbers correspond to a table of 7 mode options. The modes that are in the mode group you have selected are listed in a table lower in the .c file.

If you have the driver programmed to the three modes only group(group 5) you will see 2, 4, 7, 0, 0, 0, 0. This means that the values for those modes are: 10, 75, 255.

If you would like to alter the values of these modes, you could change the define RAMP_FET line to something like this:
define RAMP_FET 1,20,42,100,122,133,255
That will change the first and second modes in that mode group.

If you don’t have the ability to edit the .c file then non of this will make sense. It may not make sense anyway but it might be a start if no one smarter can answer right now.

Hey guys, I’m having a problem on flashing Biscotti firmware to Convoy’s new driver (the red one)
I have cut the trace on pin 5 and managed to flash the firmware successfully but now it’s stuck on moonlight mode. Fortunately I made a backup of the original firmware, flash it back and it’s back to normal again.

I was wondering what’s wrong? I was using a correct fuse value just like on the source code comments.

Please help.
Thanks.

Firmware biscotti.
Can it work with LED light in the button?
I have not found in the C file, as configured.
Because there is a small current through the lighting, the driver always starts the next mode.

You have to add a bleeder resistor to the driver for the lighted tailcap. This is not due to biscotti but due to the driver design.

10k, 100k… 1MOhm??

It can vary with the current being consumed by the tailcap, but I typically use 650 ohm. I’ve used anywhere between 470 and 750 ohm. We usually use 0805 size resistors, though you may be able to get others to fit. Check out the D.I.Y. Illuminated Tailcap thread. Here’s a 105C image borrowed from the first post:

Ok. Thanks

what is needed to change on a driver or firmware to use a momentary switch instead of tailcap?

Is there a nice UI firmware for Convoy drivers that uses momentary?

I’m not aware of anything too fancy for the 105C using momentary. There are versions of STAR for momentary, or ones written for the attiny25/85. Hmm, sounds like a hole that might need filled.

Check out the index page for TK’s repository. At line 262 is a listing of firmwares mentioning momentary.

Hi, please help. I flashed an a6 firmware. I removed the hidden modes and put the strobe to the highest mode like this

#define NUM_MODES1 5
// PWM levels for the big circuit (FET or Nx7135)
#define MODESNx1 0,0,80,255,STROBE
// PWM levels for the small circuit (1x7135)
#define MODES1x1 2,70,0,0,STROBE

Now the problem is I want the turbo timeout to work on the 4th mode (FET 255) not on STROBE mode. How do I edit the firmware so that when I am in the 4th mode it will step down to 3rd mode at turbo timeout?

maybe try the following:

search for

#ifdef NON_WDT_TURBO

change
mode_idx = solid_modes - 2;
to
mode_idx = solid_modes - 3;

Thanks, I’ll try that.

You are a genius :smiley: it works :+1:
Thanks

I built another blf a6 driver. I disabled the med press. I want the mode direction from turbo to low and always start at turbo. How do I make it it?
Here are my modes

#define NUM_MODES1 4
#define MODESNx1 0,10,100,255
#define MODES1x1 10,255,0,0

If I make it like this

#define NUM_MODES1 4
#define MODESNx1 255,100,10,0
#define MODES1x1 0,0,255,10

How do I edit it so that the turbo timeout will step down from first mode to 2nd mode?

This should do it:

change
mode_idx = solid_modes - 2; // step down to second-highest mode

to
mode_idx = 1; // step down to second-highest mode

Thanks, it works.

I started digging thru different codes in search for smooth ramping, idea is to have 1-mode flashlight that would, when switched on, started ramping from no light to max light in set period of time.
When reaching max light it would stay there.
Anything similar here?

This works but there is a problem at low voltage ramping down.

#define NUM_MODES1 4
#define MODESNx1 255,100,10,0
#define MODES1×1 0,0,255,10

mode_idx = 1; // step down to second-highest mode

If I am on the 4th mode and low voltage kicks in, it ramp down to 3rd mode but the 3rd mode is brighter and 2nd mode and 1st mode. How do I make it ramp up at low voltage so that when I am on the first mode when low voltage kick in it will go to 2nd mode? And when I am on the 4th mode it will just turn off.

Sounds like you will need to re-work the LVP logic to continue down this path.
Alternatively, it might be easier to put everything back to original and just tweak mode_idx to default to turbo instead of moon. Then the modes would still be in ascending order, but it would just turn on to turbo.
Or even easier yet, you can just activate memory. No mods needed.
I only offer alternatives in case re-working LVP is not worth it to you.

Not that I’m aware of, but I doubt it would be difficult to create.

The main questions are what type of driver, and what type of switch?

There are already some smooth-ramping projects for e-switch lights, but I’m not aware of any for clicky switches. It seems like it should be easy to create something like this though:

  • If the button was long-pressed, start at moon and ramp up over several seconds. Save the level to a “noinit” variable every time it changes.
  • If the button was short-pressed, start at the last-used level and stay there.

So, if you pick it up and turn it on, it’ll ramp up from zero to max. If you quickly tap the button during that ramp, it’ll stop and stay at the current level.