E-switch UI Development / FSM

Oh yeah, I didn’t change muggle mode. I should probably put that on the todo list.

You mean the moon timing hint?

At some point in the past few months, I increased the duration of that to make it a bit more visible… but it’s still hard to see on some lights. It went from 8ms to 12ms, but that’s still pretty quick. It can’t really get much longer without interfering with other things, since each frame is only 16ms long.

When using “B_TIMING_ON = B_RELEASE_T” (turn on at button release instead of button press), the moon timing hint is gone entirely. It serves no purpose with release-on timing, because the LED doesn’t even light up until it has been long enough to count as a “hold”. So this helps on lights where the timing hint is hard to see.

Yes. Strange it works nicely on the ROT66 but not on the FWA3.

Hi ToyKeeper, IRL software tester here to let you know that I haven’t noticed any issues with the latest version of Andúril (yet!)

I have only been messing with it for around 10 minutes, but so far I am loving the release-on behaviour. Moonlight is much easier to land on now, without accidentally blasting a few hundred to a few thousand lumens instead.

Momentary and reverse ramping strobes are a brilliant addition. I need to have a go at light painting now that I have a good enough excuse. The new, calmer candle mode looks really good too. I use candle a lot, and I don’t think that’s going to change any time soon.

That 2 level lockout functionality is brilliant. Moonlight is rarely sufficient in my normal use, so I was somewhat discouraged from using lockout. Now I have it so that I can single click for momentary moon, or double click for momentary 60 lumens. Perfect! On those occasions where I just quickly need some light, lockout is no longer a hindrance.

I noticed that the ability to switch between automatic and manual memory was enabled by default too. When I was reading about the changes I though you meant it would be disabled, however sure enough I was able to set the fully regulated level on my D4S as the level that the flashlight always switches on into with a single click. I wasn’t sure I’d like this, but it’s really growing on me quickly. I like having the ability to swap between automatic and manual memory on the fly, too.

All in all, fantastic update TK! I haven’t tried tearing a light apart to flash it yet (D4S with flashing holes is ez mode), but I might have to give it a go with my FW3A at some point. :smiley:

I fglashed a driver with
INDICATOR_LED_SKIP_LOW

seems the first time after flashing it is in low mode
then 7 clicks do ON/OFF

Just updated my FW3A. Manual memory is fantastic—my two most used levels are moonlight and 1x7135 so now I can have quick access to both.

I found a weird bug or new feature with Anduril

on newly flashed driver I have the ramp ceiling set to about 75%
#define RAMP_SMOOTH_CEIL (MAX_LEVEL*142/150)

.

driver is off:
When I double click to Turbo it goes to 75%,
a 2. double click goes to 100%

driver is on
start the driver with single click then do a double click it is right to 100%

Hahaha. The flashlight wars we have for fun with the kids just got an upgrade. Pew pew pew, just got fully automatic; pewpewpewpewpewpew :smiley:

I got returned a Anduril flashlight from a customer who reported that the light gets very regularely stuck in a sort of blinky endless circle

I tried hardware fixes but it seems that the firmware itself gets stuck somehow

The MCU gets stuck, while the light was at max ramping and get turned on again
the light needs to be disconnected from voltage to gets it out of the stuck behavior

I have it tested afterwards on a bench power supply trying to trigger the error

The light gets stuck the Indicator LED lights while the Output is off about 1 second
then a short blink of main LED and the Indicator LED gets out

First I thought its a 5V problem so I reinforced filter caps with no success

I have now the error reproduced on bench power supply

This is the 5V supply of MCU with oscilloscope

Indicator LED bahaves like this

The output of PWM 1 and PWM 2 are a short pulse packets



Yes thats right. I can confirm it on my FW3A.

Now I recal that I have recognised it former, but I was not thinking about a possible bug, I didn’t think anything with this driver-behavior.

Thanks!

It really helps having people test things… I’m so accustomed to the UI that I’m likely to miss stuff.

Sorry it took so long to add this function. People have been asking for it since 2017. :person_facepalming:

That’s an error in your config file. Stop setting the default to a mode you don’t want.

That was fixed in 2018. It happened sometimes when the switch signal was extremely noisy, and could generally be fixed by replacing the switch… but I modified the code to tolerate unusually bad switch hardware last year. Sounds like the firmware on that light is probably very old.

That’s intended behavior documented on page 1 of both manuals, and in the UI diagram. It has been that way since day 1.

Sometimes it takes new users a while to notice, but I’m a little worried that someone who builds products and sells services based on this code didn’t know about it.

please where do I find the config line does the default mode to low?

That was firmware from April 2019, its a buck driver
The light keeps blinking, even if I press the switch permanently it does an extra blink and goes on
my guess may be noise from the switching node

TK, I just noticed behavior in the 6/2 Anduril builds that I wasnt sure was intentional.

We have the two step lockout, however if you have the ramp minimum set to anything other than 1, the second stage becomes moonlight and the first stays the min ramp level.

Might it make sense for the lockout to maybe have some logic like “if MIN_RAMP_LEVEL > 1 ; LOCKOUT_STG1 = 1; LOCKOUT_STG2 = MIN_RAMP_LEVEL” or something similar?
Maybe even have a lockout config option for 6 clicks to toggle between single stage = min ramp and dual stage = 1/60lumen

Edit: does anyone know if Anduril has lvp with the aux leds?

Ah, okay. I wonder what’s causing it to go into a reboot loop, then. Something must be pretty noisy to set it off like that. Like, triggering interrupts faster than they can be handled, causing an overflow or something, until it goes into a reboot loop.

The first click is the current ramp floor, and the second click is the other ramp floor. Those can be whatever you set them to.

I’ve been pondering whether it should instead do first click = lowest ramp floor and second click = highest ramp floor, to ensure it goes in low-to-high order… but I’m not sure if it would be an improvement.

Only in the most recent version, on the D4V2. I didn’t add LVP in sleep mode until that project.

Older lights with aux LEDs won’t shut them off when the battery gets low… but the D4V2 does. It wakes up every 30 seconds or so to measure voltage while it’s “off”. I still need to fix some of how that behaves though… if the user presses the button during that narrow timing window, IIRC it doesn’t respond how it should. But at least it allows the voltage readout to update as the battery drains, and it keeps the battery from draining too far.

imgur link

Just noticed this. This is a BLF Q8 running Anduril 02-06-2019 in “OFF”mode, aux off.
Looks like it’s powering the MCU down and up again?
My Q8, and D4S’s do this, my D4’s are steady @ 21yAmps

That’s odd. The speed looks way too slow, unless the DMM is sampling infrequently.

It should cycle between ~5 and ~30 uA about 8 times per second.

This happens on devices with the “sleep ticks” feature enabled, because it leaves the WDT enabled during sleep so it can wake up and change the aux LED state, like for the “blinking” mode. The exact cycling speed is defined by STANDBY_TICK_SPEED.

If there’s no aux LED though, or if you compile without TICK_DURING_STANDBY, the power use should be lower and steady, as you described on the D4.

TK…could you please share some hints on when can we expect 1634 sources?

It’s hard to say for sure. It would have been out by now, but people keep asking me to help them clone Emisar products, so I keep pushing back the release date. I’m not in the business of helping people undercut my clients.

I see, thanks for clarificaiton.

I suppose that’s the problem with open source.

Personally, I prefer the design and execution of Hank’s lights and Anduril is icing on the cake. I will always choose his lights compared to the clones. I would hazard a guess that a lot of other flashaholics would too.