Update scripts

This commit is contained in:
Satu Koskinen 2022-10-02 15:24:51 +03:00
parent 45cc34de3b
commit 06e8e063a8
8 changed files with 37 additions and 22 deletions

View File

@ -8,14 +8,10 @@ GOVERNOR="performance"
MAX_SPEED="0"
MIN_SPEED="0" " | sudo tee -a /etc/default/cpufrequtils
# Install other useful tools
sudo apt-get install htop git perl vim
# Set CPU governor
sudo sed -i 's/exit 0/sudo cpufreq-set -r -g performance/g' /etc/rc.local
sudo echo "exit 0" | sudo tee -a /etc/rc.local
# Set realtime priority and memlock
sudo echo "
@audio nice -15

View File

@ -1,5 +1,23 @@
#!/bin/sh
# Install jackd
# Get ID and number of the USB audio device
# Audio setup utils
card_number=$(aplay -l | grep -i usb | grep -i audio | cut -d ' ' -f 2 | cut -d ':' -f 1)
# Change default audio device
sudo touch /etc/asound.conf
sudo cat << EOF | sudo tee -a /etc/asound.conf
pcm.!default {
type plug
slave {
pcm "hw:$card_number,0"
}
}
ctl.!default {
type hw
card $card_number
}
EOF

View File

@ -0,0 +1 @@
#!/bin/sh

View File

@ -1,3 +1,3 @@
#!/bin/sh
(trap 'kill 0' SIGINT; ./scripts/start-gps.sh & ./scripts/start-audio.sh)
(trap 'kill 0' SIGINT; ./scripts/start-gps.sh & ./scripts/start-audio.sh & ./scripts/start-pressure-depth.sh)

View File

@ -1,9 +1,7 @@
#!/bin/sh
# Start jack server
AUDIO_TARGET_LOCATION="/home/shared/hydrophonitor/audio-logger/target/release"
AUDIO_TARGET_EXECUTABLE="audio"
OPTIONS=""
sh scripts/start-jack.sh
# Start recording
cd audio-logger && cargo run
cd $AUDIO_TARGET_LOCATION && ./AUDIO_TARGET_EXECUTABLE $OPTIONS

View File

@ -1,3 +1,6 @@
#!/usr/bin/sh
python /home/shared/logger-raspi-setup/gps-logger/record-gps.py
GPS_TARGET_LOCATION="/home/shared/hydrophonitor/gps-logger"
OPTIONS=""
cd $GPS_TARGET_LOCATION && python record-gps.py $OPTIONS

View File

@ -1,7 +0,0 @@
#!/bin/sh
# Get soundcard name
soundcard=$(grep USB /proc/asound/cards | grep -oe "\[.*]" | tr -d "[] ")
# Start jack server
/usr/bin/jackd -P75 -d alsa -d hw:${soundcard} -r 44100 -p 512 -n 3 &

View File

@ -0,0 +1,6 @@
#!/usr/bin/sh
DEPTH_TARGET_LOCATION="/home/shared/hydrophonitor/depth-logger"
OPTIONS=""
cd $DEPTH_TARGET_LOCATION && python record-depth.py $OPTIONS