#!/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/2024_aubusson/1_presentation.wav sleep 1 aplay ~/BallonSonde/sound/2024_aubusson/2_tx_sstv.wav ionice -c 2 -n 0 aplay /ramfs/out.wav sleep 1 aplay ~/BallonSonde/sound/2024_aubusson/2_tx_qpsk.wav # Generate the wav file to Tx /home/pi/BallonSonde/tx_process/qpsk31 # Tx the wav file ! aplay /ramfs/psk.wav aplay ~/BallonSonde/sound/2024_aubusson/3_tx_cw.wav echo "F4KOA-AM F4KOA-AM from France" | /usr/local/bin/cwwav -f 700 -w 20 -o /ramfs/cw.wav aplay /ramfs/cw.wav; rm /ramfs/cw.wav /home/pi/BallonSonde/read_nmea.py | awk '{print $10$3$4$5$6}' | sed -e "s/,/ /g" | sed -e "s/ NS=//g" | sed -e "s/ EW=//g" | sed -e "s/=/ /g" | /usr/local/bin/cwwav -f 700 -w 20 -o /ramfs/cw.wav # alt 311.7 lat 46.0154466667N lon 1.0988666667E for example... aplay /ramfs/cw.wav; rm /ramfs/cw.wav aplay ~/BallonSonde/sound/2024_aubusson/9_stop_en.wav aplay ~/BallonSonde/sound/2024_aubusson/9_stop_fr.wav raspi-gpio set 4 dh if [[ -f /ramfs/out.wav ]]; then echo " => All done, cleaning ramfs" rm -rf /ramfs/out.wav fi