diff options
| author | Selene ToyKeeper | 2025-06-04 00:55:40 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2025-06-04 00:55:40 -0600 |
| commit | c8a29a67f286d1d9d84ab000697b5727676b8784 (patch) | |
| tree | c6f1c9758e6ebaf920fd8b6b4c9edf66769e3c41 /ui | |
| parent | ts25-boost: calibrated for new prototype (diff) | |
| parent | lockout mode now only does momentary moon/low on 1st and 2nd presses, (diff) | |
| download | anduril-c8a29a67f286d1d9d84ab000697b5727676b8784.tar.gz anduril-c8a29a67f286d1d9d84ab000697b5727676b8784.tar.bz2 anduril-c8a29a67f286d1d9d84ab000697b5727676b8784.zip | |
Merge branch 'trunk' into wurkkos-ts25-boost
* trunk:
lockout mode now only does momentary moon/low on 1st and 2nd presses, so it no longer flashes on each click while advancing to other functions
emisar-d3aa: reduced preflash by changing timing of power enable steps
fix "Error: Missing download info for actions/upload-artifact@v3"
fixed model number of hank-lume-x1 in MODELS
Added changelogs for 2025-04-29 release.
memester egg (was written a long time ago on a whim and never committed, may as well do it now)
changed hank-lume-x1 model number back on 2024-09-28 for some reason, and didn't commit... saving now to change branches, but should delete this commit if it turns out there was no reason for it
hank-lume-x1: minor calibration and cleaning - calibrated party strobe - removed duplicate or commented-out code - added a basic readme
hank-lume-x1 cleanup and calibration, part 1: - changed model number from 0281 to 0171 - cleaned up blink_negative and AUXLED_RGB_DIFFERENT_PORTS a little (but the latter needs a complete refactor, as soon as the hardware abstraction code can handle aux LEDs better) - cleaned up USE_LONG_BLINK_FOR_NEGATIVE_SIGN a little - removed USE_OTG_IN_MOMENTARY since it's not actually used - moved hw/loneoceans/lume-x1-avr32dd20/* files into hw/hank/lume-x1/ - superficial cleanup on hank/lume-x1/hwdef.* - removed some of the extra stuff from hank/lume-x1/anduril.h - adjusted calibration (especially ramp table) on hank-lume-x1 (ramp shape is pretty close to a D4K-boost now, but with more firefly modes) (calibration is based on a sample size of 1, further testing needed)
cherry-picked hank-lume-x1 code from https://github.com/loneoceans/anduril/commit/d83ebb75dab8c462b7efa841bccc00a136ff15a2
merged SammysHP's fix for TS10 lower-Vf LEDs, reverted my fix (they are now two separate build targets)
wurkkos-ts10-rgbaux: limit max power to 200/255, at Wurkkos's request (because otherwise the light destroys its own LEDs at full power)
Add Wurkkos TS10 RGB with reduced FET output
Diffstat (limited to '')
| -rw-r--r-- | ui/anduril/anduril.c | 9 | ||||
| -rw-r--r-- | ui/anduril/lockout-mode.c | 22 |
2 files changed, 23 insertions, 8 deletions
diff --git a/ui/anduril/anduril.c b/ui/anduril/anduril.c index a7e4199..383acbc 100644 --- a/ui/anduril/anduril.c +++ b/ui/anduril/anduril.c @@ -341,6 +341,15 @@ void loop() { #ifdef USE_THERMAL_REGULATION // TODO: blink out therm_ceil during thermal_config_state? else if (state == tempcheck_state) { + // temperature is type int16_t + // but blink_num is uint8_t, so -10 will blink as 246 + #ifdef USE_LONG_BLINK_FOR_NEGATIVE_SIGN + if (temperature < 0) { + blink_negative(); + blink_num(-temperature); + } + else + #endif blink_num(temperature); nice_delay_ms(1000); } diff --git a/ui/anduril/lockout-mode.c b/ui/anduril/lockout-mode.c index c3f82ea..255ab22 100644 --- a/ui/anduril/lockout-mode.c +++ b/ui/anduril/lockout-mode.c @@ -12,24 +12,30 @@ uint8_t lockout_state(Event event, uint16_t arg) { // button is being held #ifdef USE_AUX_RGB_LEDS // don't turn on during RGB aux LED configuration - if (event == EV_click7_hold) { set_level(0); } else + //if (event == EV_click7_hold) { set_level(0); } else #endif - if ((event & (B_CLICK | B_PRESS)) == (B_CLICK | B_PRESS)) { - // hold: lowest floor - // click, hold: highest floor (or manual mem level) + uint8_t click_num = event & B_COUNT; + if ( // button pressed 1st or 2nd time + ((B_CLICK | B_PRESS) == (event & (B_CLICK | B_PRESS))) + && (click_num <= 2) + ) { uint8_t lvl = cfg.ramp_floors[0]; - if (1 == (event & 0x0f)) { // first click + // hold: lowest floor + if (1 == click_num) { // 1st click if (cfg.ramp_floors[1] < lvl) lvl = cfg.ramp_floors[1]; - } else { // 2nd click or later - if (cfg.ramp_floors[1] > lvl) lvl = cfg.ramp_floors[1]; + } + // click, hold: highest floor (or manual mem level) + else { // 2nd click #ifdef USE_MANUAL_MEMORY if (cfg.manual_memory) lvl = cfg.manual_memory; + else #endif + if (cfg.ramp_floors[1] > lvl) lvl = cfg.ramp_floors[1]; } off_state_set_level(lvl); } // button was released - else if ((event & (B_CLICK | B_PRESS)) == (B_CLICK)) { + else if ((B_CLICK) == (event & (B_CLICK | B_PRESS))) { off_state_set_level(0); } #endif // ifdef USE_MOON_DURING_LOCKOUT_MODE |
