From 583854e37efde7f461e073e735a1736b02d28c70 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Mon, 17 Apr 2023 00:08:32 -0600 Subject: 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. --- spaghetti-monster/fsm-events.h | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'spaghetti-monster/fsm-events.h') 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 . - */ +// 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 @@ -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 -- cgit v1.2.3 From bcaf2686d9f0570dfbc508ddcac95ee55d501f48 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 29 Oct 2023 13:05:38 -0600 Subject: converted noctigon-dm11-boost to use PWM+DSM, and recalibrated timing for delays + smooth steps Anduril has gradually gotten faster over the years, apparently, so it needed longer delays to get accurate-ish timing for beacon and other modes. Adding DSM also changes the timing perceptibly, so I made it possible to calibrate the delay fudge factor on a per-build basis. --- spaghetti-monster/fsm-events.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spaghetti-monster/fsm-events.h') diff --git a/spaghetti-monster/fsm-events.h b/spaghetti-monster/fsm-events.h index 10d3317..9692163 100644 --- a/spaghetti-monster/fsm-events.h +++ b/spaghetti-monster/fsm-events.h @@ -54,6 +54,11 @@ uint8_t push_event(uint8_t ev_type); // only for use by PCINT_inner() // TODO: Maybe move these to their own file... // ... this probably isn't the right place for delays. +#ifndef DELAY_FACTOR +// adjust the timing of delays, lower = shorter delays +// 90 = 90% delay, 10% for other things +#define DELAY_FACTOR 92 +#endif inline void interrupt_nice_delays(); uint8_t nice_delay_ms(uint16_t ms); //uint8_t nice_delay_s(); -- cgit v1.2.3 From a6a752a14017e79745550b8561e79491b9ca1f74 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sun, 29 Oct 2023 14:13:38 -0600 Subject: fixed delay timing on attiny1616 (it was about 17% too long this whole time) (and re-adjusted smooth step timing accordingly) --- spaghetti-monster/fsm-events.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spaghetti-monster/fsm-events.h') diff --git a/spaghetti-monster/fsm-events.h b/spaghetti-monster/fsm-events.h index 9692163..575af1b 100644 --- a/spaghetti-monster/fsm-events.h +++ b/spaghetti-monster/fsm-events.h @@ -55,9 +55,9 @@ uint8_t push_event(uint8_t ev_type); // only for use by PCINT_inner() // TODO: Maybe move these to their own file... // ... this probably isn't the right place for delays. #ifndef DELAY_FACTOR -// adjust the timing of delays, lower = shorter delays -// 90 = 90% delay, 10% for other things -#define DELAY_FACTOR 92 + // adjust the timing of delays, lower = shorter delays + // 90 = 90% delay, 10% for other things + #define DELAY_FACTOR 92 #endif inline void interrupt_nice_delays(); uint8_t nice_delay_ms(uint16_t ms); -- cgit v1.2.3