1
// strobe-modes.h: Strobe modes for Anduril.
2
// Copyright (C) 2017-2023 Selene ToyKeeper
3
// SPDX-License-Identifier: GPL-3.0-or-later
7
#ifdef USE_STROBE_STATE
9
strobe_mode_te current_strobe_type;
11
// which strobe mode is active?
12
#ifdef USE_CANDLE_MODE
13
#define DEFAULT_STROBE candle_mode_e
15
#define DEFAULT_STROBE 0
18
#endif // ifdef USE_STROBE_STATE
21
// full FET strobe can be a bit much... use max regulated level instead,
22
// if there's a bright enough regulated level
23
#ifndef STROBE_BRIGHTNESS
25
#define STROBE_BRIGHTNESS MAX_Nx7135
27
#define STROBE_BRIGHTNESS MAX_LEVEL
31
// some drivers need to keep the regulator chip on between pulses,
32
// so set this to 1 to keep the light on at moon mode between pulses,
33
// and thus keep the regulator powered up for the next flash
34
#ifndef STROBE_OFF_LEVEL
35
#define STROBE_OFF_LEVEL 0
38
// party and tactical strobes
39
#ifdef USE_STROBE_STATE
40
uint8_t strobe_state(Event event, uint16_t arg);
41
inline void strobe_state_iter();
44
#if defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE)
45
inline void party_tactical_strobe_mode_iter(uint8_t st);
48
#ifdef USE_POLICE_COLOR_STROBE_MODE
49
inline void police_color_strobe_iter();
52
#ifdef USE_LIGHTNING_MODE
53
inline void lightning_storm_iter();
56
// bike mode config options
57
#ifdef USE_BIKE_FLASHER_MODE
58
#define MAX_BIKING_LEVEL 120 // should be 127 or less
59
inline void bike_flasher_iter();
62
#ifdef USE_CANDLE_MODE
63
#include "candle-mode.h"
67
#if defined(USE_POLICE_STROBE_MODE) || defined(USE_SOS_MODE_IN_FF_GROUP)
68
#define USE_BORING_STROBE_STATE
69
#include "ff-strobe-modes.h"