Initial commit of files

This commit is contained in:
2021-01-22 10:16:20 -05:00
parent 32d165ec8f
commit ed92211680
534 changed files with 68563 additions and 19 deletions

6
bin-scripts/can-down Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
killall candump 2> /dev/null
ifconfig can0 down 2> /dev/null
ifconfig vcan0 down 2> /dev/null

5
bin-scripts/can-dump Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
can-info
candump -cae can0

5
bin-scripts/can-log-replay Executable file
View File

@ -0,0 +1,5 @@
#/bin/sh
echo "can-logging $1 replaying to CAN any indefinitely"
canplayer -l i -I $@

26
bin-scripts/can-log-start Executable file
View File

@ -0,0 +1,26 @@
#!/bin/sh
# log file name based on time
TIMESTAMP=`date +'%Y-%m-%d_%H%M%S'`
LOGDIR=.
LOGFILE=$LOGDIR/candump-$TIMESTAMP.log
PIDDIR=.
PIDFILE=$PIDDIR/can-log.pid
IF=any
# log directory
if [ ! -d $LOGDIR ]; then
echo "Please run cnomicon-setup!"
exit 1
fi
# kill if already running (restart)
if [ -f $PIDFILE ]; then
sudo pkill -F $PIDFILE
fi
# let 'er rip
candump -L -l any > $LOGFILE &
echo $! > $PIDFILE
echo "CANdump logging started to $LOGFILE"

12
bin-scripts/can-log-stop Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
# log file name based on time
PIDDIR=.
PIDFILE=$PIDDIR/can-log.pid
# kill if already running (restart)
if [ -f $PIDFILE ]; then
pkill -F $PIDFILE
echo "CANdump logging stopped"
rm -f $PIDFILE
fi

5
bin-scripts/can-record Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
can-info
candump -l can0

4
bin-scripts/can-replay Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
canplayer -I $1 $2 $3 $4 $5 $6 $7 $8 $9

8
bin-scripts/can-status Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
lspcan
ls -l /dev/pcan*
cat /proc/pcan
ifconfig can0
ifconfig vcan0
can-info

13
bin-scripts/can-up Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
# PCAN
echo "Can0"
modprobe pcan
ip link set can0 up type can bitrate 500000
ifconfig can0 up
# VCAN
echo "Vcan0"
modprobe vcan
ip link add dev vcan0 type vcan
ip link set up vcan0

9
bin-scripts/nmea2kml Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
for i in $@
do
BAS=`basename $i .nmea`
KML=$BAS.kml
gpsbabel -t -i nmea -f $i -o kml,units=m -f $KML
done