Skip to content

Commit

Permalink
Updated to fix graphing
Browse files Browse the repository at this point in the history
  • Loading branch information
jp3141 authored and jp3141 committed May 25, 2014
1 parent fc11ec3 commit a6c6c60
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 4 deletions.
Binary file added StartingUp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified deg_C.raw
Binary file not shown.
Binary file added eips
Binary file not shown.
Binary file added fb0.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fb0.raw
Binary file not shown.
5 changes: 5 additions & 0 deletions g
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
for R in `seq 0 1 799`; do
echo -ne '5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555\x00\x00' >> xx
done

7 changes: 7 additions & 0 deletions g3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
for R in `seq 0 1 799`; do
cat l2 >> l3
done

tail -n 800 /var/tmp/thermometer.log|awk -v min=$1 -v max=$2 '{printf("echo -ne \"\xFF\xFF\xFF\xFF\xFF\"|dd bs=1 seek=%i of=/dev/fb0 2> /dev/null\n",(FNR-1)*600+100*($7-min)/(max-min))}'|sh

2 changes: 1 addition & 1 deletion getC.awk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
END { # displays -dd or 1dd
T = int(T-32)*5/9 + 0.5)
T = int((T-32)*5/9 + 0.5)
if (T < 0) {
T = -T
firstPos = "minus"
Expand Down
1 change: 0 additions & 1 deletion getF.awk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ if (T < 0) {
tens = int(T/10) % 10
if (T < 10) tens = "blank"
units = T % 10
#system(sprintf("%s %s %s %s", CMD, firstPos, tens, units))
printf("dd if=/dev/zero bs=1 count=480 2> /dev/null | cat - %s.raw %s.raw %s.raw deg_F.raw > /dev/fb0\n", firstPos, tens, units)
printf("./bitblt CurrentKindleTemperature.rXY 550 0");
}
1 change: 0 additions & 1 deletion getT.awk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ if (T < 0) {
tens = int(T/10) % 10
if (T < 10) tens = "blank"
units = T % 10
#system(sprintf("%s %s %s %s", CMD, firstPos, tens, units))
printf("dd if=/dev/zero bs=1 count=480 2> /dev/null | cat - %s.raw %s.raw %s.raw deg_F.raw > /dev/fb0\n", firstPos, tens, units)
printf("./bitblt CurrentKindleTemperature.rXY 550 0");
}
6 changes: 6 additions & 0 deletions graph.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
# args = min max scale_in_pixels=100
./bitblt graphBackground.rXY 0 0
tail -n 800 /var/tmp/thermometer.log|awk -v min=$1 -v max=$2 '{printf("echo -ne \"\xFF\xFF\xFF\xFF\xFF\"|dd bs=1 seek=%i of=/dev/fb0 2> /dev/null\n",(FNR-1)*600+100*($7-min)/(max-min))}'|sh
eips ''
eips "$1 $2"
Binary file added graphBackground.rXY
Binary file not shown.
7 changes: 7 additions & 0 deletions logger.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
PERIOD=60
while :; do
#sleep `date|awk -F '[: ]' '{print 3600-$5*60+$6}'`
printf "%s %s %s %s %s %s; %s F%.s; %4i %2s; %4i %3s; %4s; %4i %2s\n" `date -R;echo -k -l -m -c -v|xargs -n 1 gasgauge-info|tr '\n' ' '`
sleep `date|awk -v PERIOD=$PERIOD -F '[: ]+' '{print PERIOD-$6 % PERIOD}'`
done
2 changes: 1 addition & 1 deletion showstatus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ if [ $1 -eq 105 ]; then cp getF.awk getT.awk; fi


# UP key
if [ $1 -eq 103 ]; then ./graph 9 -50 50; exit 0; fi
if [ $1 -eq 103 ]; then ./graph.sh 0 100; exit 0; fi

# top right button (broken button on K2)
if [ $1 -eq 109 ]; then /etc/init.d/wifid stop; fi
Expand Down

0 comments on commit a6c6c60

Please sign in to comment.