diff options
Diffstat (limited to 'spaghetti-monster')
| -rw-r--r-- | spaghetti-monster/anduril/BRANDS | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/MODELS | 10 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/anduril-manual.txt | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-blf-lantern-t1616.h | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-blf-q8-t1616.h | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h (renamed from spaghetti-monster/anduril/cfg-gchart-fet1-t16.h) | 7 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-sofirn-sp10s.h | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h | 2 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/off-mode.c | 5 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/version.h | 5 | ||||
| -rw-r--r-- | spaghetti-monster/fsm-misc.c | 11 | ||||
| -rw-r--r-- | spaghetti-monster/fsm-pcint.c | 26 |
12 files changed, 42 insertions, 34 deletions
diff --git a/spaghetti-monster/anduril/BRANDS b/spaghetti-monster/anduril/BRANDS index acd385e..4e73002 100644 --- a/spaghetti-monster/anduril/BRANDS +++ b/spaghetti-monster/anduril/BRANDS @@ -7,4 +7,4 @@ Lumintop 0300 - 0399 Fireflies 0400 - 0499 Mateminco 0500 - 0599 Sofirn 0600 - 0699 -gChart 1600 - 1699
\ No newline at end of file +gChart 1600 - 1699 diff --git a/spaghetti-monster/anduril/MODELS b/spaghetti-monster/anduril/MODELS index 4dda62f..13ce2e4 100644 --- a/spaghetti-monster/anduril/MODELS +++ b/spaghetti-monster/anduril/MODELS @@ -37,11 +37,11 @@ Model numbers: 0521 mateminco-mf01-mini 0611 blf-q8 0612 sofirn-sp36 +0613 blf-q8-t1616 +0614 sofirn-sp36-t1616 0621 blf-lantern -0622 sofirn-sp10s -0631 blf-q8-t1616 -0632 sofirn-sp36-t1616 -0633 blf-lantern-t1616 -1618 gchart-fet1-t16 +0622 blf-lantern-t1616 +0631 sofirn-sp10s +1618 gchart-fet1-t1616 Duplicates: Missing: diff --git a/spaghetti-monster/anduril/anduril-manual.txt b/spaghetti-monster/anduril/anduril-manual.txt index b3a1cef..e3b3cf5 100644 --- a/spaghetti-monster/anduril/anduril-manual.txt +++ b/spaghetti-monster/anduril/anduril-manual.txt @@ -691,7 +691,7 @@ Ramp Simple 2C Go to/from ceiling Ramp Full 2C Go to/from ceiling (or turbo if at ceil already) Ramp Full 3C Change ramp style (smooth / stepped) Ramp Any 3H Tint ramping (on some lights) -Ramp Any 3H Momentary turbo (on lights without tint ramping) +Ramp Full 3H Momentary turbo (on lights without tint ramping) Ramp Any 4C Lockout mode Ramp Full 5C Momentary mode Ramp Full 5H Sunset timer on, and add 5 minutes diff --git a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h index 7905eee..d602641 100644 --- a/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h +++ b/spaghetti-monster/anduril/cfg-blf-lantern-t1616.h @@ -1,5 +1,5 @@ // BLF Lantern config options for Anduril using the Attiny1616 -#define MODEL_NUMBER "0633" +#define MODEL_NUMBER "0622" /* BLF Lantern pinout * PB0 is 5000K channel * PB1 is 3000K channel diff --git a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h index e1e1598..73702a9 100644 --- a/spaghetti-monster/anduril/cfg-blf-q8-t1616.h +++ b/spaghetti-monster/anduril/cfg-blf-q8-t1616.h @@ -1,5 +1,5 @@ // BLF Q8 config options for Anduril using the Attiny1616 -#define MODEL_NUMBER "0631" +#define MODEL_NUMBER "0613" #include "hwdef-BLF_Q8-T1616.h" // ATTINY: 1616 diff --git a/spaghetti-monster/anduril/cfg-gchart-fet1-t16.h b/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h index a6434b8..101f25a 100644 --- a/spaghetti-monster/anduril/cfg-gchart-fet1-t16.h +++ b/spaghetti-monster/anduril/cfg-gchart-fet1-t1616.h @@ -1,6 +1,6 @@ // gChart's custom FET+1 driver config options for Anduril #define MODEL_NUMBER "1618" // Golden Ratio... because I can -#include "hwdef-gchart-fet1-t16.h" +#include "hwdef-gchart-fet1-t1616.h" // ATTINY: 1616 // the button lights up @@ -9,6 +9,11 @@ #define USE_INDICATOR_LED_WHILE_RAMPING // enable blinking indicator LED while off #define TICK_DURING_STANDBY +#define STANDBY_TICK_SPEED 3 // every 0.128 s +#define USE_FANCIER_BLINKING_INDICATOR +// off mode: low (1) +// lockout: blinking (3) +#define INDICATOR_LED_DEFAULT_MODE ((3<<2) + 1) #undef BLINK_AT_RAMP_MIDDLE diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp10s.h b/spaghetti-monster/anduril/cfg-sofirn-sp10s.h index 054b1db..99ed17d 100644 --- a/spaghetti-monster/anduril/cfg-sofirn-sp10s.h +++ b/spaghetti-monster/anduril/cfg-sofirn-sp10s.h @@ -1,5 +1,5 @@ // gChart's custom SP10S driver config options for Anduril -#define MODEL_NUMBER "0622" +#define MODEL_NUMBER "0631" #include "hwdef-Sofirn_SP10S.h" // ATTINY: 1616 diff --git a/spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h b/spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h index 8eb7a5d..ce1c04a 100644 --- a/spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h +++ b/spaghetti-monster/anduril/cfg-sofirn-sp36-t1616.h @@ -2,7 +2,7 @@ // same as the BLF Q8, mostly #include "cfg-blf-q8-t1616.h" #undef MODEL_NUMBER -#define MODEL_NUMBER "0632" +#define MODEL_NUMBER "0614" // ATTINY: 1616 // voltage readings were a little high with the Q8 value diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c index 34d9e6d..e37f08d 100644 --- a/spaghetti-monster/anduril/off-mode.c +++ b/spaghetti-monster/anduril/off-mode.c @@ -157,9 +157,12 @@ uint8_t off_state(Event event, uint16_t arg) { } // click, hold: momentary at ceiling or turbo else if (event == EV_click2_hold) { + #ifdef USE_SIMPLE_UI if (simple_ui_active) { set_level(nearest_level(MAX_LEVEL)); - } else { + } else + #endif + { set_level(MAX_LEVEL); } return MISCHIEF_MANAGED; diff --git a/spaghetti-monster/anduril/version.h b/spaghetti-monster/anduril/version.h index 14502aa..8cf3c90 100644 --- a/spaghetti-monster/anduril/version.h +++ b/spaghetti-monster/anduril/version.h @@ -1 +1,4 @@ -#define VERSION_NUMBER "20210201" +// this file is replaced automatically by the build script +// set your own date here if you're not using the build script +// otherwise, default to first human contact with the moon +#define VERSION_NUMBER "19690720" diff --git a/spaghetti-monster/fsm-misc.c b/spaghetti-monster/fsm-misc.c index edd982a..c2c1afe 100644 --- a/spaghetti-monster/fsm-misc.c +++ b/spaghetti-monster/fsm-misc.c @@ -111,6 +111,7 @@ uint8_t blink_num(uint8_t num) { void indicator_led(uint8_t lvl) { switch (lvl) { #ifdef AVRXMEGA3 // ATTINY816, 817, etc + case 0: // indicator off AUXLED_PORT.DIRSET = (1 << AUXLED_PIN); // set as output AUXLED_PORT.OUTCLR = (1 << AUXLED_PIN); // set output low @@ -139,6 +140,7 @@ void indicator_led(uint8_t lvl) { break; #else + case 0: // indicator off DDRB &= 0xff ^ (1 << AUXLED_PIN); PORTB &= 0xff ^ (1 << AUXLED_PIN); @@ -164,7 +166,7 @@ void indicator_led(uint8_t lvl) { #endif break; - #endif + #endif // MCU type } } @@ -183,6 +185,7 @@ void button_led_set(uint8_t lvl) { switch (lvl) { #ifdef AVRXMEGA3 // ATTINY816, 817, etc + case 0: // LED off BUTTON_LED_PORT.DIRSET = (1 << BUTTON_LED_PIN); // set as output BUTTON_LED_PORT.OUTCLR = (1 << BUTTON_LED_PIN); // set output low @@ -215,7 +218,7 @@ void button_led_set(uint8_t lvl) { BUTTON_LED_PORT |= (1 << BUTTON_LED_PIN); break; - #endif + #endif // MCU type } } #endif @@ -230,6 +233,7 @@ void rgb_led_set(uint8_t value) { switch (lvl) { #ifdef AVRXMEGA3 // ATTINY816, 817, etc + case 0: // LED off AUXLED_RGB_PORT.DIRSET = (1 << pin); // set as output AUXLED_RGB_PORT.OUTCLR = (1 << pin); // set output low @@ -262,8 +266,7 @@ void rgb_led_set(uint8_t value) { AUXLED_RGB_PORT |= (1 << pin); break; - #endif - + #endif // MCU type } } } diff --git a/spaghetti-monster/fsm-pcint.c b/spaghetti-monster/fsm-pcint.c index 4a3c193..4ada5b8 100644 --- a/spaghetti-monster/fsm-pcint.c +++ b/spaghetti-monster/fsm-pcint.c @@ -69,24 +69,20 @@ inline void PCINT_off() { //void button_change_interrupt() { #if (ATTINY == 25) || (ATTINY == 45) || (ATTINY == 85) || (ATTINY == 1634) -//EMPTY_INTERRUPT(PCINT0_vect); -#ifdef PCINT_vect -ISR(PCINT_vect) { -#else -ISR(PCINT0_vect) { -#endif - irq_pcint = 1; -} + #ifdef PCINT_vect + ISR(PCINT_vect) { + #else + ISR(PCINT0_vect) { + #endif #elif defined(AVRXMEGA3) // ATTINY816, 817, etc) -ISR(SWITCH_VECT) { - SWITCH_INTFLG |= (1 << SWITCH_PIN); // Write a '1' to clear the interrupt flag - irq_pcint = 1; -} + ISR(SWITCH_VECT) { + // Write a '1' to clear the interrupt flag + SWITCH_INTFLG |= (1 << SWITCH_PIN); #else #error Unrecognized MCU type #endif -/* -ISR(PCINT0_vect) { + + irq_pcint = 1; // let deferred code know an interrupt happened //DEBUG_FLASH; @@ -95,9 +91,7 @@ ISR(PCINT0_vect) { // noisy / bouncy switch (so the content of this function has been // moved to a separate function, called from WDT only) // PCINT_inner(button_is_pressed()); - } -*/ // should only be called from PCINT and/or WDT // (is a separate function to reduce code duplication) |
