123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #!/bin/bash
- # 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
- IMG=$(cd /ramfs; find ./ -type f -name *.jpg -exec readlink -f {} \;)
- #############
- # Mode SSTV
- echo " => Converting image to WAV..."
- cd ~/PySSTV/
- source bin/activate
- python -m pysstv --mode PD120 $IMG /ramfs/out.wav
- deactivate
- raspi-gpio set 4 dl
- sleep 1
- echo " => Playing WAV file"
- # TXT_TO_WFALL
- cd ~/trxamadrmv3_7/linux
- ./txwfal 0
- sleep 1
- espeak "Radio station S S T V"
- sleep 1
- aplay /ramfs/out.wav
- raspi-gpio set 4 dh
- espeak "End of transmission"
- #############
- # Mode DRM
- #cd ~/trxamadrmv3_7/linux/
- #(./drm $IMG; raspi-gpio set 4 dh)
- echo " => All done, cleaning ramfs"
- rm -rf /ramfs/*
|