E-switch UI Development / FSM

The term ‘goddess’ is well-deserved. Wish i knew you in the everyday.

I hope “unnamed” makes it’s way into some drivers. I have some nice lights that have uninspired UIs, I would gut them all in a heartbeat for this.
It looks like a fast click always leads to OFF, that is great in case a user has a finger spasm or a non-flashoholic gets a hold of it and starts spazzing with the button.
Just turn it off.
I used to love the programming options of HDS and Liteflux but they have gotten way too expensive for me.

Beacons, strobes, the brilliant Good Night, they’ll all get used.
Some O-lights have a little 1 or 2 minute timer, I’ve always wondered why they didn’t make it longer. It’s pretty cool to put next to the bed at night…well… cool for 2 minutes. One that ramps down over the course of an hour would get used every night.
Maybe this will show up in the D1?
Great work TK!!

I decided to try cloning the Meteor M43 UI tonight.

First I cloned UI1 — no problem.

Cloned UI2 — no problem.

Started on UI3 and then I noticed… it has different actions defined for “short click”, “long click”, and “hold”. And different actions for “two short clicks”, “short click then long click”, and “short click, then hold”. :person_facepalming:

No wonder I could never get some of the actions to work reliably.

Otherwise it’s going well though. I’ll continue later when I get my palm unstuck from my forehead.

In SM: Unnamed

what is the difference between
from OFF: 2 fast clicks
from OFF: click, then hold ?
Are the tips of the two green arrows pointing right?

My guess:
from OFF: 2 fast clicks
go to a temperature secure level below TURBO.
If I want then TURBO I must double click.

from OFF: click, then hold
goes to the same line. o_O
maybe this should point directly to TURBO?

Joe

I’m really liking the looks of the unnamed UI. The user configurable floor and ceiling within the ramp range is a very nice feature. I also like the ability to switch between smooth and discrete ramping on the fly without going into configuration settings.

Awesome work as always.

If you double-click from off, it goes to the ramp ceiling level and stays there.

If you click, release, then hold from off, it goes to the ramp ceiling level and ramps down. It’s like a double click, except you hold the second click and it ramps until you let go.

Basically, it lets you navigate from the top or bottom from off. So, there isn’t really any need to configure whether modes are in low-to-high vs high-to-low order, because you get both.

Great work as usual TK!

Regarding the question “what is the best single side switch UI”, i share djozz comments.

Apart from my personal preferences the one thing that worries me the most is whether a non flashaolic can use a light without any explanation. We enthusiasts tend to forget about it, but most people only think about flashlights as something you turn on and off, providing a decent brightness level - not moon/firefly or blindingly bright turbo either. A mid level usually provides more then what they would expect anyway.

Some UIs offer different mode groups, including a ‘simple’ one, but you have to switch group and you may not be around to do so if someone needs the light on his own or in an emergency. So i think the above described behavior should be the default in any UI.

As a side note, i’ve witnessed that ‘people’ can easily resort to a long press if things don’t act has they expect. It seems natural to press a switch harder and longer when in doubt. That’s something to consider while designing a UI.

One of my favorite UI is the DQG Tiny 26650 3rd. Single click goes off/mid/off - providing 8 hours at 600 lumen. Long press from off goes to turbo then single click off. While on, long press cycles through modes.

I did also like the good old SRK style UI. off/high/mid/off all single clicks. Anyone can figure it out. I’d rather have off/low/mid/high/off but you get the idea. Double click goes disco on some.

These are awesome!

SupaFly is just that!

I would love to get Crescendo on a couple of my A6 drivers, but would never be able to accomplish this myself.

Since this is the proper place for it, my suggestion was to turn the double blink when installing a new battery to moonlight instead of something bright like now. Reason: If you unscrew the cap for lockout and use the light in the middle of the night, you have to see 2 bright flashes first.

Second was no memorized moon or turbo since shortcuts already exist (this was someone else’s suggestion which I liked)

Thank you!

My rookie input...

Make a simple from off, hold button to ramp ui, 1 click to memory and devote the rest of resources to a better Thermal regulation sampling system and smooth hiccup free ramp.

Going on the premise of heat is the worst enemy of durability/longevity/lumens,,,

Then maybe create an advanced ui/hardware that allows individual heat sensors for each led to show/control its individual performance, maybe helping troubleshoot a problem with that led circuit/dtp/etc, that makes it run hotter, lower lumen, etc, With a hardware/ui system that lets one turn on/off each individual led and regulate power level of each led...? this would be a flashoholic only Ui, or maybe just a pipe dream...lol

My only fear is on improving the heat reg is that the on chip heat regulation/sensor without remote sensor is not ideal for the fastest most precise, consistent, efficient heat regulation. So until a dedicated circuit/chip is used, maybe with a remote sensor soldered on the dtp, then all the software in the world won't help..?

jmo

Hi TK.
Is it possible to share the unnamed firmware?
Thanks.

Ah, thanks.
I couldn’t get that from the flowchart

The “good night” mode sounds great. If the timer in a flashlight is good enough for that kind of thing then I wonder if you could make an alarm clock mode that slowly ramps up the light after a programmed (with clicks) time.

In general terms, I agree. The tricky part is translating that to specific implementation details — especially if the UI is intended to satisfy both enthusiasts and muggles.

The common 3-mode SK-68 UI (high, low, strobe) is very muggle-friendly but enthusiasts usually hate it. Or the HiveLD driver has lots of features for enthusiasts, but it requires a 9-page manual to operate, and setting config options requires a soldering iron and a metronome.

Getting both power and simplicity at the same time is somewhat tricky. The “unnamed” UI definitely errs more toward power and less toward simplicity. That’s kind of the point of it though — to be fancy and full of features that I want on my personal lights.

That was a thing I left alone in the D4 interface. On my custom UIs though, I generally do a single very-quick blink when power is connected. Very very quick. Unless it’s intended for a dual-switch light (e-switch and power cut switch), in which case it definitely shouldn’t blink at power-on.

The quick blink can be just as bright, but it doesn’t look as bright because it’s so short. Regardless, if you don’t want to be seen, it’s a good idea to cover the front of the light while tightening the tailcap.

It could perhaps be made optional, or I could maybe add a lockout config option to specify whether lockout blinks on exit or not. With soft lockout on 4 clicks, I usually go for that instead of unscrewing the tailcap. Perhaps it could have two or three modes: blink on exit, moon on exit, or no feedback at all.

I have some ideas for improving thermal regulation, and plan to try them soon. It won’t take the entire rest of the ROM though.

About the ramp blinks, those are there because people requested it. Before, the ramp was actually too smooth and left people feeling lost, with no idea how bright it was or how long it would run.

But if the space isn’t needed for other things, it would be relatively easy to add an option to toggle the ramp blinks.

Bingo. That’s not a software thing. The software has access to only one pixel, one button, and one poorly-placed thermal sensor.

Yes, but not quite yet. I’m still working out a few details. Mostly trying to coordinate with other people, which takes time.

The timer is pretty good (in my test, it timed an hour to a precision of less than a second), but waiting 8 hours before turning on is a little tricky. It would mean one of the following:

  • Leaving the MCU on all night, at about 5 mA, so ~40 mAh power used each night just waiting.
  • Implementing a special “twilight” half-sleep mode specifically for things like this alarm clock mode. (like standby, but the WDT would wake up every couple seconds and send a “tick” to the current State handler, with ADC turned off so it can’t sense low voltage)

I don’t like that first one, because 5mA is really high for a mode where it isn’t doing anything. I may be able to make the second one happen though, and it might be kind of nice for other things too (like controlling an indicator LED during standby mode).

In any case, if you want a light to blast in your face each morning, that might be do-able. :slight_smile:
(it’s just going to need a bit of plumbing work first)
(OTOH, timers exist which plug into wall outlets and turn on whatever they’re connected to at a specified time, so that’s probably a cheaper and easier way to do it)

TK, as you already stated, a refined thermal regulation would be a welcome feature. Perhaps the possibility to config in the ui it’s sensitivity to react to temperatures changes, and the correspondent amount of decrease and increase of power to the emitter(s), would permit a fine tune of this function to the many different setups that we use in ours lights (small and big hosts, single and multiple emitters, drasticaly different levels of driver current etc).

I have a SRK with Q8 driver, and a D4, and hopefully soon a D1, to test on. If I can make the thermal regulation “just work” on all those, it’ll probably be flexible enough for most purposes with no need to fine-tune anything. Hopefully the physical traits (like power level and thermal mass) will give the regulation enough feedback to adjust itself. Like, a big light heats up slower so it can react slower or in smaller steps.

However, that said, at a firmware level there are quite a few knobs to tweak, to make sure it reacts at the right speed and intensity without oscillating. And I need to test with tail-standing and no fan, since that was a scenario where the D4’s regulation would over-shoot and then take a long time to recover. It did fine with a hand to sink heat to, or with moving air, but the stagnant air case didn’t behave very well.

TK is it possible to add in the blinkies the heart beat and the sos like Crescendo have?

Sure, it would be easy to add heart beacon and SOS. I’m not sure it would add much though… It already has a beacon with adjustable frequency and brightness, and the momentary mode is good for sending Morse code.

Does anyone actually use SOS?