aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-08-05 21:52:41 -0600
committerSelene ToyKeeper2020-08-05 21:52:41 -0600
commit79ab84a5590067412a285f7a4f42842382c850fe (patch)
tree7258451edf1fb73e23b726be9c53f9f567ca6035 /spaghetti-monster
parentmade lockout momentary always use lowest first, and use manual mem level on s... (diff)
downloadanduril-79ab84a5590067412a285f7a4f42842382c850fe.tar.gz
anduril-79ab84a5590067412a285f7a4f42842382c850fe.tar.bz2
anduril-79ab84a5590067412a285f7a4f42842382c850fe.zip
organized config defaults, added some ramp options to default config
Diffstat (limited to 'spaghetti-monster')
-rw-r--r--spaghetti-monster/anduril/cfg-blf-lantern.h4
-rw-r--r--spaghetti-monster/anduril/config-default.h51
-rw-r--r--spaghetti-monster/anduril/ramp-mode.h2
3 files changed, 39 insertions, 18 deletions
diff --git a/spaghetti-monster/anduril/cfg-blf-lantern.h b/spaghetti-monster/anduril/cfg-blf-lantern.h
index 39ae7b8..9a91c93 100644
--- a/spaghetti-monster/anduril/cfg-blf-lantern.h
+++ b/spaghetti-monster/anduril/cfg-blf-lantern.h
@@ -46,9 +46,11 @@
// the default of 26 looks a bit flat, so increase it
#define CANDLE_AMPLITUDE 40
+// override default ramp style
+#undef RAMP_STYLE
+#define RAMP_STYLE 1 // 0 = smooth, 1 = stepped
// set floor and ceiling as far apart as possible
// because this lantern isn't overpowered
-#define RAMP_STYLE 1 // 0 = smooth, 1 = stepped
#define RAMP_SMOOTH_FLOOR 1
#define RAMP_SMOOTH_CEIL 150
#define RAMP_DISCRETE_FLOOR 10
diff --git a/spaghetti-monster/anduril/config-default.h b/spaghetti-monster/anduril/config-default.h
index da79068..ac30b3a 100644
--- a/spaghetti-monster/anduril/config-default.h
+++ b/spaghetti-monster/anduril/config-default.h
@@ -38,16 +38,23 @@
#define USE_THERMAL_REGULATION
#define DEFAULT_THERM_CEIL 45 // try not to get hotter than this (in C)
-// factory reset function erases user's runtime configuration in eeprom
-#define USE_FACTORY_RESET
-//#define USE_SOFT_FACTORY_RESET // only needed on models which can't use hold-button-at-boot
-// dual-switch support (second switch is a tail clicky)
-// (currently incompatible with factory reset)
-//#define START_AT_MEMORIZED_LEVEL
+// Include a simplified UI for non-enthusiasts?
+#define USE_SIMPLE_UI
-// include a function to blink out the firmware version
-#define USE_VERSION_CHECK
+
+///// Ramp mode options /////
+
+// button timing for turning light on/off:
+// B_PRESS_T: activate as soon as button is pressed
+// B_RELEASE_T: activate when user lets go of button
+// B_TIMEOUT_T: activate when we're sure the user won't double-click
+// defaults are release on, timeout off
+#define B_TIMING_ON B_RELEASE_T
+#define B_TIMING_OFF B_TIMEOUT_T
+
+// default ramp style: 0 = smooth, 1 = stepped
+#define RAMP_STYLE 0
// short blip when crossing from "click" to "hold" from off
// (helps the user hit moon mode exactly, instead of holding too long
@@ -59,9 +66,6 @@
#define BLINK_AT_RAMP_CEIL
//#define BLINK_AT_STEPS // whenever a discrete ramp mode is passed in smooth mode
-// Include a simplified UI for non-enthusiasts?
-#define USE_SIMPLE_UI
-
// make the ramps configurable by the user
#define USE_RAMP_CONFIG
@@ -73,6 +77,26 @@
// TODO: remap to a shorter button sequence?
#define USE_MANUAL_MEMORY
+// enable sunset timer (ramp-down and automatic shutoff)
+// timer is available in regular ramp mode and candle mode
+#define USE_SUNSET_TIMER
+
+
+///// What to do when power is connected /////
+// factory reset function erases user's runtime configuration in eeprom
+#define USE_FACTORY_RESET
+//#define USE_SOFT_FACTORY_RESET // only needed on models which can't use hold-button-at-boot
+
+// dual-switch support (second switch is a tail clicky)
+// (currently incompatible with factory reset)
+//#define START_AT_MEMORIZED_LEVEL
+
+
+///// extra modes (enable / disable / configure each mode) /////
+
+// include a function to blink out the firmware version
+#define USE_VERSION_CHECK
+
// enable the battery check mode (shows remaining charge) (requires USE_LVP)
#define USE_BATTCHECK_MODE
// battery readout style (pick one)
@@ -89,10 +113,6 @@
// enable beacon mode
#define USE_BEACON_MODE
-// enable sunset timer (ramp-down and automatic shutoff)
-// timer is available in regular ramp mode and candle mode
-#define USE_SUNSET_TIMER
-
// enable/disable various strobe modes
#define USE_BIKE_FLASHER_MODE
#define USE_PARTY_STROBE_MODE
@@ -118,6 +138,7 @@
// enable momentary mode
#define USE_MOMENTARY_MODE
+
// cut clock speed at very low modes for better efficiency
// (defined here so config files can override it)
#define USE_DYNAMIC_UNDERCLOCKING
diff --git a/spaghetti-monster/anduril/ramp-mode.h b/spaghetti-monster/anduril/ramp-mode.h
index 7d3d138..43e8844 100644
--- a/spaghetti-monster/anduril/ramp-mode.h
+++ b/spaghetti-monster/anduril/ramp-mode.h
@@ -62,7 +62,6 @@
// 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
@@ -74,7 +73,6 @@
// 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.