Skip to content

Instantly share code, notes, and snippets.

@DurvalMenezes
DurvalMenezes / 721-8C_turn_aux_off_low.diff
Last active June 12, 2023 14:36
Anduril: implement quick aux LED on/low switching, see description at the top
######################################################################################################################################
# 721-8C_turn_aux_off_low.diff: implements @Light_Veteran feature request[1], to wit:
# 8C will turn the aux LED on (on low) if it’s off, and the same 8C will turn it off if it’s on (whether in low, high or blink).
# [1] per https://budgetlightforum.com/t/anduril-2-feature-change-suggestions/218045/147
#
# Apply it with `patch -p1 <721-8C_turn_aux_off_low.diff` at the same directory you expanded 721.tgz,
# or `patch -p2 <721-8C_turn_aux_off_low.diff` into the same (or other release, but then no guarantees)
#
# 2023-06-12 Written [Durval Menezes, @dmenezes at budgetlightforum.com, u/dmenezes at reddit.com]
######################################################################################################################################
@DurvalMenezes
DurvalMenezes / t.c
Last active June 15, 2023 09:14
Quick kludge to find out how many EEPROM bytes are in use (at maximum) on Anduril multi-channel branch rev. 721
//For explanation and rationale, see https://budgetlightforum.com/t/anduril-2-feature-change-suggestions/218045/234
typedef unsigned char uint8_t;
typedef signed char int8_t;
#define NUM_RAMPS 3
#define NUM_CHANNEL_MODES 8
typedef struct Config {
######################################################################################################################################
# 721-8C_quick_aux_switch.diff: implements @Light_Veteran feature request[1], to wit:
# 8C will turn the aux LED off if it’s on (on whatever mode), and the same 8C will turn it back to the mode it was before.
#
# [1] per https://budgetlightforum.com/t/anduril-2-feature-change-suggestions/218045/147 and following comments
#
# Apply it with `patch -p1 < 721-8C_quick_aux_switch.diff` at the same directory you expanded 721.tgz,
# or `patch -p2 <721-8C_quick_aux_switch.diff` into the same (or other release, but then no guarantees)
#
# 2023-06-12 Written [Durval Menezes, @dmenezes at budgetlightforum.com and lemmy.world, u/dmenezes at reddit.com]
######################################################################################################################################
# 721-8C_quick_aux_switch.diff: implements @Light_Veteran feature request[1], to wit:
# 8C will turn the aux LED off if it’s on (on whatever mode), and the same 8C will turn it back to the mode it was before.
#
# [1] per https://budgetlightforum.com/t/anduril-2-feature-change-suggestions/218045/147 and following comments
#
# Apply it with `patch -p1 < 721-8C_quick_aux_switch.diff` at the same directory you expanded 721.tgz,
# or `patch -p2 <721-8C_quick_aux_switch.diff` into the same (or other release, but then no guarantees)
#
# 2023-06-12 Written [Durval Menezes, @dmenezes at budgetlightforum.com and lemmy.world, u/dmenezes at reddit.com]
#Fixes compile-time error when #undef USE_SIMPLE_UI
#See https://budgetlightforum.com/t/anduril-2-feature-change-suggestions/218045/199
#2023/06/11 Written [Durval Menezes]
--- 721/~toykeeper/flashlight-firmware/multi-channel/ToyKeeper/spaghetti-monster/anduril/channel-modes.c.orig-20230611 2023-04-26 03:39:28.000000000 -0400
+++ 721/~toykeeper/flashlight-firmware/multi-channel/ToyKeeper/spaghetti-monster/anduril/channel-modes.c 2023-06-11 20:03:39.254320591 -0400
@@ -121,19 +121,19 @@
#if defined(USE_SIMPLE_UI)
// remaining mappings aren't "simple", so stop here
if (cfg.simple_ui_active) {
return EVENT_NOT_HANDLED;
#Fixes ATTiny ADC setup/config issues
#See https://budgetlightforum.com/t/anduril-2-feature-change-suggestions/218045/467
#2023/07/05 Written [by @SammysHP on https://budgetlightforum.com/]
--- a/ToyKeeper/spaghetti-monster/fsm-adc.c
+++ b/ToyKeeper/spaghetti-monster/fsm-adc.c
@@ -83,11 +83,6 @@ inline void adc_sleep_mode() {
// attiny1634
set_sleep_mode(SLEEP_MODE_ADC);
#elif defined(AVRXMEGA3) // ATTINY816, 817, etc
- // set the RUNSTDBY bit so ADC will run in standby mode
@DurvalMenezes
DurvalMenezes / 767-8C_quick_aux_switch.diff
Created October 3, 2023 20:19
anduril_-_multi-channel: 767-8C_quick_aux_switch + undef_USE_MANUAL_MEMORY_fix + undef_USE_SIMPLE_UI_fix
--- 767/~toykeeper/flashlight-firmware/multi-channel/ToyKeeper/spaghetti-monster/anduril/config-default.h.orig 2023-08-26 21:42:04.000000000 -0400
+++ 767/~toykeeper/flashlight-firmware/multi-channel/ToyKeeper/spaghetti-monster/anduril/config-default.h 2023-10-02 16:04:54.415794640 -0300
@@ -195,3 +195,6 @@
// 0 = none, 1 = smooth, 2+ = undefined
#define DEFAULT_SMOOTH_STEPS_STYLE 1
+// enable quick switch to/from current aux mode to off
+#define USE_QUICK_AUX_SWITCH
+
--- 767/~toykeeper/flashlight-firmware/multi-channel/ToyKeeper/spaghetti-monster/anduril/load-save-config-fsm.h.orig 2023-08-26 21:42:04.000000000 -0400