Flashlight Firmware Repository

It actually worked. Can’t beat the feeling of succeeding with something you have absolutely no clue of. AVRdude says I got anduril on my D1. :smiley:
Got to put that thing together quick. I only trust this, if I see it with my own eyes.

Edit: And the light is up and running! :sunglasses: :+1:

@ToyKeeper

What’s closest discrete level for the 350mA 1x7135 mode on the Emisar D1 with Anduril?

Depends on how your discrete/stepped ramp is configured.

The 1x7135 brightness is ramp level 65 of 150.

This script can calculate which levels the stepped ramp should use for any configuration. For example:

> ./steps.py 10 120 7
1: 10
2: 28
3: 46
4: 65
5: 83
6: 101
7: 120

That’s what I meant. Thanks :sunglasses: :+1:

I put Anduril on my D4 and it’s awesome, but sometimes it just flashes when I press or press/hold the button.
The light didn’t do this before and I’ve tried very firm presses to eliminate the switch as the culprit.
Does it with different batteries, fully charged, slightly discharged.
More often does it if I haven’t used the light for a while.
I grabbed the FW out of the index of/torches/fsm. There are a few versions of the FW listed there, were there design changes to the D4 that these different versions address?
Even if there’s no fix it’s staying on, only a minor inconvenience.
My wife and I go to sleep to candle or sunset, thanks for all the fun stuff you’ve included!
Only problem is now I have to figure out how to put it on all my lights.

Bonus: now I don’t agonize over the FW3A. Main interest in that was the firmware. I’m still in but I’ve got my Anduril fix.

That’s very strange. You mean, it flashes in the same was as when you first insert a battery? If so, that would indicate that the MCU is rebooting. There could be a short or something loose/exposed inside, or there could be a firmware bug.

I haven’t encountered that behavior, and no one else has mentioned anything like it, so I’m guessing it’s more likely to be a physical issue instead of a bug. However, that’s not certain.

What configuration values are you using?

I just grabbed the hex file for the D4 from toykeeper.net and flashed it.
Yes, it just does a battery flash. Happens on quick click or hold for low.
Battery connection is good, runs turbo no problem.
Doesn’t do it all the time, but sometimes if I haven’t been using the light it will do 2 in a row.
I’ve tried to recreate it by doing a “weak” click, this switch seems very well made because I can’t trick it. I’ve had other lights where if you went at it slightly off-axis it wouldn’t register the click but not the Emisar.
I will make sure I’m running the release from 8/22/18.
It wouldn’t surprise me if I screwed something up. This was my first attempt and I was giddy with excitement.
I’ve already got it on another driver that I’m putting in a cute little Sunwayman C10R.

If you do anything to it, let me know how it goes. If something is weird inside, it might be sufficient to just loosen the battery tube, wiggle the driver, and tighten the tube again. Of course, that could also make things worse…

Is there Anduril available for the Haikelite MT09R? Couldn’t find anything.
By the way, what is sunset mode on Anduril? Is there a more detailed explanation of the UI than the cheat sheet?

with which windows? I tried on win10 but cant connect to usb device .

Make sure to get the drivers installed first with this for example http://zadig.akeo.ie/
What’s the error message from avrdude?

I got this message after installing zidar too:
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc vendor=‘www.fischl.de’ product=‘USBasp’

Needs to look like this in Zadig.

Here is another driver you can try…worked on mine….scroll down to the downloads:

Sometimes I forget how much effort it takes to get these tools running on Windows. On other systems they mostly “just work”.

I’d fix it if I could, but the AVR toolchain is a bit beyond what I can do anything about. :frowning:

Anyone run BLF-A6 on a single channel driver?

Im trying, it’s not working…

When I compile it for single channel output I get 2 warnings (no errors) related to the timer / PWM speed (I’ll get y’all the error message when I’m back at my desk) but then when I actually use it it has holes in the UI as if it was still outputting some modes to the 2nd channel.

All in all the features function; it changed modes, goes backward to turbo / batt check ect but I can’t actually disable the 2nd output and it trying to use that output for some modes.

Obviously I comment out both defines for 2ch (fast and phase PWM) operation but I’ve tried both ways (all 3 ways), activating both single channel PWM defines as well as just one and just the other. It functions the same, and gives the same 2 warnings no matter how I configure that.

Why bother with AVR Studio when you can just install Ubuntu from the microsoft store and have a complete CLI-only linux installation within windows.

After that, you find your drives at /mnt/c/ and can start building anduril the same way as on a native ubuntu machine.

Hi Toykeeper,

Looks like I found a small bug in goodnight mode.

When entering goodnight mode from battcheck mode while it is blinking, goodnight mode will be activated but the LED will be set to level 0.
If you enter the mode in the gap between voltage readouts, everything works good.

I’m currently searching for the cause so it would not be necessary to add new code and make goodnight mode.

I suspect something in the handling of events while being inside the loop where battcheck is called.

As a patch, it works to save the current level as an additional goodnight_current_level variable and setting the level to that value in the EV_tick handling.

Or as a workaround, let battcheck do its work and enter goodnight mode only after the battery level has been blinked out.

Hehe I also noticed yesterday that something was fishy with goodnight mode. If you let the light sit at Level 0 it will come on at full power after a few minutes, without temperature protection it seems. Because I switched it off at 54°C :frowning:
Thanks for the workaround.

Well, that full power on could be easily explained.

Goodnight steps down from level 11 to 0 in 60min

When the bug forces it to level 0 it seems to step down to level 255 in goodnight mode. Which has no thermal regulation. Or at least what I see in the code.