anduril: immediate on/off options
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Flashlight Firmware Repository |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Anduril could really use some compile-time options to select between "immediate on" and "delayed on", and between "immediate off" and "delayed off". Several people have expressed a preference for Narsil-like behavior, and it wouldn't be hard to add, but it pretty much has to be done at compile time.
The options are:
- Immediate on: Anduril's current behavior. Lights up at the floor level as soon as the button is pressed, then goes to the memorized level when the button is released. If held, it briefly blinks, and then letting go makes it stay at the floor level.
- Delayed on: Narsil's behavior. Does nothing when the button is pressed, and then goes to the memorized level when the button is released. If held, it lights up at moon, and then letting go makes it stay at moon. The advantage is: Some people find it easier to get the moon timing this way.
- Delayed off: Anduril's current behavior. After a single click, it waits for the release timeout to expire before turning the light off. This makes it possible to do multiple-click actions without turning the light off. For example, going to turbo or ramping down.
- Immediate off: Narsil's behavior. After a single click, the LEDs shut off as soon as the button is released. If another click follows, the emitters turn back on. This makes shutting off faster, but also means there must be a dark period before multiple-click actions are executed.
The most-requested of these is immediate off.
Thanks, looks like you helped Texas_Ace quite a bit. :)
This branch will need some cleanup before merging though, to clear up a few things:
- This makes click-for-off override the memorized level, even if it was accessed from a shortcut.
- Since the new definitions are mutually exclusive, it should probably have two defines instead of four.
- Also includes some unrelated changes:
- Full turbo from off
- PWM table compression
- The beginning of a patch to disable stepped ramping