483.12.14
by Selene ToyKeeper
switched the rest of FSM + Anduril to use SPDX license headers |
1 |
// strobe-modes-fsm.h: FSM config for strobe modes in Anduril.
|
2 |
// Copyright (C) 2017-2023 Selene ToyKeeper
|
|
3 |
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
483.1.10
by Selene Scriven
started refactoring anduril into individual files... |
4 |
|
483.12.14
by Selene ToyKeeper
switched the rest of FSM + Anduril to use SPDX license headers |
5 |
#pragma once
|
483.1.10
by Selene Scriven
started refactoring anduril into individual files... |
6 |
|
7 |
// enable the random number generator if we need it
|
|
8 |
#if defined(USE_LIGHTNING_MODE) || defined(USE_CANDLE_MODE)
|
|
9 |
#define USE_PSEUDO_RAND
|
|
10 |
#endif
|
|
11 |
||
483.1.11
by Selene Scriven
more progress on refactoring Anduril into separate files... nearly done with the initial split |
12 |
// party strobe uses really short pulses
|
13 |
#ifdef USE_PARTY_STROBE_MODE
|
|
14 |
#define USE_DELAY_ZERO
|
|
15 |
#endif
|
|
16 |
||
17 |
// candle mode is basically a bunch of stacked random triangle waves
|
|
18 |
#if defined(USE_CANDLE_MODE)
|
|
19 |
#define USE_TRIANGLE_WAVE
|
|
20 |
#endif
|
|
21 |
||
483.1.10
by Selene Scriven
started refactoring anduril into individual files... |
22 |
// the presence of strobe mode(s) affects how many eeprom bytes we need,
|
23 |
// so it's relevant for FSM configuration
|
|
24 |
#if defined(USE_CANDLE_MODE) || defined(USE_BIKE_FLASHER_MODE) || defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE) || defined(USE_LIGHTNING_MODE)
|
|
25 |
#define USE_STROBE_STATE
|
|
26 |
#endif
|
|
27 |
||
483.12.96
by Selene ToyKeeper
added channel mode per strobe mode, and made FSM channel mode more flexible, |
28 |
// internal numbering for strobe modes
|
29 |
#ifdef USE_STROBE_STATE
|
|
30 |
typedef enum { |
|
31 |
#ifdef USE_PARTY_STROBE_MODE
|
|
32 |
party_strobe_e, |
|
33 |
#endif
|
|
34 |
#ifdef USE_TACTICAL_STROBE_MODE
|
|
35 |
tactical_strobe_e, |
|
36 |
#endif
|
|
37 |
#ifdef USE_POLICE_COLOR_STROBE_MODE
|
|
38 |
police_color_strobe_e, |
|
39 |
#endif
|
|
40 |
#ifdef USE_LIGHTNING_MODE
|
|
41 |
lightning_storm_e, |
|
42 |
#endif
|
|
43 |
#ifdef USE_CANDLE_MODE
|
|
44 |
candle_mode_e, |
|
45 |
#endif
|
|
46 |
#ifdef USE_BIKE_FLASHER_MODE
|
|
47 |
bike_flasher_e, |
|
48 |
#endif
|
|
49 |
strobe_mode_END
|
|
50 |
} strobe_mode_te; |
|
51 |
||
52 |
//const int NUM_STROBES = strobe_mode_END;
|
|
53 |
#define NUM_STROBES strobe_mode_END
|
|
54 |
#endif
|
|
55 |