1
// sunset-timer.h: Sunset / candle auto-shutoff functions for Anduril.
2
// Copyright (C) 2017-2023 Selene ToyKeeper
3
// SPDX-License-Identifier: GPL-3.0-or-later
7
// how many minutes to add each time the user "bumps" the timer?
8
#define SUNSET_TIMER_UNIT 5
10
#define TICKS_PER_MINUTE (TICKS_PER_SECOND*60)
12
// automatic shutoff timer
13
uint8_t sunset_timer = 0; // minutes remaining in countdown
14
uint8_t sunset_timer_peak = 0; // total minutes in countdown
15
uint16_t sunset_ticks = 0; // counts from 0 to TICKS_PER_MINUTE, then repeats
16
uint8_t sunset_timer_state(Event event, uint16_t arg);