aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README20
-rwxr-xr-xbin/level_calc.py23
-rw-r--r--spaghetti-monster/meteor/meteor.c1
-rwxr-xr-xspaghetti-monster/rampingios/build-all.sh8
l---------spaghetti-monster/rampingios/cfg-blf-gt.h1
l---------spaghetti-monster/rampingios/cfg-blf-q8.h1
l---------spaghetti-monster/rampingios/cfg-emisar-d1.h1
l---------spaghetti-monster/rampingios/cfg-emisar-d1s.h1
l---------spaghetti-monster/rampingios/cfg-emisar-d4.h1
l---------spaghetti-monster/rampingios/cfg-emisar-d4s-219c.h1
l---------spaghetti-monster/rampingios/cfg-emisar-d4s.h1
l---------spaghetti-monster/rampingios/cfg-fw3a.h1
-rwxr-xr-xspaghetti-monster/werner/build-all.sh19
l---------spaghetti-monster/werner/cfg-blf-gt.h1
l---------spaghetti-monster/werner/cfg-blf-q8.h1
l---------spaghetti-monster/werner/cfg-emisar-d1.h1
l---------spaghetti-monster/werner/cfg-emisar-d1s.h1
l---------spaghetti-monster/werner/cfg-emisar-d4.h1
l---------spaghetti-monster/werner/cfg-fw3a.h1
19 files changed, 56 insertions, 29 deletions
diff --git a/README b/README
index c3f09e1..6d2cf24 100644
--- a/README
+++ b/README
@@ -23,9 +23,23 @@ A general overview of what you need to get going is here:
Some useful hardware for flashing firmware:
- http://www.fasttech.com/product/1002900-atmega-attiny-51-avr-isp-usbasp-usb-programmer
- http://www.fasttech.com/product/1011800-40-pin-splittable-ribbon-cable-20cm
- http://www.digikey.com/product-detail/en/5250/501-1311-ND/745102
+ What TK uses:
+
+ http://www.fasttech.com/product/1002900-atmega-attiny-51-avr-isp-usbasp-usb-programmer
+ http://www.fasttech.com/product/1011800-40-pin-splittable-ribbon-cable-20cm
+ http://www.digikey.com/product-detail/en/5250/501-1311-ND/745102
+
+ Ratus' guide: https://redd.it/8g5l5w (prices checked 2018-05-01)
+
+ Store A: About $4.20 shipped
+ https://www.aliexpress.com/item/USB-ISP-Programmer-for-ATMEL-AVR-ATMega-ATTiny-51-AVR-Board-ISP-Downloader/32699341177.html
+ https://www.aliexpress.com/item/WAVGAT-Programmer-Testing-Clip-SOP8-SOP-SOIC-8-SOIC8-DIP8-DIP-8-Pin-IC-Test-Clamp/32827794024.html
+ https://www.aliexpress.com/item/40Pin-20CM-2-54MM-Row-Female-to-Female-F-F-Dupont-Cable-Breadboard-Jumper-Wire-for/32822958653.html
+
+ Store B: About $4.18 shipped:
+ https://www.aliexpress.com/store/product/1pcs-New-USBASP-USBISP-AVR-Programmer-USB-ISP-USB-ASP-ATMEGA8-ATMEGA128-Support-Win7-64K/1171090_32809542958.html
+ https://www.aliexpress.com/store/product/Free-shipping-Programmer-Testing-Clip-SOP8-SOP-SOIC-8-SOIC8-DIP8-DIP-8-Pin-IC-Test/1171090_32402561848.html
+ https://www.aliexpress.com/store/product/20pcs-20cm-2-54mm-1p-1p-Pin-Female-to-Female-Color-Breadboard-Cable-Jump-Wire-Jumper/1171090_32628811461.html
For Windows users, these links may be useful:
diff --git a/bin/level_calc.py b/bin/level_calc.py
index 4dc1356..2aa8727 100755
--- a/bin/level_calc.py
+++ b/bin/level_calc.py
@@ -5,6 +5,8 @@ from __future__ import print_function
import math
interactive = False
+# supported shapes: ninth, fifth, cube, square, log_e, log_2
+ramp_shape = 'cube'
def main(args):
@@ -160,20 +162,21 @@ def get_value(text, default, args):
return result
+shapes = dict(
+ ninth = (lambda x: x**9, lambda x: math.pow(x, 1/9.0)),
+ fifth = (lambda x: x**5, lambda x: math.pow(x, 1/5.0)),
+ cube = (lambda x: x**3, lambda x: math.pow(x, 1/3.0)),
+ square = (lambda x: x**2, lambda x: math.pow(x, 1/2.0)),
+ log_e = (lambda x: math.e**x, lambda x: math.log(x, math.e)),
+ log_2 = (lambda x: 2.0**x, lambda x: math.log(x, 2.0)),
+ )
+
def power(x):
- #return x**5
- return x**3
- #return x**2
- #return math.e**x
- #return 2.0**x
+ return shapes[ramp_shape][0](x)
def invpower(x):
- #return math.pow(x, 1/5.0)
- return math.pow(x, 1/3.0)
- #return math.pow(x, 1/2.0)
- #return math.log(x, math.e)
- #return math.log(x, 2.0)
+ return shapes[ramp_shape][1](x)
def input_text():
diff --git a/spaghetti-monster/meteor/meteor.c b/spaghetti-monster/meteor/meteor.c
index 3ec79f4..b2467d7 100644
--- a/spaghetti-monster/meteor/meteor.c
+++ b/spaghetti-monster/meteor/meteor.c
@@ -521,6 +521,7 @@ void setup() {
}
void loop() {
+ if (0) {}
/*
if (current_state == strobe_beacon_state) {
switch(strobe_beacon_mode) {
diff --git a/spaghetti-monster/rampingios/build-all.sh b/spaghetti-monster/rampingios/build-all.sh
index 003a28c..bafbf25 100755
--- a/spaghetti-monster/rampingios/build-all.sh
+++ b/spaghetti-monster/rampingios/build-all.sh
@@ -1,5 +1,9 @@
#!/bin/sh
+cp -av ../anduril/cfg*.h .
+
+UI=rampingiosv3
+
for TARGET in \
BLF_GT \
BLF_Q8 \
@@ -11,6 +15,6 @@ for TARGET in \
FW3A \
; do
echo "===== $TARGET ====="
- ../../../bin/build-85.sh rampingiosv3 "-DFSM_${TARGET}_DRIVER"
- mv -f rampingiosv3.hex rampingiosv3.$TARGET.hex
+ ../../../bin/build-85.sh "$UI" "-DFSM_${TARGET}_DRIVER"
+ mv -f "$UI".hex "$UI".$TARGET.hex
done
diff --git a/spaghetti-monster/rampingios/cfg-blf-gt.h b/spaghetti-monster/rampingios/cfg-blf-gt.h
deleted file mode 120000
index 5e10228..0000000
--- a/spaghetti-monster/rampingios/cfg-blf-gt.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-blf-gt.h \ No newline at end of file
diff --git a/spaghetti-monster/rampingios/cfg-blf-q8.h b/spaghetti-monster/rampingios/cfg-blf-q8.h
deleted file mode 120000
index fe84054..0000000
--- a/spaghetti-monster/rampingios/cfg-blf-q8.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-blf-q8.h \ No newline at end of file
diff --git a/spaghetti-monster/rampingios/cfg-emisar-d1.h b/spaghetti-monster/rampingios/cfg-emisar-d1.h
deleted file mode 120000
index f8b4c9b..0000000
--- a/spaghetti-monster/rampingios/cfg-emisar-d1.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-emisar-d1.h \ No newline at end of file
diff --git a/spaghetti-monster/rampingios/cfg-emisar-d1s.h b/spaghetti-monster/rampingios/cfg-emisar-d1s.h
deleted file mode 120000
index b6cfba6..0000000
--- a/spaghetti-monster/rampingios/cfg-emisar-d1s.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-emisar-d1s.h \ No newline at end of file
diff --git a/spaghetti-monster/rampingios/cfg-emisar-d4.h b/spaghetti-monster/rampingios/cfg-emisar-d4.h
deleted file mode 120000
index fb74f2c..0000000
--- a/spaghetti-monster/rampingios/cfg-emisar-d4.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-emisar-d4.h \ No newline at end of file
diff --git a/spaghetti-monster/rampingios/cfg-emisar-d4s-219c.h b/spaghetti-monster/rampingios/cfg-emisar-d4s-219c.h
deleted file mode 120000
index f1c90f0..0000000
--- a/spaghetti-monster/rampingios/cfg-emisar-d4s-219c.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-emisar-d4s-219c.h \ No newline at end of file
diff --git a/spaghetti-monster/rampingios/cfg-emisar-d4s.h b/spaghetti-monster/rampingios/cfg-emisar-d4s.h
deleted file mode 120000
index 4a03321..0000000
--- a/spaghetti-monster/rampingios/cfg-emisar-d4s.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-emisar-d4s.h \ No newline at end of file
diff --git a/spaghetti-monster/rampingios/cfg-fw3a.h b/spaghetti-monster/rampingios/cfg-fw3a.h
deleted file mode 120000
index 5bc8b21..0000000
--- a/spaghetti-monster/rampingios/cfg-fw3a.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-fw3a.h \ No newline at end of file
diff --git a/spaghetti-monster/werner/build-all.sh b/spaghetti-monster/werner/build-all.sh
new file mode 100755
index 0000000..944b31d
--- /dev/null
+++ b/spaghetti-monster/werner/build-all.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+cp -av ../anduril/cfg*.h .
+
+UI=werner
+
+for TARGET in \
+ BLF_GT \
+ BLF_Q8 \
+ EMISAR_D1 \
+ EMISAR_D1S \
+ EMISAR_D4 \
+ EMISAR_D4S \
+ FW3A \
+ ; do
+ echo "===== $TARGET ====="
+ ../../../bin/build-85.sh "$UI" "-DFSM_${TARGET}_DRIVER"
+ mv -f "$UI".hex "$UI".$TARGET.hex
+done
diff --git a/spaghetti-monster/werner/cfg-blf-gt.h b/spaghetti-monster/werner/cfg-blf-gt.h
deleted file mode 120000
index 5e10228..0000000
--- a/spaghetti-monster/werner/cfg-blf-gt.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-blf-gt.h \ No newline at end of file
diff --git a/spaghetti-monster/werner/cfg-blf-q8.h b/spaghetti-monster/werner/cfg-blf-q8.h
deleted file mode 120000
index fe84054..0000000
--- a/spaghetti-monster/werner/cfg-blf-q8.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-blf-q8.h \ No newline at end of file
diff --git a/spaghetti-monster/werner/cfg-emisar-d1.h b/spaghetti-monster/werner/cfg-emisar-d1.h
deleted file mode 120000
index f8b4c9b..0000000
--- a/spaghetti-monster/werner/cfg-emisar-d1.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-emisar-d1.h \ No newline at end of file
diff --git a/spaghetti-monster/werner/cfg-emisar-d1s.h b/spaghetti-monster/werner/cfg-emisar-d1s.h
deleted file mode 120000
index b6cfba6..0000000
--- a/spaghetti-monster/werner/cfg-emisar-d1s.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-emisar-d1s.h \ No newline at end of file
diff --git a/spaghetti-monster/werner/cfg-emisar-d4.h b/spaghetti-monster/werner/cfg-emisar-d4.h
deleted file mode 120000
index fb74f2c..0000000
--- a/spaghetti-monster/werner/cfg-emisar-d4.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-emisar-d4.h \ No newline at end of file
diff --git a/spaghetti-monster/werner/cfg-fw3a.h b/spaghetti-monster/werner/cfg-fw3a.h
deleted file mode 120000
index 5bc8b21..0000000
--- a/spaghetti-monster/werner/cfg-fw3a.h
+++ /dev/null
@@ -1 +0,0 @@
-../anduril/cfg-fw3a.h \ No newline at end of file