Merge lp://staging/~sammyshp/flashlight-firmware/moon-dont-ramp-up into lp://staging/~toykeeper/flashlight-firmware/anduril2

Proposed by Sven Greiner
Status: Needs review
Proposed branch: lp://staging/~sammyshp/flashlight-firmware/moon-dont-ramp-up
Merge into: lp://staging/~toykeeper/flashlight-firmware/anduril2
Diff against target: 225 lines (+75/-11)
9 files modified
ToyKeeper/spaghetti-monster/anduril/anduril-manual.txt (+9/-1)
ToyKeeper/spaghetti-monster/anduril/config-default.h (+5/-0)
ToyKeeper/spaghetti-monster/anduril/load-save-config-fsm.h (+6/-0)
ToyKeeper/spaghetti-monster/anduril/load-save-config.c (+12/-0)
ToyKeeper/spaghetti-monster/anduril/off-mode.c (+1/-1)
ToyKeeper/spaghetti-monster/anduril/off-mode.h (+6/-0)
ToyKeeper/spaghetti-monster/anduril/ramp-mode-fsm.h (+1/-1)
ToyKeeper/spaghetti-monster/anduril/ramp-mode.c (+29/-8)
ToyKeeper/spaghetti-monster/anduril/ramp-mode.h (+6/-0)
To merge this branch: bzr merge lp://staging/~sammyshp/flashlight-firmware/moon-dont-ramp-up
Reviewer Review Type Date Requested Status
Selene ToyKeeper Pending
Review via email: mp+407834@code.staging.launchpad.net

Description of the change

Add option to stop ramping up from moon

With `#undef MOON_START_RAMPING` entering moon from off by holding the switch will not automatically start ramping up. This ensures that moon is entered reliably when the switch is held long enough.

Timings still apply (you can release the switch when the light turns on or when it blips, depending on the configured timing).

With `#define USE_MOON_START_RAMPING_CONFIG` this can be configured during runtime with the global configuration menu.

This contains the changes of lp:~sammyshp/flashlight-firmware/2c-turbo-config because they were necessary for the configuration menu.

To post a comment you must log in.
Revision history for this message
Selene ToyKeeper (toykeeper) wrote :

We took very similar approaches here, mostly differing in whether the boolean means "ramp" or "don't ramp". Also, yours has the nice property that the user can select either behavior at compile time, or add a menu item... while mine only offers the old behavior or a menu item.

I'm hoping to merge other branches at the moment, but I left a note in the code pointing back to this as a possible improvement for later, because it's a good idea.

Unmerged revisions

621. By Sven Greiner

Make moon ramping behavior configurable during runtime

620. By Sven Greiner

Add option to stop ramping up from moon

With `#undef MOON_START_RAMPING` entering moon from off by holding the
switch will not automatically start ramping up. This ensures that moon
is entered reliably when the switch is held long enough.

Timings still apply (you can release the switch when the light turns on
or when it blips, depending on the configured timing).

619. By Sven Greiner

Add runtime configuration of 2C turbo style

This adds a new configuration option to the global configuration menu if
`USE_2C_STYLE_CONFIG` is defined. The user can select between 0 (no
change), 1 (Anduril 1 behavior) and 2 (Anduril 2) behavior. The default
is taken from `USE_2C_MAX_TURBO` if it is defined.

If `USE_2C_STYLE_CONFIG` is not defined, this creates the same output as
before (no increase in code size).

Also add dynamic setup of the global configuration menu.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: