Skip to content

Commit

Permalink
Rearranged source and demos, instructions are now in the manual
Browse files Browse the repository at this point in the history
  • Loading branch information
rricharz committed Feb 25, 2024
1 parent 9f3e7b1 commit 15bcbb5
Show file tree
Hide file tree
Showing 20 changed files with 36 additions and 536 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
*.i*86
*.x86_64
*.hex
tek4010

# Debug files
*.dSYM/
Expand Down
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

Binary file added Manual.odt
Binary file not shown.
Binary file added Manual.pdf
Binary file not shown.
500 changes: 2 additions & 498 deletions README.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions ICEMD_demo.sh → demos/ICEMD_demo.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
# rricharz 2019

wait5s() {
wait1s() {
# let tek4010 wait 5 seconds (not this script, which just shuffles stuff into the buffer!)
for i in {1..100}
for i in {1..15}
do
printf '\007'
done
Expand All @@ -18,7 +18,7 @@ do
printf '\033\014'
echo tek4010 is displaying "$filename"
cat "$filename"
wait5s
wait1s
done

done
Expand Down
16 changes: 6 additions & 10 deletions demo.sh → demos/demo.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,32 @@
#!/bin/bash
# rricharz 2019

wait5s() {
# let tek4010 wait 5 seconds (not this script, which just shuffles stuff into the buffer!)
for i in {1..100}
wait1s() {
# let tek4010 wait 2 seconds (not this script, which just shuffles stuff into the buffer!)
for i in {1..15}
do
printf '\007'
done
}

head -n 26 tek4010.c

wait5s
# erase screen
printf '\033\014'

cat pltfiles/00README.txt

wait5s
wait5s
wait1s

cat dodekagon.plt

wait5s
wait1s

for filename in pltfiles/*.plt
do
# erase screen
printf '\033\014'
echo tek4010 is displaying "$filename"
cat "$filename"
wait5s
wait1s
done


Expand Down
14 changes: 7 additions & 7 deletions fdemo.sh → demos/fdemo.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
#!/bin/bash
# rricharz 2019

wait2s() {
wait1s() {
# let tek4010 wait 5 seconds (not this script, which just shuffles stuff into the buffer!)
for i in {1..30}
for i in {1..15}
do
printf '\007'
done
}

cat dodekagon.plt

wait2s
wait1s

for filename in pltfiles/*.plt
do
# erase screen
printf '\033\014'
printf '\0338'
cat "$filename"
wait2s
wait1s
done

for filename in pltfiles/More_pltfiles/*.plt
Expand All @@ -28,7 +28,7 @@ do
printf '\033\014'
printf '\0338'
cat "$filename"
wait2s
wait1s
done

for filename in pltfiles/ICEMD_pltfiles/*.plt
Expand All @@ -37,7 +37,7 @@ do
printf '\033\014'
printf '\033:'
cat "$filename"
wait2s
wait1s
done

for filename in pltfiles//PointPlot/*.plt
Expand All @@ -46,7 +46,7 @@ do
printf '\033\014'
printf '\0338'
cat "$filename"
wait2s
wait1s
done


Expand Down
6 changes: 3 additions & 3 deletions gdemo.sh → demos/gdemo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# gdemo, run with tek4010 to display grayscale images
# rricharz 2019

wait2s() {
wait1s() {
# let tek4010 wait 2 seconds (not this script, which just shuffles stuff into the buffer!)
for i in {1..30}
for i in {1..15}
do
printf '\007'
done
Expand All @@ -15,7 +15,7 @@ do
# erase screen
printf '\033\014'
cat "$filename"
wait2s
wait1s
done


Expand Down
4 changes: 2 additions & 2 deletions idemo.sh → demos/idemo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# idemo, run with tek4010 to display ICEMD vector data
# rricharz 2019

wait2s() {
wait1s() {
# let tek4010 wait 2 seconds (not this script, which just shuffles stuff into the buffer!)
for i in {1..30}
do
Expand All @@ -20,7 +20,7 @@ do
printf '<033:'
echo tek4010 is displaying "$filename"
cat "$filename"
wait2s
wait1s
done

done
Expand Down
3 changes: 3 additions & 0 deletions demos/readme
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Usage:
Go to your Tek4010 directory
Type tek4010 demos/demo.sh
3 changes: 2 additions & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
cp tek4010 ~/bin
chmod +x ~/bin/tek4010

echo "tek4010 installed"
echo "tek4010 installed."
echo "Reboot if this is the first time tek4010 is installed"
5 changes: 2 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ CFLAGS = -std=c99 `pkg-config --cflags gtk+-3.0`

all: tek4010

tek4010: main.c main.h tube.c tube.h tek4010.c ards.c
$(CC) -o tek4010 main.c tube.c tek4010.c ards.c $(LIBS) $(CFLAGS)
tek4010: src/main.c src/main.h src/tube.c src/tube.h src/tek4010.c src/ards.c
$(CC) -o tek4010 src/main.c src/tube.c src/tek4010.c src/ards.c $(LIBS) $(CFLAGS)

install: tek4010
./install

.PHONY : clean
clean :
-rm -f tek4010
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions tube.c → src/tube.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
#define DEBUGMAX 0 // exit after DEBUGMAX chars, 0 means no exit

#define WRITE_TROUGH_INTENSITY 0.5 // green only
#define NORMAL_INTENSITY 0.8
#define CURSOR_INTENSITY 0.8
#define NORMAL_INTENSITY 0.7
#define CURSOR_INTENSITY 0.7
#define BRIGHT_SPOT_COLOR 1.0
#define BRIGHT_SPOT_COLOR_HALF 0.6
#define BLACK_COLOR 0.08 // effect of flood gun
#define FADE 0.3 // lower value means slower fading

#define _GNU_SOURCE

Expand Down Expand Up @@ -586,7 +587,7 @@ void tube_clearPersistent(cairo_t *cr, cairo_t *cr2)
void tube_clearSecond(cairo_t *cr2)
// clear second surface
{
cairo_set_source_rgba(cr2, 0, 0, 0, 0.2);
cairo_set_source_rgba(cr2, 0, 0, 0, FADE);
cairo_set_operator(cr2, CAIRO_OPERATOR_MULTIPLY);
cairo_paint(cr2);
cairo_set_operator(cr2, CAIRO_OPERATOR_OVER);
Expand Down Expand Up @@ -877,7 +878,7 @@ void tube_drawVector(cairo_t *cr, cairo_t *cr2)


// draw the bright spot, high intensity
cairo_set_line_width (cr, pensize + defocussed);
cairo_set_line_width (cr, (pensize+1) + defocussed);
cairo_set_source_rgb(cr2, 0, BRIGHT_SPOT_COLOR, 0);
cairo_move_to(cr2, tube_x0, windowHeight - tube_y0);
cairo_line_to(cr2, tube_x2, windowHeight - tube_y2);
Expand Down
File renamed without changes.
Binary file modified tek4010
Binary file not shown.

0 comments on commit 15bcbb5

Please sign in to comment.