I installed Anduril on Q8 and on tactical mode I can get it stuck switched on with the switch released just like ZozzV6 mentioned earlier.
Also there is slight delay when switching the light off. Is it there because of ramp down UI (click, click&hold)? Is it waiting second click&hold? The delay is a bit too long for my liking.
I like lightning mode. Thank you ToyKeeper!
Now I am waiting impatiently for candle mode. Googling for “led candle flicker algorithm” shows up some interesting results.
The delay is because it’s waiting to see if you’re going to click again for a double/triple click. The timing of that can be changed by re-defining RELEASE_TIMEOUT. The default value is 24 frames.
The delay can also be eliminated entirely by mapping the “off” action to EV_click1_release instead of EV_click1_complete (a.k.a. EV_1click), but this will interfere with detecting double clicks. So you’d need to have a “turn emitters off” action on button release, followed by a “go to ‘off’ state” action after the timeout happens. This should be safe, but has the side effect of making it briefly blink off after the first click, even when “off” isn’t the action you were intending.
I’m not completely happy with candle mode yet, but here’s an example graph of its output:
Mostly, it seems a bit too spastic when used at low levels, and perhaps a bit too spastic overall. It’s like a candle in a breezy environment. Perhaps I should change it from free-running waves to fading waves triggered by random disturbances. Or maybe just decrease the amplitude on the mid-frequency oscillator. Or maybe make the mid oscillator fade and refresh at random. It’ll take some experimenting. It already does a random sample-and-hold modulation on the mid oscillator frequency, which helps, but it feels like it needs further adjustments.
Momentary strobe? That’s not a thing I’ve considered.
I added it as a “TODO” note in the code, but I don’t have any plans to add it in upcoming production lights. I suspect that my rainbow saber thing may be more relevant for light painting anyway, since it’s specifically designed to make pretty patterns in the air while swinging a lighted sword. It does whatever patterns the user tells it to, and has a full color palette to work with. This includes a momentary “overdrive” function, which could potentially be configured in a manner similar to what he might want.
…
Hmm, I just tried it by turning the brightness down all the way on a police flasher mode, hoping that it’d become momentary-only so it only lights up in overdrive. However, the brightness mod is additive instead of subtractive, so it still flashes while idle — just not as bright. Overdrive works fine, but the non-overdrive isn’t dark like I had hoped. This could be fixed by making it subtractive, but I’m not sure if that’d be a good idea outside of this momentary thing.
I’m a bit late here, but I’d like to add my two cents. First of all, you’re 100% correct that it’s impossible to create, test, and host dozens of .hex files for every hardware configuration out there. However, I do think there is good demand for an alternative to NarsilM on TA drivers. Perhaps we could talk you in to creating one “master” triple-channel.c file, a la Bistro Tripledown? You’ve made it easy enough for all of us to utilize your /bin/ files for things like ramping table calculation, etc. I’m proficient enough in C and Python to write basic programs and edit your (very well-commented) code, but I have no clue where to start when it comes to adding a third power channel.
At the moment, the moon-in-lockout checks the floor for both ramps and uses whichever is lower. This makes the behavior consistent regardless of which ramp is active, but it can also make moon too low sometimes. Do people think it should instead use the current ramp floor instead of checking both? This would effectively give it the ability to change the lockout brightness by switching between ramps, perhaps with a day mode and a night mode, but it might also lead to surprises if the user forgets which ramp is active.
I think I’d prefer it use the current ramp’s floor.
I haven’t reflashed Andúril in a while. I’ve been waiting for Candlelight Mode to be perfected. :partying_face:
Has Muggle Mode been implemented? Does lockout work in Muggle Mode? I like the thought of being able to teach muggles the importance of lockout, both software- and hardware-based.
Ah, been a bit distracted by holiday stuff and fixing FW3A issues, so candle mode hasn’t changed.
Muggle mode is implemented but not published yet. There hasn’t been much consensus about how that should look, so for now it’s a simple latching on/off at 1x7135 (~150 lm) with no bells or whistles. I haven’t even made it dim for LVP yet, though I probably should. For now, it just turns off.
How hard would be to do this:
only one mode (100%), it works while you hold down the e-switch, shuts off when you let go the e-switch. Driver is nanjg 105C?
Need this for diving light that had magnetic switch and driver died so I thought to use regular nanjg 105c and replace e-switch with reed magnetic switch!
Siruis9, that should be fairly easy but it’ll need to use something smaller as a code base. The FSM library doesn’t fit onto attiny13 like the nanjg driver uses. I’d suggest using STAR_momentary or Ferrero Rocher as a base, and basically just stripping out features until it’s a one-mode momentary interface.
Oh, the GT will require some additional changes in order to work. Its power circuit functions somewhat differently than the Q8. I’m hoping to get a GT and port FSM to it, but I have no idea when that will happen.
That’s the first time I’ve ever modded a flashlight, so thanks ToyKeeper both for writing the firmware and introducing me to this exciting world.
I’m keen to tweak the C and have a go at implementing some new modes. I’ve that I’m not an expert at soldering though and wouldn’t be surprised if I damaged the D4 if I tried doing it again.
Did I read somewhere that the Q8 can be flashed without needing to solder anything? That might be a good enough reason to get one if so.
Also, is there a definitive list of lights that work with Anduril? I’m assuming anything with an e-switch and an attiny85 would work but it’s often hard to find out what chip a light has. Are there any C8 style lights that might work with it or is the D1s the closest thing?
Congratulations! TK and Andúril got me into reflashing too!
My first-run and second-run Q8s both have wires long enough to flip the driver over without desoldering anything. It’s an awesome light, too!
I’m not sure if the current Q8s allow this. Perhaps someone with a recent sample can chime in.
In addition to the Q8s, I have Andúril running on my Emisar D4, D1, and D1S. I also have it on a modded EagleEye X6R with a Texas_Ace driver from Lexel. The X6R’s design takes advantage of Andúril’s dual-switch option, which works great.
Some more random observations and feedback, after playing with it for about a day:
bike flasher is excellent and means I’ve technically saved money by buying a USB programmer and SOIC clip (compared to a dedicated bike light).
Momentary moon on lockout is handy and good makes the D4 kid-safe
Having 2 different lockout moons (from the 2 ramps) would be ideal
Adjustable party strobe level (eg using using memorized level or bike flasher level) would be a nice to have but realistically, the party’s strobe won’t get lots of use anyway
Good night mode being ramp-able, maybe having a config for time to off, would be another nice to have. I haven’t actually tried good night mode yet though.
A good morning / alarm mode would be very cool. I know there’s issues with power usage though.
Thanks. I guess if longer wires can fit then you could always do a one-off resolder for longer wires if needed. I’d give that a go on my D4 but I doubt there’s space and there’s a good chance I’d damage the driver.
The X6R looks nice. With the cost of getting a new driver for it the D1S looks quite reasonable though.