aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/werner
diff options
context:
space:
mode:
authorSelene ToyKeeper2020-05-14 16:50:48 -0600
committerSelene ToyKeeper2020-05-14 16:50:48 -0600
commit56bfa48fa0f694894b4befdfa9858971004fd101 (patch)
tree8dce8bf606b60eb57f830c2afc3328516d904bf2 /spaghetti-monster/werner
parentfixed eeprom_wl functions on attiny1634 (diff)
downloadanduril-56bfa48fa0f694894b4befdfa9858971004fd101.tar.gz
anduril-56bfa48fa0f694894b4befdfa9858971004fd101.tar.bz2
anduril-56bfa48fa0f694894b4befdfa9858971004fd101.zip
fixed builds of Werner's UI on targets which had been failing (Noctigon K1, BLF LT1 Lantern, and all attiny1634 targets)
Diffstat (limited to 'spaghetti-monster/werner')
-rwxr-xr-xspaghetti-monster/werner/build-all.sh6
-rw-r--r--spaghetti-monster/werner/werner.c7
2 files changed, 10 insertions, 3 deletions
diff --git a/spaghetti-monster/werner/build-all.sh b/spaghetti-monster/werner/build-all.sh
index 87d4f0d..b114101 100755
--- a/spaghetti-monster/werner/build-all.sh
+++ b/spaghetti-monster/werner/build-all.sh
@@ -7,7 +7,9 @@ UI=werner
for TARGET in cfg-*.h ; do
NAME=$(echo "$TARGET" | perl -ne '/cfg-(.*).h/ && print "$1\n";')
echo "===== $NAME ====="
- echo ../../../bin/build.sh 85 "$UI" "-DCONFIGFILE=${TARGET}"
- ../../../bin/build.sh 85 "$UI" "-DCONFIGFILE=${TARGET}"
+ ATTINY=$(grep 'ATTINY:' $TARGET | awk '{ print $3 }')
+ if [ -z "$ATTINY" ]; then ATTINY=85 ; fi
+ echo ../../../bin/build.sh $ATTINY "$UI" "-DCONFIGFILE=${TARGET}"
+ ../../../bin/build.sh $ATTINY "$UI" "-DCONFIGFILE=${TARGET}"
mv -f "$UI".hex "$UI".$NAME.hex
done
diff --git a/spaghetti-monster/werner/werner.c b/spaghetti-monster/werner/werner.c
index 4159fc6..1c3d4ad 100644
--- a/spaghetti-monster/werner/werner.c
+++ b/spaghetti-monster/werner/werner.c
@@ -33,6 +33,10 @@
//#define BATTCHECK_8bars // FIXME: breaks build
//#define BATTCHECK_4bars // FIXME: breaks build
+// cut clock speed at very low modes for better efficiency
+// (defined here so config files can override it)
+#define USE_DYNAMIC_UNDERCLOCKING
+
/***** specific settings for known driver types *****/
#ifdef CONFIGFILE
#include "tk.h"
@@ -63,7 +67,6 @@
#define RAMP_LENGTH 150 // default, if not overridden in a driver cfg file
#define USE_BATTCHECK
#define USE_IDLE_MODE // reduce power use while awake and no tasks are pending
-#define USE_DYNAMIC_UNDERCLOCKING // cut clock speed at very low modes for better efficiency
// auto-detect how many eeprom bytes
#define USE_EEPROM
@@ -369,12 +372,14 @@ uint8_t battcheck_state(Event event, uint16_t arg) {
set_state(off_state, 0);
return MISCHIEF_MANAGED;
}
+ #ifdef USE_THERMAL_REGULATION
// 2 clicks: tempcheck mode
else if (event == EV_2clicks) {
blink_confirm(2);
set_state(tempcheck_state, 0);
return MISCHIEF_MANAGED;
}
+ #endif
return EVENT_NOT_HANDLED;
}
#endif
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.