~toykeeper/flashlight-firmware/fsm

« back to all changes in this revision

Viewing changes to ToyKeeper/spaghetti-monster/anduril/strobe-modes-fsm.h

  • Committer: Selene ToyKeeper
  • Date: 2023-11-02 17:05:02 UTC
  • mfrom: (483.12.159 multi-channel)
  • mto: This revision was merged to the branch mainline in revision 491.
  • Revision ID: bzr@toykeeper.net-20231102170502-sinkm18qjxlorsxa
merged multi-channel branch with a major refactor and half a year of updates

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * strobe-modes-fsm.h: FSM config for strobe modes in Anduril.
3
 
 *
4
 
 * Copyright (C) 2017 Selene Scriven
5
 
 *
6
 
 * This program is free software: you can redistribute it and/or modify
7
 
 * it under the terms of the GNU General Public License as published by
8
 
 * the Free Software Foundation, either version 3 of the License, or
9
 
 * (at your option) any later version.
10
 
 *
11
 
 * This program is distributed in the hope that it will be useful,
12
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 * GNU General Public License for more details.
15
 
 *
16
 
 * You should have received a copy of the GNU General Public License
17
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
 
 */
 
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
19
4
 
20
 
#ifndef STROBE_MODES_FSM_H
21
 
#define STROBE_MODES_FSM_H
 
5
#pragma once
22
6
 
23
7
// enable the random number generator if we need it
24
8
#if defined(USE_LIGHTNING_MODE) || defined(USE_CANDLE_MODE)
41
25
#define USE_STROBE_STATE
42
26
#endif
43
27
 
 
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
44
54
#endif
 
55