~gabe/flashlight-firmware/anduril2

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/anduril.c

  • Committer: Selene Scriven
  • Date: 2018-09-29 06:52:55 UTC
  • Revision ID: bzr@toykeeper.net-20180929065255-h0lu85nuzd33vw8h
Fixed ramp style toggle going to the wrong level when at moon.

Show diffs side-by-side

added added

removed removed

Lines of Context:
524
524
    // 3 clicks: toggle smooth vs discrete ramping
525
525
    else if (event == EV_3clicks) {
526
526
        ramp_style = !ramp_style;
527
 
        memorized_level = nearest_level(memorized_level);
 
527
        memorized_level = nearest_level(actual_level);
528
528
        #ifdef USE_THERMAL_REGULATION
529
529
        target_level = memorized_level;
530
530
        #ifdef USE_SET_LEVEL_GRADUALLY