aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorSelene ToyKeeper2025-04-29 00:10:31 -0600
committerSelene ToyKeeper2025-04-29 00:10:31 -0600
commit04f43399041029b9d5a03160be6ba0588325fad0 (patch)
tree53bfb6e033c42665b8ab7b5221e85cb969d6a041 /ui
parentmemester egg (diff)
parentchanged hank-lume-x1 model number back on 2024-09-28 (diff)
downloadanduril-04f43399041029b9d5a03160be6ba0588325fad0.tar.gz
anduril-04f43399041029b9d5a03160be6ba0588325fad0.tar.bz2
anduril-04f43399041029b9d5a03160be6ba0588325fad0.zip
Merge branch 'hank-lume-x1' into trunk
Finally remembered to merge this. Thought I had done it months ago... Anyway, now that I've been able to test it on production hardware, everything seems fine. The super-low firefly modes are a bit more usable on production hardware too. Level 1/150 is dimmer than the low aux LEDs, while level 2/150 is about as bright as low aux. * hank-lume-x1: 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
Diffstat (limited to 'ui')
-rw-r--r--ui/anduril/anduril.c9
1 files changed, 9 insertions, 0 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);
}