~digitalcircuit/flashlight-firmware/anduril2_define_autolock

« back to all changes in this revision

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

  • Committer: Selene Scriven
  • Date: 2021-01-25 05:21:06 UTC
  • mfrom: (575.1.13 k9.3)
  • Revision ID: bzr@toykeeper.net-20210125052106-g6la42mdcu9dl42r
merged noctigon k9.3 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
// make a short, visible pulse
40
40
// (either brighter or darker, depending on current brightness)
 
41
#ifndef BLINK_ONCE_TIME
 
42
#define BLINK_ONCE_TIME 10
 
43
#endif
41
44
void blink_once() {
42
45
    uint8_t brightness = actual_level;
43
46
    uint8_t bump = brightness + (MAX_LEVEL/6);
44
47
    if (bump > MAX_LEVEL) bump = 0;
45
48
 
46
49
    set_level(bump);
47
 
    delay_4ms(10/4);
 
50
    delay_4ms(BLINK_ONCE_TIME/4);
48
51
    set_level(brightness);
49
52
}
50
53