~toykeeper/flashlight-firmware/fsm

« back to all changes in this revision

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

  • Committer: Selene ToyKeeper
  • Date: 2023-11-04 15:09:10 UTC
  • mfrom: (483.1.175 anduril2)
  • Revision ID: bzr@toykeeper.net-20231104150910-ddd3afw4nhfvof2l
merged anduril2 branch -> fsm, with *years* of changes
(this also means this code is now Anduril 2 instead of Anduril 1)

Show diffs side-by-side

added added

removed removed

Lines of Context:
152
152
        PWM1_LVL = 0;  PWM2_LVL = 0;  // make sure emitters are off
153
153
        // sleep 1 second after user stops pressing buttons
154
154
        if (arg > TICKS_PER_SECOND) { go_to_standby = 1; }
155
 
        return MISCHIEF_MANAGED;
 
155
        return EVENT_HANDLED;
156
156
    }
157
157
    // 4 clicks: exit, and turn on at "low" level
158
158
    else if (event == EV_4clicks) {
159
159
        set_state(steady_state, 1);
160
 
        return MISCHIEF_MANAGED;
 
160
        return EVENT_HANDLED;
161
161
    }
162
162
    return EVENT_NOT_HANDLED;
163
163
}