aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2018-09-29 15:45:26 -0600
committerSelene ToyKeeper2018-09-29 15:45:26 -0600
commitc0d79d1f4151cd5a4b52167864c0c37422452bc9 (patch)
tree845bc3f523fe8bcabfd43687fd047eaf1d1241de /spaghetti-monster
parentAdded RampingIOS V3 manual from Phil Gold. (diff)
downloadanduril-c0d79d1f4151cd5a4b52167864c0c37422452bc9.tar.gz
anduril-c0d79d1f4151cd5a4b52167864c0c37422452bc9.tar.bz2
anduril-c0d79d1f4151cd5a4b52167864c0c37422452bc9.zip
Applied recent Anduril updates to RampingIOS V3:
- D4-219C build target. - Moon timing hint. - Better timing consistency on hold-from-off. - Fixed bug where changing ramp style could go to the wrong brightness level.
Diffstat (limited to 'spaghetti-monster')
-rwxr-xr-xspaghetti-monster/rampingios/build-all.sh3
-rw-r--r--spaghetti-monster/rampingios/rampingiosv3.c26
2 files changed, 24 insertions, 5 deletions
diff --git a/spaghetti-monster/rampingios/build-all.sh b/spaghetti-monster/rampingios/build-all.sh
index 42efce7..22597b7 100755
--- a/spaghetti-monster/rampingios/build-all.sh
+++ b/spaghetti-monster/rampingios/build-all.sh
@@ -8,8 +8,9 @@ for TARGET in \
EMISAR_D1 \
EMISAR_D1S \
EMISAR_D4 \
+ EMISAR_D4_219C \
EMISAR_D4S \
- EMISAR_D4S_219c \
+ EMISAR_D4S_219C \
; do
echo "===== $TARGET ====="
../../../bin/build-85.sh "$UI" "-DFSM_${TARGET}_DRIVER"
diff --git a/spaghetti-monster/rampingios/rampingiosv3.c b/spaghetti-monster/rampingios/rampingiosv3.c
index de2de62..5c8f7ea 100644
--- a/spaghetti-monster/rampingios/rampingiosv3.c
+++ b/spaghetti-monster/rampingios/rampingiosv3.c
@@ -25,8 +25,9 @@
//#define FSM_EMISAR_D1_DRIVER
//#define FSM_EMISAR_D1S_DRIVER
//#define FSM_EMISAR_D4_DRIVER
+//#define FSM_EMISAR_D4_219C_DRIVER
//#define FSM_EMISAR_D4S_DRIVER
-//#define FSM_EMISAR_D4S_219c_DRIVER
+//#define FSM_EMISAR_D4S_219C_DRIVER
//#define FSM_FF_ROT66_DRIVER
//#define FSM_FW3A_DRIVER
@@ -36,6 +37,10 @@
#define USE_THERMAL_REGULATION
#define DEFAULT_THERM_CEIL 45 // try not to get hotter than this
+// short blip when crossing from "click" to "hold" from off
+// (helps the user hit moon mode exactly, instead of holding too long
+// or too short)
+#define MOON_TIMING_HINT
// short blips while ramping
#define BLINK_AT_CHANNEL_BOUNDARIES
//#define BLINK_AT_RAMP_FLOOR
@@ -67,10 +72,13 @@
#elif defined(FSM_EMISAR_D1S_DRIVER)
#include "cfg-emisar-d1s.h"
+#elif defined(FSM_EMISAR_D4_219C_DRIVER)
+#include "cfg-emisar-d4-219c.h"
+
#elif defined(FSM_EMISAR_D4_DRIVER)
#include "cfg-emisar-d4.h"
-#elif defined(FSM_EMISAR_D4S_219c_DRIVER)
+#elif defined(FSM_EMISAR_D4S_219C_DRIVER)
#include "cfg-emisar-d4s-219c.h"
#elif defined(FSM_EMISAR_D4S_DRIVER)
@@ -275,9 +283,19 @@ uint8_t off_state(EventPtr event, uint16_t arg) {
}
// hold: go to lowest level
else if (event == EV_click1_hold) {
+ #ifdef MOON_TIMING_HINT
+ if (arg == 0) {
+ // let the user know they can let go now to stay at moon
+ uint8_t temp = actual_level;
+ set_level(0);
+ delay_4ms(2);
+ set_level(temp);
+ } else
+ #endif
// don't start ramping immediately;
// give the user time to release at moon level
- if (arg >= HOLD_TIMEOUT) {
+ //if (arg >= HOLD_TIMEOUT) { // smaller
+ if (arg >= (!ramp_style) * HOLD_TIMEOUT) { // more consistent
set_state(steady_state, 1);
}
return MISCHIEF_MANAGED;
@@ -410,7 +428,7 @@ uint8_t steady_state(EventPtr event, uint16_t arg) {
// 3 clicks: toggle smooth vs discrete ramping
else if (event == EV_3clicks) {
ramp_style = !ramp_style;
- memorized_level = nearest_level(memorized_level);
+ memorized_level = nearest_level(actual_level);
#ifdef USE_THERMAL_REGULATION
target_level = memorized_level;
#ifdef USE_SET_LEVEL_GRADUALLY
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.