aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-04-17 00:08:32 -0600
committerSelene ToyKeeper2023-04-17 00:08:32 -0600
commit583854e37efde7f461e073e735a1736b02d28c70 (patch)
tree48ed76e428e3ddb126f88f8b0028f39391d84d9f /spaghetti-monster
parentreduced ROM by ~600 bytes by moving all eeprom config values to a "cfg" struct (diff)
downloadanduril-583854e37efde7f461e073e735a1736b02d28c70.tar.gz
anduril-583854e37efde7f461e073e735a1736b02d28c70.tar.bz2
anduril-583854e37efde7f461e073e735a1736b02d28c70.zip
switched the rest of FSM + Anduril to use SPDX license headers
instead of full GPL headers (or all too often, nothing at all) There are a few "FIXME" entries where I'm not sure about the correct copyright.
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/anduril/anduril.c23
-rw-r--r--spaghetti-monster/anduril/aux-leds.c28
-rw-r--r--spaghetti-monster/anduril/aux-leds.h27
-rw-r--r--spaghetti-monster/anduril/battcheck-mode-fsm.h27
-rw-r--r--spaghetti-monster/anduril/battcheck-mode.c28
-rw-r--r--spaghetti-monster/anduril/battcheck-mode.h27
-rw-r--r--spaghetti-monster/anduril/beacon-mode.c28
-rw-r--r--spaghetti-monster/anduril/beacon-mode.h27
-rw-r--r--spaghetti-monster/anduril/candle-mode.c28
-rw-r--r--spaghetti-monster/anduril/candle-mode.h27
-rw-r--r--spaghetti-monster/anduril/cfg-blf-gt-mini.h4
-rw-r--r--spaghetti-monster/anduril/cfg-blf-gt.h4
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern-t1616.h4
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern.h4
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8-t1616.h4
-rw-r--r--spaghetti-monster/anduril/cfg-blf-q8.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d1.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d18-219.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d18.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d1s.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d1v2-7135-fet.h6
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d1v2-linear-fet.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d1v2-nofet.h6
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4-219c.h6
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4s-219c.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4s.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4sv2-219.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp-fet.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4sv2.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4v2-219.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4v2-nofet.h4
-rw-r--r--spaghetti-monster/anduril/cfg-emisar-d4v2.h5
-rw-r--r--spaghetti-monster/anduril/cfg-ff-e01.h4
-rw-r--r--spaghetti-monster/anduril/cfg-ff-pl47-219.h4
-rw-r--r--spaghetti-monster/anduril/cfg-ff-pl47.h4
-rw-r--r--spaghetti-monster/anduril/cfg-ff-pl47g2.h4
-rw-r--r--spaghetti-monster/anduril/cfg-ff-rot66-219.h4
-rw-r--r--spaghetti-monster/anduril/cfg-ff-rot66.h4
-rw-r--r--spaghetti-monster/anduril/cfg-ff-rot66g2.h4
-rw-r--r--spaghetti-monster/anduril/cfg-fw3a-219.h4
-rw-r--r--spaghetti-monster/anduril/cfg-fw3a-nofet.h4
-rw-r--r--spaghetti-monster/anduril/cfg-fw3a.h4
-rw-r--r--spaghetti-monster/anduril/cfg-fw3x-lume1.h7
-rw-r--r--spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h4
-rw-r--r--spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h4
-rw-r--r--spaghetti-monster/anduril/cfg-mateminco-mf01s.h4
-rw-r--r--spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-dm11-12v.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-dm11-nofet.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-dm11-sbt90.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-dm11.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k1-12v.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k1.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k9.3-219.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k9.3-nofet.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-219.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-fet.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-nofet.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k9.3.c5
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-k9.3.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-kr4-12v.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-kr4-219.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-kr4-219b.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-kr4-tintramp.h4
-rw-r--r--spaghetti-monster/anduril/cfg-noctigon-kr4.h4
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.c22
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.h4
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-sc21-pro.h4
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h4
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h4
-rw-r--r--spaghetti-monster/anduril/cfg-sofirn-sp36.h4
-rw-r--r--spaghetti-monster/anduril/cfg-thefreeman-lin16dac.h4
-rw-r--r--spaghetti-monster/anduril/cfg-wurkkos-ts10.h6
-rw-r--r--spaghetti-monster/anduril/cfg-wurkkos-ts25.h6
-rw-r--r--spaghetti-monster/anduril/channel-modes.c10
-rw-r--r--spaghetti-monster/anduril/channel-modes.h8
-rw-r--r--spaghetti-monster/anduril/config-default.h25
-rw-r--r--spaghetti-monster/anduril/factory-reset-fsm.h26
-rw-r--r--spaghetti-monster/anduril/ff-strobe-modes.c27
-rw-r--r--spaghetti-monster/anduril/ff-strobe-modes.h26
-rw-r--r--spaghetti-monster/anduril/hank-cfg.h2
-rw-r--r--spaghetti-monster/anduril/lockout-mode-fsm.h26
-rw-r--r--spaghetti-monster/anduril/lockout-mode.c29
-rw-r--r--spaghetti-monster/anduril/lockout-mode.h26
-rw-r--r--spaghetti-monster/anduril/misc.c27
-rw-r--r--spaghetti-monster/anduril/misc.h26
-rw-r--r--spaghetti-monster/anduril/momentary-mode.c27
-rw-r--r--spaghetti-monster/anduril/momentary-mode.h26
-rw-r--r--spaghetti-monster/anduril/off-mode.c29
-rw-r--r--spaghetti-monster/anduril/off-mode.h26
-rw-r--r--spaghetti-monster/anduril/ramp-mode-fsm.h28
-rw-r--r--spaghetti-monster/anduril/sos-mode.c27
-rw-r--r--spaghetti-monster/anduril/sos-mode.h26
-rw-r--r--spaghetti-monster/anduril/strobe-modes-fsm.h25
-rw-r--r--spaghetti-monster/anduril/strobe-modes.c29
-rw-r--r--spaghetti-monster/anduril/strobe-modes.h27
-rw-r--r--spaghetti-monster/anduril/tactical-mode.c27
-rw-r--r--spaghetti-monster/anduril/tactical-mode.h26
-rw-r--r--spaghetti-monster/anduril/tempcheck-mode.c27
-rw-r--r--spaghetti-monster/anduril/tempcheck-mode.h26
-rw-r--r--spaghetti-monster/anduril/tint-ramping.c8
-rw-r--r--spaghetti-monster/anduril/tint-ramping.h8
-rw-r--r--spaghetti-monster/anduril/version-check-mode.c27
-rw-r--r--spaghetti-monster/anduril/version-check-mode.h26
-rw-r--r--spaghetti-monster/fsm-adc.c27
-rw-r--r--spaghetti-monster/fsm-adc.h27
-rw-r--r--spaghetti-monster/fsm-eeprom.c28
-rw-r--r--spaghetti-monster/fsm-eeprom.h25
-rw-r--r--spaghetti-monster/fsm-events.c27
-rw-r--r--spaghetti-monster/fsm-events.h26
-rw-r--r--spaghetti-monster/fsm-main.c27
-rw-r--r--spaghetti-monster/fsm-main.h25
-rw-r--r--spaghetti-monster/fsm-misc.c26
-rw-r--r--spaghetti-monster/fsm-misc.h25
-rw-r--r--spaghetti-monster/fsm-pcint.c26
-rw-r--r--spaghetti-monster/fsm-pcint.h25
-rw-r--r--spaghetti-monster/fsm-ramping.c11
-rw-r--r--spaghetti-monster/fsm-ramping.h22
-rw-r--r--spaghetti-monster/fsm-random.c25
-rw-r--r--spaghetti-monster/fsm-random.h25
-rw-r--r--spaghetti-monster/fsm-standby.c27
-rw-r--r--spaghetti-monster/fsm-standby.h25
-rw-r--r--spaghetti-monster/fsm-states.c25
-rw-r--r--spaghetti-monster/fsm-states.h27
-rw-r--r--spaghetti-monster/fsm-wdt.c27
-rw-r--r--spaghetti-monster/fsm-wdt.h25
-rw-r--r--spaghetti-monster/spaghetti-monster.h22
131 files changed, 534 insertions, 1319 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index e180cc4..bd05ede 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -1,22 +1,7 @@
-/*
- * Anduril: Narsil-inspired UI for SpaghettiMonster.
- * (Anduril is Aragorn's sword, the blade Narsil reforged)
- *
- * Copyright (C) 2017-2020 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// Anduril: Narsil-inspired UI for SpaghettiMonster.
+// (Anduril is Aragorn's sword, the blade Narsil reforged)
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
/*
* Usually a program would be structured like this...
diff --git a/spaghetti-monster/anduril/aux-leds.c b/spaghetti-monster/anduril/aux-leds.c
index bb184f9..d9b23d0 100644
--- a/spaghetti-monster/anduril/aux-leds.c
+++ b/spaghetti-monster/anduril/aux-leds.c
@@ -1,24 +1,7 @@
-/*
- * aux-leds.c: Aux LED functions for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef AUX_LEDS_C
-#define AUX_LEDS_C
+// aux-leds.c: Aux LED functions for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#include "aux-leds.h"
@@ -208,6 +191,3 @@ void rgb_led_voltage_readout(uint8_t bright) {
}
#endif
-
-#endif
-
diff --git a/spaghetti-monster/anduril/aux-leds.h b/spaghetti-monster/anduril/aux-leds.h
index f496ddc..1938557 100644
--- a/spaghetti-monster/anduril/aux-leds.h
+++ b/spaghetti-monster/anduril/aux-leds.h
@@ -1,24 +1,7 @@
-/*
- * aux-leds.h: Aux LED functions for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef AUX_LEDS_H
-#define AUX_LEDS_H
+// aux-leds.h: Aux LED functions for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#if defined(USE_INDICATOR_LED) && defined(TICK_DURING_STANDBY)
void indicator_led_update(uint8_t mode, uint8_t tick);
@@ -78,5 +61,3 @@ const PROGMEM uint8_t rgb_led_colors[] = {
#endif
#endif
-
-#endif
diff --git a/spaghetti-monster/anduril/battcheck-mode-fsm.h b/spaghetti-monster/anduril/battcheck-mode-fsm.h
index 8f19e12..4ab8f06 100644
--- a/spaghetti-monster/anduril/battcheck-mode-fsm.h
+++ b/spaghetti-monster/anduril/battcheck-mode-fsm.h
@@ -1,26 +1,7 @@
-/*
- * battcheck-mode-fsm.h: FSM config for battery check mode in Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef BATTCHECK_MODE_FSM_H
-#define BATTCHECK_MODE_FSM_H
+// battcheck-mode-fsm.h: FSM config for battery check mode in Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#define USE_BATTCHECK
-
-#endif
diff --git a/spaghetti-monster/anduril/battcheck-mode.c b/spaghetti-monster/anduril/battcheck-mode.c
index 5edc6f4..9eb82fe 100644
--- a/spaghetti-monster/anduril/battcheck-mode.c
+++ b/spaghetti-monster/anduril/battcheck-mode.c
@@ -1,24 +1,7 @@
-/*
- * battcheck-mode.c: Battery check mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef BATTCHECK_MODE_C
-#define BATTCHECK_MODE_C
+// battcheck-mode.c: Battery check mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#include "battcheck-mode.h"
@@ -77,6 +60,3 @@ uint8_t voltage_config_state(Event event, uint16_t arg) {
}
#endif // #ifdef USE_VOLTAGE_CORRECTION
-
-#endif
-
diff --git a/spaghetti-monster/anduril/battcheck-mode.h b/spaghetti-monster/anduril/battcheck-mode.h
index 965ffd9..b505b68 100644
--- a/spaghetti-monster/anduril/battcheck-mode.h
+++ b/spaghetti-monster/anduril/battcheck-mode.h
@@ -1,24 +1,7 @@
-/*
- * battcheck-mode.h: Battery check mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef BATTCHECK_MODE_H
-#define BATTCHECK_MODE_H
+// battcheck-mode.h: Battery check mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
uint8_t battcheck_state(Event event, uint16_t arg);
@@ -27,5 +10,3 @@ void voltage_config_save(uint8_t step, uint8_t value);
uint8_t voltage_config_state(Event event, uint16_t arg);
#endif
-
-#endif
diff --git a/spaghetti-monster/anduril/beacon-mode.c b/spaghetti-monster/anduril/beacon-mode.c
index 76ada0f..6359b74 100644
--- a/spaghetti-monster/anduril/beacon-mode.c
+++ b/spaghetti-monster/anduril/beacon-mode.c
@@ -1,24 +1,7 @@
-/*
- * beacon-mode.c: Beacon mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef BEACON_MODE_C
-#define BEACON_MODE_C
+// beacon-mode.c: Beacon mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#include "beacon-mode.h"
@@ -68,6 +51,3 @@ uint8_t beacon_state(Event event, uint16_t arg) {
return EVENT_NOT_HANDLED;
}
-
-#endif
-
diff --git a/spaghetti-monster/anduril/beacon-mode.h b/spaghetti-monster/anduril/beacon-mode.h
index c0f0b18..df047ad 100644
--- a/spaghetti-monster/anduril/beacon-mode.h
+++ b/spaghetti-monster/anduril/beacon-mode.h
@@ -1,28 +1,9 @@
-/*
- * beacon-mode.h: Beacon mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef BEACON_MODE_H
-#define BEACON_MODE_H
+// beacon-mode.h: Beacon mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
// beacon mode
uint8_t beacon_state(Event event, uint16_t arg);
inline void beacon_mode_iter();
-
-#endif
diff --git a/spaghetti-monster/anduril/candle-mode.c b/spaghetti-monster/anduril/candle-mode.c
index 12ffa84..bfb0377 100644
--- a/spaghetti-monster/anduril/candle-mode.c
+++ b/spaghetti-monster/anduril/candle-mode.c
@@ -1,24 +1,7 @@
-/*
- * candle-mode.c: Candle mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef CANDLE_MODE_C
-#define CANDLE_MODE_C
+// candle-mode.c: Candle mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#include "candle-mode.h"
@@ -151,6 +134,3 @@ uint8_t candle_mode_state(Event event, uint16_t arg) {
return EVENT_NOT_HANDLED;
}
-
-#endif
-
diff --git a/spaghetti-monster/anduril/candle-mode.h b/spaghetti-monster/anduril/candle-mode.h
index 8859a9c..aab237d 100644
--- a/spaghetti-monster/anduril/candle-mode.h
+++ b/spaghetti-monster/anduril/candle-mode.h
@@ -1,24 +1,7 @@
-/*
- * candle-mode.h: Candle mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef CANDLE_MODE_H
-#define CANDLE_MODE_H
+// candle-mode.h: Candle mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#ifndef CANDLE_AMPLITUDE
#define CANDLE_AMPLITUDE 25
@@ -28,5 +11,3 @@ uint8_t candle_mode_state(Event event, uint16_t arg);
// moved to fsm-misc.c because it's also used for tint ramping power correction
//uint8_t triangle_wave(uint8_t phase);
-
-#endif
diff --git a/spaghetti-monster/anduril/cfg-blf-gt-mini.h b/spaghetti-monster/anduril/cfg-blf-gt-mini.h
index a647ea5..4158f21 100644
--- a/spaghetti-monster/anduril/cfg-blf-gt-mini.h
+++ b/spaghetti-monster/anduril/cfg-blf-gt-mini.h
@@ -1,4 +1,8 @@
// BLF/Lumintop GT Mini config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "hwdef-BLF_GT_Mini.h"
// Same as an Emisar D1S, except it has a lighted button
#include "cfg-emisar-d1s.h"
diff --git a/spaghetti-monster/anduril/cfg-blf-gt.h b/spaghetti-monster/anduril/cfg-blf-gt.h
index 977d877..425ecdc 100644
--- a/spaghetti-monster/anduril/cfg-blf-gt.h
+++ b/spaghetti-monster/anduril/cfg-blf-gt.h
@@ -1,4 +1,8 @@
// BLF GT config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0321"
#include "hwdef-BLF_GT.h"
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h
index 06d5395..18caa5b 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h
@@ -1,4 +1,8 @@
// BLF Lantern config options for Anduril using the Attiny1616
+// Copyright (C) 2021-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0622"
#include "hwdef-BLF_LT1-t1616.h"
// ATTINY: 1616
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h
index 251c0db..c6b7bc8 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern.h
@@ -1,4 +1,8 @@
// BLF Lantern config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0621"
#include "hwdef-BLF_LT1.h"
// ATTINY: 85
diff --git a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
index 204066d..a88ab24 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h
@@ -1,4 +1,8 @@
// BLF Q8 config options for Anduril using the Attiny1616
+// Copyright (C) 2021-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0613"
#include "hwdef-BLF_Q8-T1616.h"
// ATTINY: 1616
diff --git a/spaghetti-monster/anduril/cfg-blf-q8.h b/spaghetti-monster/anduril/cfg-blf-q8.h
index a9c48f6..166c8ca 100644
--- a/spaghetti-monster/anduril/cfg-blf-q8.h
+++ b/spaghetti-monster/anduril/cfg-blf-q8.h
@@ -1,4 +1,8 @@
// BLF Q8 config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0611"
#include "hwdef-BLF_Q8.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d1.h b/spaghetti-monster/anduril/cfg-emisar-d1.h
index 2427773..3bcf6a5 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d1.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d1.h
@@ -1,4 +1,8 @@
// Emisar D1 config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "hwdef-Emisar_D1.h"
// same as Emisar D4, mostly
#include "cfg-emisar-d4.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d18-219.h b/spaghetti-monster/anduril/cfg-emisar-d18-219.h
index 1f3a3c2..126e9f4 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d18-219.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d18-219.h
@@ -1,4 +1,8 @@
// Emisar D18 (FET+13+1) reduced-FET config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-emisar-d18.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0142"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d18.h b/spaghetti-monster/anduril/cfg-emisar-d18.h
index 6644513..d59199c 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d18.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d18.h
@@ -1,4 +1,8 @@
// Emisar D18 (FET+13+1) config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0141"
#include "hwdef-Emisar_D18.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d1s.h b/spaghetti-monster/anduril/cfg-emisar-d1s.h
index 47cecf6..43d8160 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d1s.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d1s.h
@@ -1,4 +1,8 @@
// Emisar D1S config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "hwdef-Emisar_D1S.h"
// same as Emisar D4, mostly
#include "cfg-emisar-d4.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d1v2-7135-fet.h b/spaghetti-monster/anduril/cfg-emisar-d1v2-7135-fet.h
index aa9780b..15464db 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d1v2-7135-fet.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d1v2-7135-fet.h
@@ -1,7 +1,11 @@
// Emisar D1v2 (7135+FET) config options for Anduril
-// (was only made for a short time, not many people have one)
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// ATTINY: 1634
// same as Emisar D4v2, mostly
+// (was only made for a short time, not many people have one)
#include "cfg-emisar-d4v2.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0123"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d1v2-linear-fet.h b/spaghetti-monster/anduril/cfg-emisar-d1v2-linear-fet.h
index 5dd5a2e..c8864bf 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d1v2-linear-fet.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d1v2-linear-fet.h
@@ -1,5 +1,9 @@
// Emisar D1v2 (linear+FET) config options for Anduril
// (2022 re-issue / update of old D1)
+// Copyright (C) 2022-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// ATTINY: 1634
// similar to a Noctigon KR4, sort of
#include "cfg-noctigon-kr4.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d1v2-nofet.h b/spaghetti-monster/anduril/cfg-emisar-d1v2-nofet.h
index 1c7aec9..ede1b67 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d1v2-nofet.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d1v2-nofet.h
@@ -1,5 +1,9 @@
-// Emisar D1v2 (linear+FET) config options for Anduril
+// Emisar D1v2 (linear only, no DDFET) config options for Anduril
// (2022 re-issue / update of old D1)
+// Copyright (C) 2022-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// ATTINY: 1634
// similar to a Noctigon KR4, sort of
#include "cfg-noctigon-kr4-nofet.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4-219c.h b/spaghetti-monster/anduril/cfg-emisar-d4-219c.h
index e525d86..65649e3 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4-219c.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4-219c.h
@@ -1,5 +1,9 @@
// Emisar D4-219C config options for Anduril
-// same as D4S but with FET modes limited to 80% power
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+// same as D4 but with FET modes limited to 80% power
// to avoid destroying the LEDs
#include "cfg-emisar-d4.h"
#undef MODEL_NUMBER
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4.h b/spaghetti-monster/anduril/cfg-emisar-d4.h
index e77ac38..15a72ac 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4.h
@@ -1,4 +1,8 @@
// Emisar D4 config options for Anduril
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0111"
#include "hwdef-Emisar_D4.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4s-219c.h b/spaghetti-monster/anduril/cfg-emisar-d4s-219c.h
index 6489b34..f86c1b1 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4s-219c.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4s-219c.h
@@ -1,4 +1,8 @@
// Emisar D4S-219C config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// same as D4S but with FET modes limited to 80% power
// to avoid destroying the LEDs
#include "cfg-emisar-d4s.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4s.h b/spaghetti-monster/anduril/cfg-emisar-d4s.h
index 3c82460..a3dc65f 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4s.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4s.h
@@ -1,4 +1,8 @@
// Emisar D4S config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0131"
#include "hwdef-Emisar_D4S.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4sv2-219.h b/spaghetti-monster/anduril/cfg-emisar-d4sv2-219.h
index 54a2e6b..22775cc 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4sv2-219.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4sv2-219.h
@@ -1,4 +1,8 @@
// Emisar D4Sv2-219 config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-emisar-d4sv2.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0134"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp-fet.h b/spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp-fet.h
index 657e25d..437387c 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp-fet.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp-fet.h
@@ -1,4 +1,8 @@
// Emisar D4S V2 tint-ramping (plus FET) config options for Anduril (based on Noctigon K9.3)
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-emisar-d4sv2-tintramp.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0136"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp.h b/spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp.h
index 3e54dca..bfbcba0 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4sv2-tintramp.h
@@ -1,4 +1,8 @@
// Emisar D4S V2 tint-ramping config options for Anduril (based on Noctigon K9.3)
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0135"
#include "hwdef-Emisar_D4Sv2-tintramp.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4sv2.h b/spaghetti-monster/anduril/cfg-emisar-d4sv2.h
index 5f18fbc..1bf2c2e 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4sv2.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4sv2.h
@@ -1,4 +1,8 @@
// Emisar D4S V2 config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0133"
#include "hwdef-Emisar_D4Sv2.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4v2-219.h b/spaghetti-monster/anduril/cfg-emisar-d4v2-219.h
index dad84f0..e9775ec 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4v2-219.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4v2-219.h
@@ -1,4 +1,8 @@
// Emisar D4v2-219 config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-emisar-d4v2.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0114"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4v2-nofet.h b/spaghetti-monster/anduril/cfg-emisar-d4v2-nofet.h
index 5e33a05..9c6f0b0 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4v2-nofet.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4v2-nofet.h
@@ -1,4 +1,8 @@
// Emisar D4v2-noFET config options for Anduril
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-emisar-d4v2.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0115"
diff --git a/spaghetti-monster/anduril/cfg-emisar-d4v2.h b/spaghetti-monster/anduril/cfg-emisar-d4v2.h
index 54de297..670482c 100644
--- a/spaghetti-monster/anduril/cfg-emisar-d4v2.h
+++ b/spaghetti-monster/anduril/cfg-emisar-d4v2.h
@@ -1,6 +1,7 @@
-// Emisar D4 config options for Anduril
-// Copyright (C) 2019 Selene ToyKeeper
+// Emisar D4v2 config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#define MODEL_NUMBER "0113"
#include "hwdef-Emisar_D4v2.h"
diff --git a/spaghetti-monster/anduril/cfg-ff-e01.h b/spaghetti-monster/anduril/cfg-ff-e01.h
index f26bfb4..6d561b2 100644
--- a/spaghetti-monster/anduril/cfg-ff-e01.h
+++ b/spaghetti-monster/anduril/cfg-ff-e01.h
@@ -1,4 +1,8 @@
// Fireflies E01 SST-40 thrower config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// most of the good stuff is in the FFUI config; just copy it
#include "../fireflies-ui/cfg-ff-e01.h"
#undef MODEL_NUMBER
diff --git a/spaghetti-monster/anduril/cfg-ff-pl47-219.h b/spaghetti-monster/anduril/cfg-ff-pl47-219.h
index efba8d3..11bd5b1 100644
--- a/spaghetti-monster/anduril/cfg-ff-pl47-219.h
+++ b/spaghetti-monster/anduril/cfg-ff-pl47-219.h
@@ -1,4 +1,8 @@
// Fireflies PL47-219B config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// same as PL47 but with FET modes limited to 67% power
// to avoid destroying the LEDs
#include "cfg-ff-pl47.h"
diff --git a/spaghetti-monster/anduril/cfg-ff-pl47.h b/spaghetti-monster/anduril/cfg-ff-pl47.h
index 54827cf..4ecee44 100644
--- a/spaghetti-monster/anduril/cfg-ff-pl47.h
+++ b/spaghetti-monster/anduril/cfg-ff-pl47.h
@@ -1,4 +1,8 @@
// Fireflies PL47 config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0421"
#include "hwdef-FF_PL47.h"
diff --git a/spaghetti-monster/anduril/cfg-ff-pl47g2.h b/spaghetti-monster/anduril/cfg-ff-pl47g2.h
index c11ba28..923afac 100644
--- a/spaghetti-monster/anduril/cfg-ff-pl47g2.h
+++ b/spaghetti-monster/anduril/cfg-ff-pl47g2.h
@@ -1,4 +1,8 @@
// Fireflies PL47 G2 config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0423"
#include "hwdef-FF_PL47.h"
diff --git a/spaghetti-monster/anduril/cfg-ff-rot66-219.h b/spaghetti-monster/anduril/cfg-ff-rot66-219.h
index 086f8ac..4dad4e2 100644
--- a/spaghetti-monster/anduril/cfg-ff-rot66-219.h
+++ b/spaghetti-monster/anduril/cfg-ff-rot66-219.h
@@ -1,4 +1,8 @@
// Fireflies ROT66-219 (7x7135) config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// same as regular ROT66, but calibrated for Nichia 219B with 7x7135 chips
#include "cfg-ff-rot66.h"
#undef MODEL_NUMBER
diff --git a/spaghetti-monster/anduril/cfg-ff-rot66.h b/spaghetti-monster/anduril/cfg-ff-rot66.h
index d386f17..f357956 100644
--- a/spaghetti-monster/anduril/cfg-ff-rot66.h
+++ b/spaghetti-monster/anduril/cfg-ff-rot66.h
@@ -1,4 +1,8 @@
// Fireflies ROT66 (14x7135) config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0411"
#include "hwdef-FF_ROT66.h"
diff --git a/spaghetti-monster/anduril/cfg-ff-rot66g2.h b/spaghetti-monster/anduril/cfg-ff-rot66g2.h
index 9737cc4..dca180d 100644
--- a/spaghetti-monster/anduril/cfg-ff-rot66g2.h
+++ b/spaghetti-monster/anduril/cfg-ff-rot66g2.h
@@ -1,4 +1,8 @@
// Fireflies ROT66 G2 config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-ff-rot66.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0413"
diff --git a/spaghetti-monster/anduril/cfg-fw3a-219.h b/spaghetti-monster/anduril/cfg-fw3a-219.h
index c9bf0c1..88739bf 100644
--- a/spaghetti-monster/anduril/cfg-fw3a-219.h
+++ b/spaghetti-monster/anduril/cfg-fw3a-219.h
@@ -1,4 +1,8 @@
// FW3A-219 config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-fw3a.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0312"
diff --git a/spaghetti-monster/anduril/cfg-fw3a-nofet.h b/spaghetti-monster/anduril/cfg-fw3a-nofet.h
index 7752c10..e828ac5 100644
--- a/spaghetti-monster/anduril/cfg-fw3a-nofet.h
+++ b/spaghetti-monster/anduril/cfg-fw3a-nofet.h
@@ -1,4 +1,8 @@
// FW3A with the FET disabled
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-fw3a.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0313"
diff --git a/spaghetti-monster/anduril/cfg-fw3a.h b/spaghetti-monster/anduril/cfg-fw3a.h
index 24a77c0..f75fe13 100644
--- a/spaghetti-monster/anduril/cfg-fw3a.h
+++ b/spaghetti-monster/anduril/cfg-fw3a.h
@@ -1,4 +1,8 @@
// FW3A config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0311"
#include "hwdef-FW3A.h"
diff --git a/spaghetti-monster/anduril/cfg-fw3x-lume1.h b/spaghetti-monster/anduril/cfg-fw3x-lume1.h
index 2f90920..280c433 100644
--- a/spaghetti-monster/anduril/cfg-fw3x-lume1.h
+++ b/spaghetti-monster/anduril/cfg-fw3x-lume1.h
@@ -1,4 +1,9 @@
-/* lume1 for FW3x config options for Anduril
+// lume1 for FW3x config options for Anduril
+// Copyright (C) 2020-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
+/*
* Constant current Buck-Boost + FET driver
* For more information: www.loneoceans.com/labs/
* Datasheets:
diff --git a/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h b/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h
index 9036d26..eb17399 100644
--- a/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h
+++ b/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h
@@ -1,4 +1,8 @@
// gChart's custom FET+1 driver config options for Anduril
+// Copyright (C) 2020-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "1618" // Golden Ratio... because I can
#include "hwdef-gchart-fet1-t1616.h"
// ATTINY: 1616
diff --git a/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h b/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h
index 894ebaf..47ff84b 100644
--- a/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h
+++ b/spaghetti-monster/anduril/cfg-mateminco-mf01-mini.h
@@ -1,4 +1,8 @@
// Mateminco/Astrolux MF01-Mini options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0521"
#include "hwdef-Mateminco_MF01-Mini.h"
diff --git a/spaghetti-monster/anduril/cfg-mateminco-mf01s.h b/spaghetti-monster/anduril/cfg-mateminco-mf01s.h
index 49dbcf0..20bcccd 100644
--- a/spaghetti-monster/anduril/cfg-mateminco-mf01s.h
+++ b/spaghetti-monster/anduril/cfg-mateminco-mf01s.h
@@ -1,4 +1,8 @@
// Mateminco/Astrolux MF01S options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0511"
#include "hwdef-Mateminco_MF01S.h"
diff --git a/spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h b/spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h
index d7264a2..fef1af6 100644
--- a/spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h
+++ b/spaghetti-monster/anduril/cfg-mateminco-mt35-mini.h
@@ -1,4 +1,8 @@
// Mateminco MT35 Mini / Astrolux FT03
+// Copyright (C) 2022-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0531"
#include "hwdef-Mateminco_MT35-Mini.h"
// ATTINY: 85
diff --git a/spaghetti-monster/anduril/cfg-noctigon-dm11-12v.h b/spaghetti-monster/anduril/cfg-noctigon-dm11-12v.h
index bd41660..e0fc162 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-dm11-12v.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-dm11-12v.h
@@ -1,4 +1,8 @@
// Noctigon DM11 (12V) config options for Anduril
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0273"
#include "hwdef-Noctigon_DM11-12V.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-dm11-nofet.h b/spaghetti-monster/anduril/cfg-noctigon-dm11-nofet.h
index 5a828d6..ad71fa9 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-dm11-nofet.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-dm11-nofet.h
@@ -1,4 +1,8 @@
// Noctigon DM11-noFET config options for Anduril
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-noctigon-dm11.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0272"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-dm11-sbt90.h b/spaghetti-monster/anduril/cfg-noctigon-dm11-sbt90.h
index 92c1ded..5a978b5 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-dm11-sbt90.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-dm11-sbt90.h
@@ -1,4 +1,8 @@
// Noctigon DM11-SBT90.2 config options for Anduril
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0274"
#include "hwdef-Noctigon_DM11-SBT90.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-dm11.h b/spaghetti-monster/anduril/cfg-noctigon-dm11.h
index 4c746c9..d9b0b8c 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-dm11.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-dm11.h
@@ -1,4 +1,8 @@
// Noctigon DM11 config options for Anduril
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0271"
#include "hwdef-Noctigon_DM11.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h b/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h
index 7f8f4cf..dbd0353 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k1-12v.h
@@ -1,4 +1,8 @@
// Noctigon K1 12V config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0253"
#include "hwdef-Noctigon_K1-12V.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h b/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h
index 9207dbc..81063fa 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k1-sbt90.h
@@ -1,4 +1,8 @@
// Noctigon K1-SBT90.2 config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// (is a K1 host with a KR4-like driver and a really high-powered LED)
#define MODEL_NUMBER "0252"
#include "hwdef-Noctigon_K1-SBT90.h"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k1.h b/spaghetti-monster/anduril/cfg-noctigon-k1.h
index fb2a89c..93244a6 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k1.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k1.h
@@ -1,4 +1,8 @@
// Noctigon K1 config options for Anduril
+// Copyright (C) 2019-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0251"
// (originally known as Emisar D1S v2)
#include "hwdef-Noctigon_K1.h"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k9.3-219.h b/spaghetti-monster/anduril/cfg-noctigon-k9.3-219.h
index a88ad2c..2f8bdc0 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k9.3-219.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k9.3-219.h
@@ -1,4 +1,8 @@
// Noctigon K9.3 (reduced FET) config options for Anduril
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-noctigon-k9.3.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0263"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k9.3-nofet.h b/spaghetti-monster/anduril/cfg-noctigon-k9.3-nofet.h
index e91ebc4..ece2bb2 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k9.3-nofet.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k9.3-nofet.h
@@ -1,4 +1,8 @@
// Noctigon K9.3 (noFET) config options for Anduril
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-noctigon-k9.3.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0262"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-219.h b/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-219.h
index 04efa83..4eb8c86 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-219.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-219.h
@@ -1,4 +1,8 @@
// Noctigon K9.3 tint-ramping (reduced FET) config options for Anduril
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-noctigon-k9.3-tintramp-fet.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0267"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-fet.h b/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-fet.h
index 8535c57..0c8f3c8 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-fet.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-fet.h
@@ -1,4 +1,8 @@
// Noctigon K9.3 tint-ramping (plus FET) config options for Anduril
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-noctigon-k9.3-tintramp-nofet.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0266"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-nofet.h b/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-nofet.h
index 21ab415..b505701 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-nofet.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k9.3-tintramp-nofet.h
@@ -1,4 +1,8 @@
// Noctigon K9.3 noFET tint-ramping config options for Anduril
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0265"
#include "hwdef-Emisar_D4Sv2-tintramp.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k9.3.c b/spaghetti-monster/anduril/cfg-noctigon-k9.3.c
index d79c03f..d30d397 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k9.3.c
+++ b/spaghetti-monster/anduril/cfg-noctigon-k9.3.c
@@ -1,4 +1,9 @@
#error This build is broken.
+// Noctigon K9.3 code overrides for Anduril
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
/*
* K9.3 has unusual power channels, so it must override some of FSM's code.
* There are two sets of LEDs:
diff --git a/spaghetti-monster/anduril/cfg-noctigon-k9.3.h b/spaghetti-monster/anduril/cfg-noctigon-k9.3.h
index f3a6cdd..dfe1d18 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-k9.3.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-k9.3.h
@@ -1,4 +1,8 @@
// Noctigon K9.3 config options for Anduril
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0261"
#include "hwdef-Noctigon_K9.3.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4-12v.h b/spaghetti-monster/anduril/cfg-noctigon-kr4-12v.h
index a513b3f..52a031d 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-kr4-12v.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-kr4-12v.h
@@ -1,5 +1,9 @@
// Noctigon KR4 (12V) config options for Anduril
// (and Noctigon KR1)
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0216"
#include "hwdef-Noctigon_KR4-12V.h"
// ATTINY: 1634
diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4-219.h b/spaghetti-monster/anduril/cfg-noctigon-kr4-219.h
index 28fc595..5d106ef 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-kr4-219.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-kr4-219.h
@@ -1,4 +1,8 @@
// Noctigon KR4 (reduced FET) config options for Anduril
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-noctigon-kr4.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0213"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4-219b.h b/spaghetti-monster/anduril/cfg-noctigon-kr4-219b.h
index 39ac57c..b242048 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-kr4-219b.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-kr4-219b.h
@@ -1,4 +1,8 @@
// Noctigon KR4 (reduced FET) config options for Anduril
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-noctigon-kr4.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0214"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h b/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h
index e4879ef..701d93f 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h
@@ -1,4 +1,8 @@
// Noctigon KR4 (fetless) config options for Anduril
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// (and Noctigon KR1)
// (and Emisar D4v2 E21A, a.k.a. "D4v2.5")
#include "cfg-noctigon-kr4.h"
diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4-tintramp.h b/spaghetti-monster/anduril/cfg-noctigon-kr4-tintramp.h
index f19744d..c36df47 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-kr4-tintramp.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-kr4-tintramp.h
@@ -1,4 +1,8 @@
// Noctigon KR4 tint-ramping config options for Anduril
+// Copyright (C) 2021-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// (basically the same as Emisar D4S V2 tint-ramping,
// but switch on a different pin, and no lighted button)
// ATTINY: 1634
diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4.h b/spaghetti-monster/anduril/cfg-noctigon-kr4.h
index 8071457..d5d7f8c 100644
--- a/spaghetti-monster/anduril/cfg-noctigon-kr4.h
+++ b/spaghetti-monster/anduril/cfg-noctigon-kr4.h
@@ -1,5 +1,9 @@
// Noctigon KR4 config options for Anduril
// (and Emisar D4v2.5, which uses KR4 driver plus a button LED)
+// Copyright (C) 2020-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0211"
#include "hwdef-Noctigon_KR4.h"
#include "hank-cfg.h"
diff --git a/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.c b/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.c
deleted file mode 100644
index 571bbdc..0000000
--- a/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.c
+++ /dev/null
@@ -1,22 +0,0 @@
-// this is inserted into fsm-ramping.c :: set_level()
-// (it overrides part of the function, but not all of it)
-uint8_t output_mux; // pre-define this variable since the overrides file gets included before the ramp-mode.h file
-inline void set_level_override(uint8_t level) {
- if (level == 0) { // off
- TINT1_LVL = 0; // disable the first white channel
- TINT2_LVL = 0; // disable the second white channel
- PWM3_LVL = 0; // disable the red LEDs
- } else {
- level --;
-
- if (output_mux == 0) { // main white LEDs
- PWM3_LVL = 0; // disable the red LEDs
- PWM1_LVL = PWM_GET(pwm1_levels, level); // get the PWM value
- update_tint(); // set the warm-cool level balance
- } else { // red LEDs
- TINT1_LVL = 0; // disable the first white channel
- TINT2_LVL = 0; // disable the second white channel
- PWM3_LVL = PWM_GET(pwm1_levels, level); // set the red LED PWM
- }
- }
-} \ No newline at end of file
diff --git a/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.h b/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.h
index 282dca2..993619a 100644
--- a/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.h
+++ b/spaghetti-monster/anduril/cfg-sofirn-lt1s-pro.h
@@ -1,4 +1,6 @@
-// Sofirn LT1S Pro
+// Sofirn LT1S Pro config file for Anduril
+// Copyright (C) 2022-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#define MODEL_NUMBER "0623"
diff --git a/spaghetti-monster/anduril/cfg-sofirn-sc21-pro.h b/spaghetti-monster/anduril/cfg-sofirn-sc21-pro.h
index cee8172..8fd2dee 100644
--- a/spaghetti-monster/anduril/cfg-sofirn-sc21-pro.h
+++ b/spaghetti-monster/anduril/cfg-sofirn-sc21-pro.h
@@ -1,4 +1,8 @@
// Sofirn SC21 Pro - same setup as a Wurkkos TS10, but with the aux indicator on while ramping
+// Copyright (C) 2022-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#include "cfg-wurkkos-ts10.h"
#undef MODEL_NUMBER
#define MODEL_NUMBER "0632"
diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h
index c1f1ed8..3a02fc2 100644
--- a/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h
+++ b/spaghetti-monster/anduril/cfg-sofirn-sp10-pro.h
@@ -1,4 +1,8 @@
// Sofirn SP10 Pro config options for Anduril
+// Copyright (C) 2022-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0631"
#include "hwdef-Sofirn_SP10-Pro.h"
// ATTINY: 1616
diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h b/spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h
index ce1c04a..cb29e4f 100644
--- a/spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h
+++ b/spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h
@@ -1,4 +1,8 @@
// Sofirn SP36 (small Q8) config options for Anduril using the Attiny1616
+// Copyright (C) 2021-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// same as the BLF Q8, mostly
#include "cfg-blf-q8-t1616.h"
#undef MODEL_NUMBER
diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp36.h b/spaghetti-monster/anduril/cfg-sofirn-sp36.h
index af8c18b..3661686 100644
--- a/spaghetti-monster/anduril/cfg-sofirn-sp36.h
+++ b/spaghetti-monster/anduril/cfg-sofirn-sp36.h
@@ -1,4 +1,8 @@
// Sofirn SP36 (small Q8) config options for Anduril
+// Copyright (C) 2018-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// same as the BLF Q8, mostly
#include "cfg-blf-q8.h"
#undef MODEL_NUMBER
diff --git a/spaghetti-monster/anduril/cfg-thefreeman-lin16dac.h b/spaghetti-monster/anduril/cfg-thefreeman-lin16dac.h
index 64dcd8c..2e155ec 100644
--- a/spaghetti-monster/anduril/cfg-thefreeman-lin16dac.h
+++ b/spaghetti-monster/anduril/cfg-thefreeman-lin16dac.h
@@ -1,4 +1,8 @@
// thefreeman's Linear 16 driver using DAC control
+// Copyright (C) 2021-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0000" // TBD
#include "hwdef-thefreeman-lin16dac.h"
// ATTINY: 1616
diff --git a/spaghetti-monster/anduril/cfg-wurkkos-ts10.h b/spaghetti-monster/anduril/cfg-wurkkos-ts10.h
index 6f92abf..bef2ad8 100644
--- a/spaghetti-monster/anduril/cfg-wurkkos-ts10.h
+++ b/spaghetti-monster/anduril/cfg-wurkkos-ts10.h
@@ -1,4 +1,8 @@
// Wurkkos TS10 (originally used Sofirn SP36-t1616 firmware) config options for Anduril using the Attiny1616
+// Copyright (C) 2022-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
// same as the BLF Q8 T1616, mostly (added Dynamic PWM)
#define MODEL_NUMBER "0714"
#include "hwdef-Wurkkos_TS10.h"
@@ -79,4 +83,4 @@
#endif
#ifdef BLINK_AT_RAMP_CEIL
#undef BLINK_AT_RAMP_CEIL
-#endif \ No newline at end of file
+#endif
diff --git a/spaghetti-monster/anduril/cfg-wurkkos-ts25.h b/spaghetti-monster/anduril/cfg-wurkkos-ts25.h
index a339cdb..3196a9a 100644
--- a/spaghetti-monster/anduril/cfg-wurkkos-ts25.h
+++ b/spaghetti-monster/anduril/cfg-wurkkos-ts25.h
@@ -1,4 +1,8 @@
// Wurkkos TS25, modelled after the TS10 but with RGB Aux
+// Copyright (C) 2022-2023 (FIXME)
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
+
#define MODEL_NUMBER "0715"
#include "hwdef-Wurkkos_TS25.h"
// ATTINY: 1616
@@ -75,4 +79,4 @@
#endif
#ifdef BLINK_AT_RAMP_CEIL
#undef BLINK_AT_RAMP_CEIL
-#endif \ No newline at end of file
+#endif
diff --git a/spaghetti-monster/anduril/channel-modes.c b/spaghetti-monster/anduril/channel-modes.c
index f3a21cf..51f294c 100644
--- a/spaghetti-monster/anduril/channel-modes.c
+++ b/spaghetti-monster/anduril/channel-modes.c
@@ -1,14 +1,11 @@
-/*
- * channel-modes.c: Multi-channel functions for Anduril.
- * Copyright (C) 2017-2023 Selene ToyKeeper
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
+// channel-modes.c: Multi-channel functions for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include "channel-modes.h"
-
uint8_t channel_mode_state(Event event, uint16_t arg) {
#ifdef USE_CHANNEL_MODE_ARGS
static int8_t tint_ramp_direction = 1;
@@ -144,3 +141,4 @@ uint8_t channel_mode_config_state(Event event, uint16_t arg) {
);
}
#endif
+
diff --git a/spaghetti-monster/anduril/channel-modes.h b/spaghetti-monster/anduril/channel-modes.h
index c10af5b..67d6bbb 100644
--- a/spaghetti-monster/anduril/channel-modes.h
+++ b/spaghetti-monster/anduril/channel-modes.h
@@ -1,8 +1,6 @@
-/*
- * channel-modes.h: Multi-channel functions for Anduril.
- * Copyright (C) 2017-2023 Selene ToyKeeper
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
+// channel-modes.h: Multi-channel functions for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
diff --git a/spaghetti-monster/anduril/config-default.h b/spaghetti-monster/anduril/config-default.h
index 171c8b3..514b9a8 100644
--- a/spaghetti-monster/anduril/config-default.h
+++ b/spaghetti-monster/anduril/config-default.h
@@ -1,24 +1,8 @@
-/*
- * config-default.h: Default configuration for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// config-default.h: Default configuration for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef CONFIG_DEFAULT_H
-#define CONFIG_DEFAULT_H
+#pragma once
/*
* This file specifies the default settings for Anduril.
@@ -197,4 +181,3 @@
// those oscillations
//#define USE_LOWPASS_WHILE_ASLEEP
-#endif
diff --git a/spaghetti-monster/anduril/factory-reset-fsm.h b/spaghetti-monster/anduril/factory-reset-fsm.h
index a8fb0d9..3cb0875 100644
--- a/spaghetti-monster/anduril/factory-reset-fsm.h
+++ b/spaghetti-monster/anduril/factory-reset-fsm.h
@@ -1,28 +1,10 @@
-/*
- * factory-reset-fsm.h: FSM config options to enable factory reset in Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// factory-reset-fsm.h: FSM config options to enable factory reset in Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FACTORY_RESET_FSM_H
-#define FACTORY_RESET_FSM_H
+#pragma once
#ifdef USE_SOFT_FACTORY_RESET
#define USE_REBOOT
#endif
-
-#endif
diff --git a/spaghetti-monster/anduril/ff-strobe-modes.c b/spaghetti-monster/anduril/ff-strobe-modes.c
index 4c12630..9e7f2bb 100644
--- a/spaghetti-monster/anduril/ff-strobe-modes.c
+++ b/spaghetti-monster/anduril/ff-strobe-modes.c
@@ -1,24 +1,8 @@
-/*
- * ff-strobe-modes.c: Fireflies Flashlights strobe modes for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// ff-strobe-modes.c: Fireflies Flashlights strobe modes for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FF_STROBE_MODES_C
-#define FF_STROBE_MODES_C
+#pragma once
#include "ff-strobe-modes.h"
@@ -76,6 +60,3 @@ inline void police_strobe_iter() {
}
#endif
-
-#endif
-
diff --git a/spaghetti-monster/anduril/ff-strobe-modes.h b/spaghetti-monster/anduril/ff-strobe-modes.h
index a3e0a27..d7adfec 100644
--- a/spaghetti-monster/anduril/ff-strobe-modes.h
+++ b/spaghetti-monster/anduril/ff-strobe-modes.h
@@ -1,24 +1,8 @@
-/*
- * ff-strobe-modes.h: Fireflies Flashlights strobe modes for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// ff-strobe-modes.h: Fireflies Flashlights strobe modes for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FF_STROBE_MODES_H
-#define FF_STROBE_MODES_H
+#pragma once
uint8_t boring_strobe_state(Event event, uint16_t arg);
inline void boring_strobe_state_iter();
@@ -29,5 +13,3 @@ inline void police_strobe_iter();
#endif
#define NUM_BORING_STROBES 2
-
-#endif
diff --git a/spaghetti-monster/anduril/hank-cfg.h b/spaghetti-monster/anduril/hank-cfg.h
index f24ea67..f6b626a 100644
--- a/spaghetti-monster/anduril/hank-cfg.h
+++ b/spaghetti-monster/anduril/hank-cfg.h
@@ -1,5 +1,5 @@
// Intl-Outdoor (Hank)'s config options for Anduril
-// Copyright (C) 2021 Selene ToyKeeper
+// Copyright (C) 2021-2023 Selene ToyKeeper
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
diff --git a/spaghetti-monster/anduril/lockout-mode-fsm.h b/spaghetti-monster/anduril/lockout-mode-fsm.h
index bc18ed3..ede251c 100644
--- a/spaghetti-monster/anduril/lockout-mode-fsm.h
+++ b/spaghetti-monster/anduril/lockout-mode-fsm.h
@@ -1,29 +1,11 @@
-/*
- * lockout-mode-fsm.h: FSM config for lockout mode in Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// lockout-mode-fsm.h: FSM config for lockout mode in Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef LOCKOUT_MODE_FSM_H
-#define LOCKOUT_MODE_FSM_H
+#pragma once
// autolock function requires the ability to measure time while "off"
#ifdef USE_AUTOLOCK
#define TICK_DURING_STANDBY
#endif
-
-#endif
diff --git a/spaghetti-monster/anduril/lockout-mode.c b/spaghetti-monster/anduril/lockout-mode.c
index 3bf7ce0..2439580 100644
--- a/spaghetti-monster/anduril/lockout-mode.c
+++ b/spaghetti-monster/anduril/lockout-mode.c
@@ -1,24 +1,8 @@
-/*
- * lockout-mode.c: Lockout mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef LOCKOUT_MODE_C
-#define LOCKOUT_MODE_C
+// lockout-mode.c: Lockout mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
#include "lockout-mode.h"
@@ -215,6 +199,3 @@ uint8_t autolock_config_state(Event event, uint16_t arg) {
}
#endif // #ifdef USE_AUTOLOCK
-
-#endif
-
diff --git a/spaghetti-monster/anduril/lockout-mode.h b/spaghetti-monster/anduril/lockout-mode.h
index 37b02ab..c2703a0 100644
--- a/spaghetti-monster/anduril/lockout-mode.h
+++ b/spaghetti-monster/anduril/lockout-mode.h
@@ -1,24 +1,8 @@
-/*
- * lockout-mode.h: Lockout mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// lockout-mode.h: Lockout mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef LOCKOUT_MODE_H
-#define LOCKOUT_MODE_H
+#pragma once
// soft lockout
uint8_t lockout_state(Event event, uint16_t arg);
@@ -30,5 +14,3 @@ uint8_t lockout_state(Event event, uint16_t arg);
uint8_t autolock_config_state(Event event, uint16_t arg);
#endif
-
-#endif
diff --git a/spaghetti-monster/anduril/misc.c b/spaghetti-monster/anduril/misc.c
index 9c7f0dd..d78c542 100644
--- a/spaghetti-monster/anduril/misc.c
+++ b/spaghetti-monster/anduril/misc.c
@@ -1,24 +1,8 @@
-/*
- * misc.c: Misc extra functions for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// misc.c: Misc extra functions for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef MISC_C
-#define MISC_C
+#pragma once
#include "misc.h"
@@ -62,6 +46,3 @@ void blip() {
set_level(temp);
}
-
-#endif
-
diff --git a/spaghetti-monster/anduril/misc.h b/spaghetti-monster/anduril/misc.h
index 5febbc7..0f2992a 100644
--- a/spaghetti-monster/anduril/misc.h
+++ b/spaghetti-monster/anduril/misc.h
@@ -1,28 +1,10 @@
-/*
- * misc.h: Misc extra functions for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// misc.h: Misc extra functions for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef MISC_H
-#define MISC_H
+#pragma once
//void blink_confirm(uint8_t num); // no longer used
void blink_once();
void blip();
-
-#endif
diff --git a/spaghetti-monster/anduril/momentary-mode.c b/spaghetti-monster/anduril/momentary-mode.c
index 08879a1..2d8d57b 100644
--- a/spaghetti-monster/anduril/momentary-mode.c
+++ b/spaghetti-monster/anduril/momentary-mode.c
@@ -1,24 +1,8 @@
-/*
- * momentary-mode.c: Momentary mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// momentary-mode.c: Momentary mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef MOMENTARY_MODE_C
-#define MOMENTARY_MODE_C
+#pragma once
#include "momentary-mode.h"
@@ -81,6 +65,3 @@ uint8_t momentary_state(Event event, uint16_t arg) {
return EVENT_NOT_HANDLED;
}
-
-#endif
-
diff --git a/spaghetti-monster/anduril/momentary-mode.h b/spaghetti-monster/anduril/momentary-mode.h
index c5ccf0f..d774801 100644
--- a/spaghetti-monster/anduril/momentary-mode.h
+++ b/spaghetti-monster/anduril/momentary-mode.h
@@ -1,29 +1,11 @@
-/*
- * momentary-mode.h: Momentary mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// momentary-mode.h: Momentary mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef MOMENTARY_MODE_H
-#define MOMENTARY_MODE_H
+#pragma once
// momentary / signalling mode
uint8_t momentary_state(Event event, uint16_t arg);
uint8_t momentary_mode = 0; // 0 = ramping, 1 = strobe
uint8_t momentary_active = 0; // boolean, true if active *right now*
-
-#endif
diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c
index d9ab5cb..103e29d 100644
--- a/spaghetti-monster/anduril/off-mode.c
+++ b/spaghetti-monster/anduril/off-mode.c
@@ -1,24 +1,8 @@
-/*
- * off-mode.c: "Off" mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef OFF_MODE_C
-#define OFF_MODE_C
+// off-mode.c: "Off" mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
#include "off-mode.h"
@@ -363,6 +347,3 @@ uint8_t off_state(Event event, uint16_t arg) {
return EVENT_NOT_HANDLED;
}
-
-#endif
-
diff --git a/spaghetti-monster/anduril/off-mode.h b/spaghetti-monster/anduril/off-mode.h
index 776173c..71d45eb 100644
--- a/spaghetti-monster/anduril/off-mode.h
+++ b/spaghetti-monster/anduril/off-mode.h
@@ -1,27 +1,9 @@
-/*
- * off-mode.h: "Off" mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// off-mode.h: "Off" mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef OFF_MODE_H
-#define OFF_MODE_H
+#pragma once
// when the light is "off" or in standby
uint8_t off_state(Event event, uint16_t arg);
-
-#endif
diff --git a/spaghetti-monster/anduril/ramp-mode-fsm.h b/spaghetti-monster/anduril/ramp-mode-fsm.h
index 1a062e9..8fb80d1 100644
--- a/spaghetti-monster/anduril/ramp-mode-fsm.h
+++ b/spaghetti-monster/anduril/ramp-mode-fsm.h
@@ -1,24 +1,8 @@
-/*
- * ramp-mode-fsm.h: FSM config for ramping functions in Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef RAMP_MODE_FSM_H
-#define RAMP_MODE_FSM_H
+// ramp-mode-fsm.h: FSM config for ramping functions in Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
// enable FSM's ramping features
#define USE_RAMPING
@@ -51,5 +35,3 @@
#define USE_GLOBALS_CONFIG
#endif
-
-#endif
diff --git a/spaghetti-monster/anduril/sos-mode.c b/spaghetti-monster/anduril/sos-mode.c
index 97245c7..4704297 100644
--- a/spaghetti-monster/anduril/sos-mode.c
+++ b/spaghetti-monster/anduril/sos-mode.c
@@ -1,24 +1,8 @@
-/*
- * sos-mode.c: SOS mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// sos-mode.c: SOS mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef SOS_MODE_C
-#define SOS_MODE_C
+#pragma once
#include "sos-mode.h"
@@ -70,6 +54,3 @@ inline void sos_mode_iter() {
nice_delay_ms(2000);
}
-
-#endif
-
diff --git a/spaghetti-monster/anduril/sos-mode.h b/spaghetti-monster/anduril/sos-mode.h
index 397aa3f..5af61be 100644
--- a/spaghetti-monster/anduril/sos-mode.h
+++ b/spaghetti-monster/anduril/sos-mode.h
@@ -1,29 +1,11 @@
-/*
- * sos-mode.h: SOS mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// sos-mode.h: SOS mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef SOS_MODE_H
-#define SOS_MODE_H
+#pragma once
#ifdef USE_SOS_MODE_IN_BLINKY_GROUP
// automatic SOS emergency signal
uint8_t sos_state(Event event, uint16_t arg);
#endif
-
-#endif
diff --git a/spaghetti-monster/anduril/strobe-modes-fsm.h b/spaghetti-monster/anduril/strobe-modes-fsm.h
index 002a951..da513a4 100644
--- a/spaghetti-monster/anduril/strobe-modes-fsm.h
+++ b/spaghetti-monster/anduril/strobe-modes-fsm.h
@@ -1,24 +1,8 @@
-/*
- * strobe-modes-fsm.h: FSM config for strobe modes in Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// strobe-modes-fsm.h: FSM config for strobe modes in Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef STROBE_MODES_FSM_H
-#define STROBE_MODES_FSM_H
+#pragma once
// enable the random number generator if we need it
#if defined(USE_LIGHTNING_MODE) || defined(USE_CANDLE_MODE)
@@ -41,4 +25,3 @@
#define USE_STROBE_STATE
#endif
-#endif
diff --git a/spaghetti-monster/anduril/strobe-modes.c b/spaghetti-monster/anduril/strobe-modes.c
index 0664418..9963c80 100644
--- a/spaghetti-monster/anduril/strobe-modes.c
+++ b/spaghetti-monster/anduril/strobe-modes.c
@@ -1,24 +1,8 @@
-/*
- * strobe-modes.c: Strobe modes for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef STROBE_MODES_C
-#define STROBE_MODES_C
+// strobe-modes.c: Strobe modes for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
#include "strobe-modes.h"
@@ -326,6 +310,3 @@ inline void bike_flasher_iter() {
#include "ff-strobe-modes.c"
#endif
-
-#endif
-
diff --git a/spaghetti-monster/anduril/strobe-modes.h b/spaghetti-monster/anduril/strobe-modes.h
index 0e7c873..9144d0e 100644
--- a/spaghetti-monster/anduril/strobe-modes.h
+++ b/spaghetti-monster/anduril/strobe-modes.h
@@ -1,24 +1,8 @@
-/*
- * strobe-modes.h: Strobe modes for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef STROBE_MODES_H
-#define STROBE_MODES_H
+// strobe-modes.h: Strobe modes for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
// internal numbering for strobe modes
#ifdef USE_STROBE_STATE
@@ -106,4 +90,3 @@ inline void bike_flasher_iter();
#include "ff-strobe-modes.h"
#endif
-#endif
diff --git a/spaghetti-monster/anduril/tactical-mode.c b/spaghetti-monster/anduril/tactical-mode.c
index 2447a11..2f5c3b0 100644
--- a/spaghetti-monster/anduril/tactical-mode.c
+++ b/spaghetti-monster/anduril/tactical-mode.c
@@ -1,24 +1,8 @@
-/*
- * tactical-mode.c: Tactical (ish) mode for Anduril.
- *
- * Copyright (C) 2023 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// tactical-mode.c: Tactical (ish) mode for Anduril.
+// Copyright (C) 2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef TACTICAL_MODE_C
-#define TACTICAL_MODE_C
+#pragma once
#include "tactical-mode.h"
@@ -118,6 +102,3 @@ uint8_t tactical_config_state(Event event, uint16_t arg) {
return config_state_base(event, arg, 3, tactical_config_save);
}
-
-#endif
-
diff --git a/spaghetti-monster/anduril/tactical-mode.h b/spaghetti-monster/anduril/tactical-mode.h
index 14bf7ff..8972202 100644
--- a/spaghetti-monster/anduril/tactical-mode.h
+++ b/spaghetti-monster/anduril/tactical-mode.h
@@ -1,24 +1,8 @@
-/*
- * tactical-mode.h: Tactical mode for Anduril.
- *
- * Copyright (C) 2023 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// tactical-mode.h: Tactical mode for Anduril.
+// Copyright (C) 2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef TACTICAL_MODE_H
-#define TACTICAL_MODE_H
+#pragma once
#ifndef TACTICAL_LEVELS
// high, low, tactical strobe
@@ -29,5 +13,3 @@
uint8_t tactical_state(Event event, uint16_t arg);
uint8_t tactical_config_state(Event event, uint16_t arg);
-
-#endif
diff --git a/spaghetti-monster/anduril/tempcheck-mode.c b/spaghetti-monster/anduril/tempcheck-mode.c
index 2e3b56f..4a413c9 100644
--- a/spaghetti-monster/anduril/tempcheck-mode.c
+++ b/spaghetti-monster/anduril/tempcheck-mode.c
@@ -1,24 +1,8 @@
-/*
- * tempcheck-mode.c: Temperature check mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// tempcheck-mode.c: Temperature check mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef TEMPCHECK_MODE_C
-#define TEMPCHECK_MODE_C
+#pragma once
#include "tempcheck-mode.h"
@@ -70,6 +54,3 @@ uint8_t thermal_config_state(Event event, uint16_t arg) {
2, thermal_config_save);
}
-
-#endif
-
diff --git a/spaghetti-monster/anduril/tempcheck-mode.h b/spaghetti-monster/anduril/tempcheck-mode.h
index 83edd9c..15dd03e 100644
--- a/spaghetti-monster/anduril/tempcheck-mode.h
+++ b/spaghetti-monster/anduril/tempcheck-mode.h
@@ -1,24 +1,8 @@
-/*
- * tempcheck-mode.h: Temperature check mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// tempcheck-mode.h: Temperature check mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef TEMPCHECK_MODE_H
-#define TEMPCHECK_MODE_H
+#pragma once
#define USE_BLINK_NUM // FIXME: this only matters in an earlier header
@@ -26,5 +10,3 @@ uint8_t tempcheck_state(Event event, uint16_t arg);
uint8_t thermal_config_state(Event event, uint16_t arg);
void thermal_config_save(uint8_t step, uint8_t value);
-
-#endif
diff --git a/spaghetti-monster/anduril/tint-ramping.c b/spaghetti-monster/anduril/tint-ramping.c
index 13f5d29..9418113 100644
--- a/spaghetti-monster/anduril/tint-ramping.c
+++ b/spaghetti-monster/anduril/tint-ramping.c
@@ -1,8 +1,6 @@
-/*
- * tint-ramping.c: Tint ramping functions for Anduril.
- * Copyright (C) 2017-2023 Selene ToyKeeper
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
+// tint-ramping.c: Tint ramping functions for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
diff --git a/spaghetti-monster/anduril/tint-ramping.h b/spaghetti-monster/anduril/tint-ramping.h
index 9b7f9a8..19b8dde 100644
--- a/spaghetti-monster/anduril/tint-ramping.h
+++ b/spaghetti-monster/anduril/tint-ramping.h
@@ -1,8 +1,6 @@
-/*
- * tint-ramping.h: Tint ramping functions for Anduril.
- * Copyright (C) 2017-2023 Selene ToyKeeper
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
+// tint-ramping.h: Tint ramping functions for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
diff --git a/spaghetti-monster/anduril/version-check-mode.c b/spaghetti-monster/anduril/version-check-mode.c
index edb1723..2b7112e 100644
--- a/spaghetti-monster/anduril/version-check-mode.c
+++ b/spaghetti-monster/anduril/version-check-mode.c
@@ -1,24 +1,8 @@
-/*
- * version-check-mode.c: Version check mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// version-check-mode.c: Version check mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef VERSION_CHECK_MODE_C
-#define VERSION_CHECK_MODE_C
+#pragma once
#include "version-check-mode.h"
@@ -42,6 +26,3 @@ inline void version_check_iter() {
set_state_deferred(off_state, 0);
}
-
-#endif
-
diff --git a/spaghetti-monster/anduril/version-check-mode.h b/spaghetti-monster/anduril/version-check-mode.h
index ce02b73..db2086e 100644
--- a/spaghetti-monster/anduril/version-check-mode.h
+++ b/spaghetti-monster/anduril/version-check-mode.h
@@ -1,24 +1,8 @@
-/*
- * version-check-mode.h: Version check mode for Anduril.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// version-check-mode.h: Version check mode for Anduril.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef VERSION_CHECK_MODE_H
-#define VERSION_CHECK_MODE_H
+#pragma once
#define USE_BLINK_DIGIT // FIXME: does nothing unless defined earlier
@@ -33,5 +17,3 @@ const PROGMEM uint8_t version_number[] = VERSION_NUMBER MODEL_NUMBER;
uint8_t version_check_state(Event event, uint16_t arg);
inline void version_check_iter();
-
-#endif
diff --git a/spaghetti-monster/fsm-adc.c b/spaghetti-monster/fsm-adc.c
index 9dc8866..5b238aa 100644
--- a/spaghetti-monster/fsm-adc.c
+++ b/spaghetti-monster/fsm-adc.c
@@ -1,24 +1,8 @@
-/*
- * fsm-adc.c: ADC (voltage, temperature) functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef FSM_ADC_C
-#define FSM_ADC_C
+// fsm-adc.c: ADC (voltage, temperature) functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
// override onboard temperature sensor definition, if relevant
#ifdef USE_EXTERNAL_TEMP_SENSOR
@@ -557,4 +541,3 @@ void battcheck() {
}
#endif
-#endif
diff --git a/spaghetti-monster/fsm-adc.h b/spaghetti-monster/fsm-adc.h
index 77f625a..16666f9 100644
--- a/spaghetti-monster/fsm-adc.h
+++ b/spaghetti-monster/fsm-adc.h
@@ -1,25 +1,8 @@
-/*
- * fsm-adc.h: ADC (voltage, temperature) functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef FSM_ADC_H
-#define FSM_ADC_H
+// fsm-adc.h: ADC (voltage, temperature) functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#if defined(USE_LVP) || defined(USE_THERMAL_REGULATION)
// use raw value instead of lowpassed value for the next N measurements
@@ -120,5 +103,3 @@ inline void ADC_on();
inline void ADC_off();
inline void ADC_start_measurement();
-
-#endif
diff --git a/spaghetti-monster/fsm-eeprom.c b/spaghetti-monster/fsm-eeprom.c
index 4c734a2..66cdd78 100644
--- a/spaghetti-monster/fsm-eeprom.c
+++ b/spaghetti-monster/fsm-eeprom.c
@@ -1,24 +1,8 @@
-/*
- * fsm-eeprom.c: EEPROM API for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef FSM_EEPROM_C
-#define FSM_EEPROM_C
+// fsm-eeprom.c: EEPROM API for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
#include "fsm-eeprom.h"
@@ -126,5 +110,3 @@ void save_eeprom_wl() {
}
#endif
-
-#endif
diff --git a/spaghetti-monster/fsm-eeprom.h b/spaghetti-monster/fsm-eeprom.h
index cda290b..440d2b3 100644
--- a/spaghetti-monster/fsm-eeprom.h
+++ b/spaghetti-monster/fsm-eeprom.h
@@ -1,24 +1,8 @@
-/*
- * fsm-eeprom.h: EEPROM API for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-eeprom.h: EEPROM API for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_EEPROM_H
-#define FSM_EEPROM_H
+#pragma once
#include <avr/eeprom.h>
@@ -66,4 +50,3 @@ void save_eeprom_wl();
// if this marker isn't found, the eeprom is assumed to be blank
#define EEP_MARKER 0b10100101
-#endif
diff --git a/spaghetti-monster/fsm-events.c b/spaghetti-monster/fsm-events.c
index 3279c14..ffa93d1 100644
--- a/spaghetti-monster/fsm-events.c
+++ b/spaghetti-monster/fsm-events.c
@@ -1,24 +1,8 @@
-/*
- * fsm-events.c: Event-handling functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef FSM_EVENTS_C
-#define FSM_EVENTS_C
+// fsm-events.c: Event-handling functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
#include <util/delay_basic.h>
@@ -212,4 +196,3 @@ uint8_t nice_delay_s() {
}
*/
-#endif
diff --git a/spaghetti-monster/fsm-events.h b/spaghetti-monster/fsm-events.h
index 79a0aff..10d3317 100644
--- a/spaghetti-monster/fsm-events.h
+++ b/spaghetti-monster/fsm-events.h
@@ -1,24 +1,8 @@
-/*
- * fsm-events.h: Event-handling functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-events.h: Event-handling functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_EVENTS_H
-#define FSM_EVENTS_H
+#pragma once
#include <avr/pgmspace.h>
@@ -230,5 +214,3 @@ void delay_4ms(uint8_t ms);
#define EV_click15_hold (B_CLICK|B_HOLD|B_PRESS|15)
#define EV_click15_hold_release (B_CLICK|B_HOLD|B_RELEASE|B_TIMEOUT|15)
-
-#endif
diff --git a/spaghetti-monster/fsm-main.c b/spaghetti-monster/fsm-main.c
index fca1e83..4116d3f 100644
--- a/spaghetti-monster/fsm-main.c
+++ b/spaghetti-monster/fsm-main.c
@@ -1,24 +1,8 @@
-/*
- * fsm-main.c: main() function for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef FSM_MAIN_C
-#define FSM_MAIN_C
+// fsm-main.c: main() function for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
#include "fsm-main.h"
@@ -221,4 +205,3 @@ void handle_deferred_interrupts() {
}
}
-#endif
diff --git a/spaghetti-monster/fsm-main.h b/spaghetti-monster/fsm-main.h
index 55ae2ff..2e2a111 100644
--- a/spaghetti-monster/fsm-main.h
+++ b/spaghetti-monster/fsm-main.h
@@ -1,27 +1,10 @@
-/*
- * fsm-main.h: main() function for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-main.h: main() function for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_MAIN_H
-#define FSM_MAIN_H
+#pragma once
int main();
// needs to run frequently to execute the logic for WDT and ADC and stuff
void handle_deferred_interrupts();
-#endif
diff --git a/spaghetti-monster/fsm-misc.c b/spaghetti-monster/fsm-misc.c
index 9a10a9c..626ad43 100644
--- a/spaghetti-monster/fsm-misc.c
+++ b/spaghetti-monster/fsm-misc.c
@@ -1,25 +1,8 @@
-/*
- * fsm-misc.c: Miscellaneous function for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef FSM_MISC_C
-#define FSM_MISC_C
+// fsm-misc.c: Miscellaneous function for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+#pragma once
#ifdef USE_DYNAMIC_UNDERCLOCKING
void auto_clock_speed() {
@@ -302,4 +285,3 @@ void reboot() {
}
#endif
-#endif
diff --git a/spaghetti-monster/fsm-misc.h b/spaghetti-monster/fsm-misc.h
index 17ed66f..68929c2 100644
--- a/spaghetti-monster/fsm-misc.h
+++ b/spaghetti-monster/fsm-misc.h
@@ -1,24 +1,8 @@
-/*
- * fsm-misc.h: Miscellaneous function for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-misc.h: Miscellaneous function for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_MISC_H
-#define FSM_MISC_H
+#pragma once
#ifdef USE_DYNAMIC_UNDERCLOCKING
void auto_clock_speed();
@@ -72,4 +56,3 @@ uint8_t triangle_wave(uint8_t phase);
void reboot();
#endif
-#endif
diff --git a/spaghetti-monster/fsm-pcint.c b/spaghetti-monster/fsm-pcint.c
index 4ada5b8..131d0c3 100644
--- a/spaghetti-monster/fsm-pcint.c
+++ b/spaghetti-monster/fsm-pcint.c
@@ -1,24 +1,8 @@
-/*
- * fsm-pcint.c: PCINT (Pin Change Interrupt) functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-pcint.c: PCINT (Pin Change Interrupt) functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_PCINT_C
-#define FSM_PCINT_C
+#pragma once
#include <avr/interrupt.h>
#include <util/delay_basic.h>
@@ -110,5 +94,3 @@ void PCINT_inner(uint8_t pressed) {
ticks_since_last_event = 0;
}
-
-#endif
diff --git a/spaghetti-monster/fsm-pcint.h b/spaghetti-monster/fsm-pcint.h
index a7f3733..cd7ba02 100644
--- a/spaghetti-monster/fsm-pcint.h
+++ b/spaghetti-monster/fsm-pcint.h
@@ -1,24 +1,8 @@
-/*
- * fsm-pcint.h: PCINT (Pin Change Interrupt) functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-pcint.h: PCINT (Pin Change Interrupt) functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_PCINT_H
-#define FSM_PCINT_H
+#pragma once
volatile uint8_t irq_pcint = 0; // pin change interrupt happened?
//static volatile uint8_t button_was_pressed;
@@ -29,4 +13,3 @@ inline void PCINT_on();
inline void PCINT_off();
void PCINT_inner(uint8_t pressed);
-#endif
diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c
index 14b0db8..280e4b3 100644
--- a/spaghetti-monster/fsm-ramping.c
+++ b/spaghetti-monster/fsm-ramping.c
@@ -1,10 +1,6 @@
-/*
- * fsm-ramping.c: Ramping functions for SpaghettiMonster.
- * Handles 1- to 4-channel smooth ramping on a single LED.
- *
- * Copyright (C) 2017-2023 Selene ToyKeeper
- * SPDX-License-Identifier: GPL-3.0-or-later
- */
+// fsm-ramping.c: Ramping functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
@@ -557,3 +553,4 @@ GradualTickFuncPtr gradual_tick_modes[NUM_CHANNEL_MODES] = { GRADUAL_TICK_MODES
#endif // ifdef USE_RAMPING
+
diff --git a/spaghetti-monster/fsm-ramping.h b/spaghetti-monster/fsm-ramping.h
index 5ffd8d9..4511508 100644
--- a/spaghetti-monster/fsm-ramping.h
+++ b/spaghetti-monster/fsm-ramping.h
@@ -1,22 +1,6 @@
-/*
- * fsm-ramping.h: Ramping functions for SpaghettiMonster.
- * Handles 1- to 4-channel smooth ramping on a single LED.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-ramping.h: Ramping functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
diff --git a/spaghetti-monster/fsm-random.c b/spaghetti-monster/fsm-random.c
index 1f83bce..91fd929 100644
--- a/spaghetti-monster/fsm-random.c
+++ b/spaghetti-monster/fsm-random.c
@@ -1,24 +1,8 @@
-/*
- * fsm-random.c: Random number generator for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-random.c: Random number generator for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_RANDOM_C
-#define FSM_RANDOM_C
+#pragma once
#ifdef USE_PSEUDO_RAND
uint8_t pseudo_rand() {
@@ -30,4 +14,3 @@ uint8_t pseudo_rand() {
}
#endif
-#endif
diff --git a/spaghetti-monster/fsm-random.h b/spaghetti-monster/fsm-random.h
index 720f6f2..49aa0cf 100644
--- a/spaghetti-monster/fsm-random.h
+++ b/spaghetti-monster/fsm-random.h
@@ -1,24 +1,8 @@
-/*
- * fsm-random.h: Random number generator for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-random.h: Random number generator for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_RANDOM_H
-#define FSM_RANDOM_H
+#pragma once
#ifdef USE_PSEUDO_RAND
uint8_t pseudo_rand();
@@ -26,4 +10,3 @@ uint8_t pseudo_rand();
volatile uint8_t pseudo_rand_seed = 0;
#endif
-#endif
diff --git a/spaghetti-monster/fsm-standby.c b/spaghetti-monster/fsm-standby.c
index 0ae6a2f..50e6e30 100644
--- a/spaghetti-monster/fsm-standby.c
+++ b/spaghetti-monster/fsm-standby.c
@@ -1,24 +1,8 @@
-/*
- * fsm-standby.c: standby mode functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef FSM_STANDBY_C
-#define FSM_STANDBY_C
+// fsm-standby.c: standby mode functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
#include <avr/interrupt.h>
#include <avr/sleep.h>
@@ -114,4 +98,3 @@ void idle_mode()
}
#endif
-#endif
diff --git a/spaghetti-monster/fsm-standby.h b/spaghetti-monster/fsm-standby.h
index cd01e72..957e2e1 100644
--- a/spaghetti-monster/fsm-standby.h
+++ b/spaghetti-monster/fsm-standby.h
@@ -1,24 +1,8 @@
-/*
- * fsm-standby.h: standby mode functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-standby.h: standby mode functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_STANDBY_H
-#define FSM_STANDBY_H
+#pragma once
// deferred "off" so we won't suspend in a weird state
// (like... during the middle of a strobe pulse)
@@ -82,4 +66,3 @@ void sleep_until_eswitch_pressed();
void idle_mode();
#endif
-#endif
diff --git a/spaghetti-monster/fsm-states.c b/spaghetti-monster/fsm-states.c
index e368277..4b94ce9 100644
--- a/spaghetti-monster/fsm-states.c
+++ b/spaghetti-monster/fsm-states.c
@@ -1,24 +1,8 @@
-/*
- * fsm-states.c: State-handling functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-states.c: State-handling functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_STATES_C
-#define FSM_STATES_C
+#pragma once
#include "fsm-states.h"
#include "fsm-adc.h"
@@ -119,4 +103,3 @@ uint8_t default_state(Event event, uint16_t arg) {
}
#endif
-#endif
diff --git a/spaghetti-monster/fsm-states.h b/spaghetti-monster/fsm-states.h
index 2c51d0a..156e6cf 100644
--- a/spaghetti-monster/fsm-states.h
+++ b/spaghetti-monster/fsm-states.h
@@ -1,24 +1,8 @@
-/*
- * fsm-states.h: State-handling functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef FSM_STATES_H
-#define FSM_STATES_H
+// fsm-states.h: State-handling functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
#include "fsm-adc.h"
@@ -51,4 +35,3 @@ void set_state_deferred(StatePtr new_state, uint16_t arg);
uint8_t default_state(Event event, uint16_t arg);
#endif
-#endif
diff --git a/spaghetti-monster/fsm-wdt.c b/spaghetti-monster/fsm-wdt.c
index ea2efac..847c7fd 100644
--- a/spaghetti-monster/fsm-wdt.c
+++ b/spaghetti-monster/fsm-wdt.c
@@ -1,24 +1,8 @@
-/*
- * fsm-wdt.c: WDT (Watch Dog Timer) functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef FSM_WDT_C
-#define FSM_WDT_C
+// fsm-wdt.c: WDT (Watch Dog Timer) functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
#include <avr/interrupt.h>
#include <avr/wdt.h>
@@ -208,4 +192,3 @@ void WDT_inner() {
#endif
}
-#endif
diff --git a/spaghetti-monster/fsm-wdt.h b/spaghetti-monster/fsm-wdt.h
index d127551..abf34c5 100644
--- a/spaghetti-monster/fsm-wdt.h
+++ b/spaghetti-monster/fsm-wdt.h
@@ -1,24 +1,8 @@
-/*
- * fsm-wdt.h: WDT (Watch Dog Timer) functions for SpaghettiMonster.
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
+// fsm-wdt.h: WDT (Watch Dog Timer) functions for SpaghettiMonster.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
-#ifndef FSM_WDT_H
-#define FSM_WDT_H
+#pragma once
#define TICKS_PER_SECOND 62
@@ -34,4 +18,3 @@ volatile uint8_t irq_wdt = 0; // WDT interrupt happened?
#endif
#endif
-#endif
diff --git a/spaghetti-monster/spaghetti-monster.h b/spaghetti-monster/spaghetti-monster.h
index 853eac3..a6916e3 100644
--- a/spaghetti-monster/spaghetti-monster.h
+++ b/spaghetti-monster/spaghetti-monster.h
@@ -1,3 +1,9 @@
+// spaghetti-monster.h: UI toolkit / microkernel for e-switch flashlights.
+// Copyright (C) 2017-2023 Selene ToyKeeper
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
+
/*
* SpaghettiMonster: Generic foundation code for e-switch flashlights.
* Other possible names:
@@ -5,21 +11,6 @@
* - RoundTable
* - Mostly Harmless
* - ...
- *
- * Copyright (C) 2017 Selene ToyKeeper
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "tk-attiny.h"
@@ -79,3 +70,4 @@ void loop();
#endif
#include "fsm-misc.c"
#include "fsm-main.c"
+