aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-07-22 16:42:28 -0600
committerSelene ToyKeeper2020-07-22 16:42:28 -0600
commit3c6a834486ef756e05db88fece2fd248479846ce (patch)
treefd6e8d7913068925dc4458f8b5c25eb6149dc9e2 /spaghetti-monster
parentrenamed lockout.* -> lockout-mode.*, moved user-configurable lockout options ... (diff)
downloadanduril-3c6a834486ef756e05db88fece2fd248479846ce.tar.gz
anduril-3c6a834486ef756e05db88fece2fd248479846ce.tar.bz2
anduril-3c6a834486ef756e05db88fece2fd248479846ce.zip
renamed ramping.* -> ramp-mode.*
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/anduril.c8
-rw-r--r--spaghetti-monster/anduril/ramp-mode-fsm.h (renamed from spaghetti-monster/anduril/ramping-fsm.h)9
-rw-r--r--spaghetti-monster/anduril/ramp-mode.c (renamed from spaghetti-monster/anduril/ramping.c)8
-rw-r--r--spaghetti-monster/anduril/ramp-mode.h (renamed from spaghetti-monster/anduril/ramping.h)9
4 files changed, 20 insertions, 14 deletions
diff --git a/spaghetti-monster/anduril/anduril.c b/spaghetti-monster/anduril/anduril.c
index d508b3b..67b4b3f 100644
--- a/spaghetti-monster/anduril/anduril.c
+++ b/spaghetti-monster/anduril/anduril.c
@@ -61,7 +61,7 @@
/********* Include headers which need to be before FSM *********/
// enable FSM features needed by basic ramping functions
-#include "ramping-fsm.h"
+#include "ramp-mode-fsm.h"
#ifdef USE_FACTORY_RESET
#include "factory-reset-fsm.h"
@@ -89,7 +89,7 @@
/********* Include all the regular app headers *********/
#include "off-state.h"
-#include "ramping.h"
+#include "ramp-mode.h"
#include "load-save-config.h"
#include "config-mode.h"
#include "misc.h"
@@ -202,10 +202,10 @@ uint8_t rgb_led_lockout_mode = RGB_LED_LOCKOUT_DEFAULT;
/********* Include all the app logic source files *********/
// (is a bit weird to do things this way,
-// but it saves a lot of space by letting use use the -fwhole-program flag)
+// but it saves a lot of space by letting us use the -fwhole-program flag)
#include "off-state.c"
-#include "ramping.c"
+#include "ramp-mode.c"
#include "load-save-config.c"
#include "config-mode.c"
#include "misc.c"
diff --git a/spaghetti-monster/anduril/ramping-fsm.h b/spaghetti-monster/anduril/ramp-mode-fsm.h
index 97b4321..9d8a1f4 100644
--- a/spaghetti-monster/anduril/ramping-fsm.h
+++ b/spaghetti-monster/anduril/ramp-mode-fsm.h
@@ -1,5 +1,5 @@
/*
- * ramping-fsm.h: FSM config for ramping functions in Anduril.
+ * ramp-mode-fsm.h: FSM config for ramping functions in Anduril.
*
* Copyright (C) 2017 Selene ToyKeeper
*
@@ -17,11 +17,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef RAMPING_FSM_H
-#define RAMPING_FSM_H
+#ifndef RAMP_MODE_FSM_H
+#define RAMP_MODE_FSM_H
+// enable FSM's ramping features
#define USE_RAMPING
+// do smooth adjustments when compensating for temperature
#ifdef USE_THERMAL_REGULATION
#define USE_SET_LEVEL_GRADUALLY // isn't used except for thermal adjustments
#endif
@@ -29,6 +31,7 @@
// brightness to use when no memory is set
// FIXME: this is only here to stop an error in fsm-ramping.c,
// which should be fixed by using a different symbol instead
+// (like BUTTON_LED_BRIGHT_LEVEL or RAMP_HALFWAY_LEVEL or something)
#ifndef DEFAULT_LEVEL
#define DEFAULT_LEVEL MAX_1x7135
#endif
diff --git a/spaghetti-monster/anduril/ramping.c b/spaghetti-monster/anduril/ramp-mode.c
index f2a23c8..b870550 100644
--- a/spaghetti-monster/anduril/ramping.c
+++ b/spaghetti-monster/anduril/ramp-mode.c
@@ -1,5 +1,5 @@
/*
- * ramping.c: Ramping functions for Anduril.
+ * ramp-mode.c: Ramping functions for Anduril.
*
* Copyright (C) 2017 Selene ToyKeeper
*
@@ -17,10 +17,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef RAMPING_C
-#define RAMPING_C
+#ifndef RAMP_MODE_C
+#define RAMP_MODE_C
-#include "ramping.h"
+#include "ramp-mode.h"
uint8_t steady_state(Event event, uint16_t arg) {
#ifdef USE_REVERSING
diff --git a/spaghetti-monster/anduril/ramping.h b/spaghetti-monster/anduril/ramp-mode.h
index b47297d..00cac9f 100644
--- a/spaghetti-monster/anduril/ramping.h
+++ b/spaghetti-monster/anduril/ramp-mode.h
@@ -1,5 +1,5 @@
/*
- * ramping.h: Ramping functions for Anduril.
+ * ramp-mode.h: Ramping functions for Anduril.
*
* Copyright (C) 2017 Selene ToyKeeper
*
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef RAMPING_H
-#define RAMPING_H
+#ifndef RAMP_MODE_H
+#define RAMP_MODE_H
#ifndef RAMP_LENGTH
#define RAMP_LENGTH 150 // default, if not overridden in a driver cfg file
@@ -37,6 +37,7 @@
#endif
#if defined(USE_SIMPLE_UI)
+// TODO: Move these settings to config-default.h?
// start in the simple UI after each factory reset?
#ifndef DEFAULT_SIMPLE_UI_ACTIVE
#define DEFAULT_SIMPLE_UI_ACTIVE 1
@@ -61,6 +62,7 @@
// timeout: react as soon as we're sure the user isn't doing a double-click
#define B_TIMEOUT_T 2
// defaults are release on, timeout off
+// TODO: Move these settings to config-default.h?
#ifndef B_TIMING_ON
//#define B_TIMING_ON B_PRESS_T
#define B_TIMING_ON B_RELEASE_T
@@ -72,6 +74,7 @@
// default ramp options if not overridden earlier per-driver
#ifndef RAMP_STYLE
+// TODO: Move this setting to config-default.h?
#define RAMP_STYLE 0 // smooth default
#endif
#ifndef RAMP_SMOOTH_FLOOR
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.