Beacon doesn't save the ramped value when manual memory is in use.

Bug #1943290 reported by Ariadne Haske
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Flashlight Firmware Repository
Confirmed
Undecided
Unassigned

Bug Description

D4SV2 running 2021-08-31.

Reproduction Steps:

* Enter Advanced UI
* Ramp light to 50/150.
* Activate Manual Memory to save current brightness (50/150).
* Enter Ramp -> Ramp light to 100/150.
* Enter Blinky/Utility Mode
* Switch to Beacon Mode
Light beacons at 50/150 (the Manual Memory value vs the Ramp value)

Desired Behavior:
Entering Beacon mode should use the current ramp level, not the manual memory level.

Workaround:
Use Automatic Memory (Hybrid) Set Manual Memory timer to 1 minute.

* Enter Advanced UI
* Enter Ramp Config
* Enter Manual Memory Timer
* Configure for 1 minute.

Ariadne Haske (alorelei)
description: updated
Changed in flashlight-firmware:
status: New → Confirmed
Revision history for this message
Selene ToyKeeper (toykeeper) wrote (last edit ):

Hey, good catch! I'm pretty sure I know exactly when this behavior started -- anduril2 branch r594. I'm not entirely sure if it should be categorized as a bug or not though.

  https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/anduril2/revision/594

If I enable the manual memory timer (a.k.a. hybrid memory), this is what I see:

- Ramp to the desired brightness.
- Turn the light off.
- Go to beacon mode.
- Turn light off, then wait more than than N minutes, where N is the duration of the manual memory timer.
- Go to beacon mode again.

Result: Beacon mode uses the last-ramped level the first time, and the manual memory level the second time.

The question is... if the memory timer is set to zero (i.e. reset brightness to manually-saved level immediately after turning light off), what is the correct behavior? Is returning memory to the manual level immediately correct, or a bug?

For anyone else who runs into this, it may help to give the timer a non-zero value so it will remember the ramp level long enough to reach beacon mode.

Revision history for this message
Ariadne Haske (alorelei) wrote (last edit ):

> The question is... if the memory timer is set to zero (i.e. reset brightness to manually-saved level immediately after turning light off), what is the correct behavior? Is returning memory to the manual level immediately correct, or a bug?

Per the documentation -- "Memory determines which brightness level the light goes to with 1 click from off."

Per the documentation -- The last-ramped brightness level is used in three places with similar text. I tested a few:

* Beacon Mode (tested -- follows the manual memory, this bug.)
* SOS Mode (not on my flashlight)
* Momentary Mode (tested -- follows the ramp from ON, follows manual memory from OFF, probably another bug)

This feels pretty intuitive. The manual memory 1C brightness setting for me is another kind of lockout, so I don't blind myself forgetting what I left the light set to.

I can configure the hybrid memory to 1 minute, but then ... when I fidget with my light I'm accidentally turning it back on into ceiling via 1 click.

Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

Yeah, I forgot to update some of the documentation when I fixed the memory timer bug.

Before attempting to fix anything, there is still a question to decide: Is this a bug in the documentation, or a bug in the behavior of the light? Or perhaps both?

There are at least four possible solutions:

1. Update the docs to say "memorized level" instead of "last-ramped level".

2. Do #1, but also change the default memory timer to be non-zero. It seems like most users I've heard from prefer hybrid memory, so it might be a better default.

3. Do #1, but also add like a 5 second delay before the memory timer can activate, so it always uses hybrid memory and the "zero" value would actually mean "a few seconds" instead of "immediately".

4. Undo the bugfix from r594 and find a different solution for that bug, so the beacon mode will never use the manual brightness setting.

The earlier bugfix was meant to fix all corner cases, including beacon brightness... so the current behavior wasn't really an accident. But it seems it has some potentially confusing consequences, so it could use a change of some sort.

Revision history for this message
Ariadne Haske (alorelei) wrote (last edit ):

I'm looking at r594, and see memorized_level.

I'm OK with #1, make it obvious where beacon gets it's level from. This is the least amount of work.

#2 doesn't sound like this bug, this bug is a memory timer of zero. #2 probably leads to cases like "why is my light not remembering the previous level?"

#3 is kludgy. Even a few seconds would break how 1C is intended.

#4 is probably the cleanest and the most work. I'm new to the codebase, but I envision something like 1C checking the "memorized_level" variable and the beacon, sos, momentary modes checking a "last_ramp" variable -- a variable the memory timer doesn't touch.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.