From c02f0f97ad67e28335a18a060e859f1c05c30906 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 18 May 2019 03:26:25 -0600 Subject: added link to HQ ProgKey, since it's increasingly important for newer drivers --- README | 1 + 1 file changed, 1 insertion(+) diff --git a/README b/README index 3cb27e9..6a63e5b 100644 --- a/README +++ b/README @@ -28,6 +28,7 @@ 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 + HQ ProgKey: http://budgetlightforum.com/node/63230 Ratus' guide: https://redd.it/8g5l5w (prices checked 2018-05-01) -- cgit v1.2.3 From b5d3675b555b1ea87cf2ced6f3c70087e32828d0 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Sat, 15 Jun 2019 17:44:06 -0600 Subject: Added setup info for Fedora. --- README | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README b/README index 6a63e5b..1e6e842 100644 --- a/README +++ b/README @@ -70,6 +70,12 @@ To set up an attiny dev environment on Ubuntu (13.10): Optional: (make avrdude usable by non-root users, is a security risk) sudo chmod u+s $(which avrdude) +To set up an attiny dev environment on Fedora (30): + + sudo dnf install flex byacc bison gcc libusb libusb-devel glibc-devel + sudo dnf install avr-gcc avr-libc avr-binutils + sudo dnf install avrdude + Building/installing attiny dev tools on other UNIX systems (in general): http://www.ladyada.net/learn/avr/setup-unix.html -- cgit v1.2.3 From a67ba8d52f04fc74d90f1885325f76cec04546f4 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Wed, 28 Aug 2019 02:28:01 -0600 Subject: added arbitrary ramp shape powers to level_calc.py, to more easily hit specific values --- bin/level_calc.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/bin/level_calc.py b/bin/level_calc.py index f16f8ce..6f07621 100755 --- a/bin/level_calc.py +++ b/bin/level_calc.py @@ -14,7 +14,7 @@ def main(args): """ # Get parameters from the user questions_main = [ - (str, 'ramp_shape', 'cube', 'Ramp shape? [cube, square, fifth, seventh, ninth, log]'), + (str, 'ramp_shape', 'cube', 'Ramp shape? [cube, square, fifth, seventh, ninth, log, N.NN]'), (int, 'num_channels', 1, 'How many power channels?'), (int, 'num_levels', 4, 'How many total levels do you want?'), ] @@ -179,11 +179,19 @@ shapes = dict( ) def power(x): - return shapes[ramp_shape][0](x) + try: + factor = float(ramp_shape) + return math.pow(x, factor) + except ValueError: + return shapes[ramp_shape][0](x) def invpower(x): - return shapes[ramp_shape][1](x) + try: + factor = float(ramp_shape) + return math.pow(x, 1.0 / factor) + except ValueError: + return shapes[ramp_shape][1](x) def input_text(): -- cgit v1.2.3 From 87f5095f52e8e9ccb30ee4ff4beda75ef5b11baa Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Wed, 18 Sep 2019 16:17:27 -0600 Subject: added a compile flag to fix compatibility with GCC 7/8/9's new semantics for "inline" (should fix builds on newer compilers, I think) --- bin/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index 192fa30..fbb24ea 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -14,9 +14,9 @@ export PROGRAM=$1 ; shift export MCU=attiny$ATTINY export CC=avr-gcc export OBJCOPY=avr-objcopy -export CFLAGS="-Wall -g -Os -mmcu=$MCU -c -std=gnu99 -DATTINY=$ATTINY -I.. -I../.. -I../../.. -fshort-enums" +export CFLAGS="-Wall -g -Os -mmcu=$MCU -c -std=gnu99 -fgnu89-inline -DATTINY=$ATTINY -I.. -I../.. -I../../.. -fshort-enums" export OFLAGS="-Wall -g -Os -mmcu=$MCU" -export LDFLAGS= +export LDFLAGS="-fgnu89-inline" export OBJCOPYFLAGS='--set-section-flags=.eeprom=alloc,load --change-section-lma .eeprom=0 --no-change-warnings -O ihex' export OBJS=$PROGRAM.o -- cgit v1.2.3