1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #!/bin/bash
- if [ ! -f /ramfs/.canbetx ]; then
- echo "Nothing to transmit, wait 5 seconds"
- sleep 5
- exit 1
- fi
- rm /ramfs/.canbetx
- echo "=> moving totx.wav to out.wav"
- mv /ramfs/totx.wav /ramfs/out.wav
- # Utile pour couper le TX quand on ctrl+c et que le script n'abouti pas
- trap ctrl_c INT
- function ctrl_c() {
- echo "Ctrl + C happened"
- raspi-gpio set 4 dh
- rm -rf /ramfs/*
- }
- # Setup the GPIO4 as output for Tx
- raspi-gpio set 4 op && raspi-gpio set 4 dh
- raspi-gpio set 4 dl
- sleep 1
- echo " => Playing WAV file"
- cd ~/trxamadrmv3_7/linux
- ./txwfal 0
- sleep 1
- aplay ~/BallonSonde/sound/annonce_start.wav
- sleep 1
- aplay /ramfs/out.wav
- aplay ~/BallonSonde/sound/annonce_stop.wav
- raspi-gpio set 4 dh
- if [[ -f /ramfs/out.wav ]]; then
- echo " => All done, cleaning ramfs"
- rm -rf /ramfs/out.wav
- fi
- /home/pi/BallonSonde/tx_process/qpsk31
|