Flashlight Firmware Repository

okay :weary:

It’s my own fault this is so frustrating. I put the OTC in a terrible spot on this driver so every reflash is a struggle

In any case I don’t have a “ONE7135” mode. I had it commented out originally and that gave errors, so I just let it be there. I don’t plan to actually use it.

Which driver? The tripledown?

X2R TripleStack

edit: so the unmodified .c file seems to work fine when compiled with my modified calibration header. The moon level is just too low to make my abused XM-L light up with the 380 7135. Also my LVP values are apparently exactly 0.1v too high.

So I guess I’ll go back through and clean up my modified mode groups, the error has to be there somewhere.

I think I see the problem. I think I am getting into programming mode, I just can’t see the blinks.

Can you tell me how to read this bit given my ramp size is 10?

That would be 2 for a RAMP_SIZE of 10, which I think you have there. Division there truncates.

So PWM 2, or ramp 2 so PWM4 ?

It's used as a parameter to set_level(), so it's an index into the ramping tables, not a PWM value direct.

Also, it's used in the function toggle(), where its multiplied by 3/4, resulting in a value of only 1! So, in one case it's a ramping level of 2, another case it's a ramping level of 1.

Ok, think I see what's goin on, and why you are seeing 3 modes. You are using mode group 8, and you have it configured as follows:

RAMP,BATTCHECK,6,ONE7135,TURBO,0,0,0, // 8: special group B

So, the first 2 modes are accessible thru reverse navigation, therefore your first mode should be level 6, the ONE7135 is your 2nd, and TURBO your third mode.

TURBO is defined as max FET.

So, you should see levels 6, 4 then 10, but you are describing/measuring what appears to be 5, 6, then 10? Maybe?

Are we sure moon is just ramp level 1? Because I have tried multiple LEDs and they should be lighting up at PWM 3, but I’m getting nothing.

edit: I think the firmware is working fine. The issues I’m having seem to involve the differences between the 13a vs 25, made worse by my not having any 350ma 7135’s on hand

Yea, in the function count_modes(), if you have moon mode enabled, it adds it as level 1.

Yea, I'm always using 350's now - you would not believe when I'm seeing using PWM value of 1 with these 350's - amaz'n the LED lights up, but oh so very very low... Not sure if this is only working with our new driver design - DEL's changes, or not.

Well the same driver (with 380’s) was perfect at PWM 3 on the 13a, it even lit up at PWM 2. But with the 25 it takes PWM 5 just to light up, a more usable level at PWM 6.

………………

Can I change the order of programming mode?

I want:

  1. Muggle
  2. Mode group
  3. Memory
  4. moon
  5. Temp Cal
  6. medium press
  7. Mode order
  8. Reset

edit: figured it out. I think I’m finally happy with it. With all of 2 mode groups! :partying_face:

Odd, I also get it to light up fine with PWM 2 on the tripledown, I only use 350 7135’s, never saw the point to the 380’s honestly. Twice the price for an extra 30ma?

Maybe it is the stacked design?

it was working fine on this exact driver with 3pwm. All I did was swap the MCU. Maybe it’s the fuses I’m using? Regardless, I get the same exact light from 6pwm,so I’m not worried too much.

I’ve got a normal mode group, a blinky group, and I’ve changed muggle mode to be charging mode on the X2R. It just shuts off the LED so I can charge next to my bed

You might try reflowing the MCU real quick, sometimes the solder joint is just not quite right. I have had many times where I chase a problem only to eventually touch a soldering iron to the part and then it suddenly works, even though the joint looked perfect to start out with.

Its giving me the same light as before, and pulling the same amps as before, it just takes a higher pwm number. So it’s not a problem, just took a while to figure out.

What’s the best way to get temp monitoring working well? Pot the MCU to the bottom of the emitter shelf? It’s throttling up and down too much

Yeah, I have used those silicone cubes to make direct contact with the pill and that works well but the best thing is to adjust the time between adjustments, it is setup for ~8 seconds IIRC, you can extend that to keep it from adjusting it as much. Also calibrate the temp and/or set the temp correctly in the firmware.

Yeah I calibrated it in the firmware to where I couldn’t hold on to the head anymore, but then if I let it cool and just turn it on in 1amp mode, it still steps down even though it isn’t hot on the outside.

So I re-calibrated it to the point where it was uncomfortably hot all the way at the tail end of the battery tube, and that seems to be working better now.

I made muggle mode into basically a “soft-off” to use when charging the X2R. That and the batt-check mode that flashes volts and tenths is really nice to have in a rechargeable light.

Once you get the hang of bistro it leaves the A6 firmware in the dust IMHO. Far more options and features. I don’t use most of them but it is great to have them avalible so I can change the setup at any time without having to reflash firmware.

I have been playing with bistro today, trying to get it setup just so for the tripledown drivers mode wise.

I did notice something today, how is the SOFT_START supposed to work? It is supposed to ramp to the next mode gradually correct? I even tried changing the comment so that the “slow ramp” was enabled but yet I don’t get any kind of ramping? It just jumps directly to the next mode.

I did notice that I seem to get a bright flash as it changes modes with soft start enabled. Without it enabled I still get a smaller flash in the lower modes but very little in the higher modes? I think this flash is because I am using a tripledown that doesn’t have the new components, I didn’t see the flash with the TA drivers. Although that doesn’t explain why it is worse with soft start enabled?

Now I don’t really care myself but was curious why it would not work?

Hey TK, what do you think of a dual-switch version of bistro-tripledown?

Basically everything is the same, except short and medium presses are performed on the side switch only, and the main power switch (clicky) only does on/off. That way if memory is enabled you can use a forward-clicky for signaling, etc.

I like it!