1
// misc.c: Misc extra functions for Anduril.
2
// Copyright (C) 2017-2023 Selene ToyKeeper
3
// SPDX-License-Identifier: GPL-3.0-or-later
10
void blink_confirm(uint8_t num) {
11
uint8_t brightness = actual_level;
12
uint8_t bump = actual_level + BLINK_BRIGHTNESS;
13
if (bump > MAX_LEVEL) bump = 0;
14
for (; num>0; num--) {
17
set_level(brightness);
18
if (num > 1) { delay_4ms(100/4); }
23
// make a short, visible pulse
24
// (either brighter or darker, depending on current brightness)
26
uint8_t brightness = actual_level;
27
uint8_t bump = brightness + BLINK_BRIGHTNESS;
28
if (bump > MAX_LEVEL) bump = 0;
31
delay_4ms(BLINK_ONCE_TIME/4);
32
set_level(brightness);
35
// Just go dark for a moment to indicate to user that something happened
37
uint8_t temp = actual_level;