aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorSelene ToyKeeper2024-09-22 17:15:47 -0600
committerSelene ToyKeeper2024-09-22 17:15:47 -0600
commit6be8fff532c4be83126517a6e3b7b725548761c2 (patch)
tree10865593112cc903c5558bdf0dc6b892367f3883 /ui
parentcherry-picked hank-lume-x1 code from https://github.com/loneoceans/anduril/co... (diff)
downloadanduril-6be8fff532c4be83126517a6e3b7b725548761c2.tar.gz
anduril-6be8fff532c4be83126517a6e3b7b725548761c2.tar.bz2
anduril-6be8fff532c4be83126517a6e3b7b725548761c2.zip
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)
Diffstat (limited to 'ui')
-rw-r--r--ui/anduril/anduril.c6
-rw-r--r--ui/anduril/momentary-mode.c6
2 files changed, 2 insertions, 10 deletions
diff --git a/ui/anduril/anduril.c b/ui/anduril/anduril.c
index c4bd99f..383acbc 100644
--- a/ui/anduril/anduril.c
+++ b/ui/anduril/anduril.c
@@ -344,15 +344,13 @@ void loop() {
// 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){
+ if (temperature < 0) {
blink_negative();
blink_num(-temperature);
}
- else {blink_num(temperature);}
+ else
#endif
- #ifndef USE_LONG_BLINK_FOR_NEGATIVE_SIGN
blink_num(temperature);
- #endif
nice_delay_ms(1000);
}
#endif
diff --git a/ui/anduril/momentary-mode.c b/ui/anduril/momentary-mode.c
index 31a9411..327302a 100644
--- a/ui/anduril/momentary-mode.c
+++ b/ui/anduril/momentary-mode.c
@@ -7,12 +7,6 @@
#include "anduril/momentary-mode.h"
uint8_t momentary_state(Event event, uint16_t arg) {
-
- // enable OTG mode, if defined
- #ifdef USE_OTG_IN_MOMENTARY
- POWER_BANK_EN_PORT |= POWER_BANK_EN_PIN;
- #endif
-
// init strobe mode, if relevant
#ifdef USE_STROBE_STATE
if ((event == EV_enter_state) && (momentary_mode != 0)) {