Merge pull request #85 from alanbjohnston/dev-ready

Moving rpitx for APRS/AFSK mode into rpitx.py instead of in radio afsk
pull/87/head
alanbjohnston 5 years ago committed by GitHub
commit a13cea9072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -869,7 +869,8 @@ void get_tlm(void) {
char header_long[10];
char header_str4[] = "hi hi ";
char footer_str1[] = "\' > t.txt && echo \'";
char footer_str[] = ">CQ:010101/hi hi ' >> t.txt && gen_packets -o telem.wav t.txt -r 48000 > /dev/null 2>&1 && cat telem.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3 > /dev/null 2>&1";
// char footer_str[] = ">CQ:010101/hi hi ' >> t.txt && gen_packets -o telem.wav t.txt -r 48000 > /dev/null 2>&1 && cat telem.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3 > /dev/null 2>&1";
char footer_str[] = ">CQ:010101/hi hi ' >> t.txt && touch ready"; // transmit is done by rpitx.py
if (ax5043) {
strcpy(str, header_str);
@ -1004,6 +1005,7 @@ void get_tlm(void) {
if (transmit) {
FILE * file2 = popen(str, "r");
pclose(file2);
sleep(2);
} else {
fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n");
fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n");

@ -48,7 +48,13 @@ if __name__ == "__main__":
if (('a' == sys.argv[1]) or ('afsk' in sys.argv[1])):
print("AFSK")
while True:
time.sleep(5)
try:
f = open("ready")
os.system("gen_packets -o telem.wav t.txt -r 48000 > /dev/null 2>&1 && cat telem.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3 > /dev/null 2>&1")
os.system("rm ready")
time.sleep(0.5)
except:
time.sleep(0.5)
elif (('s' == sys.argv[1]) or ('sstv' in sys.argv[1])):
print("SSTV")
GPIO.output(txLed, txLedOn);

Loading…
Cancel
Save

Powered by TurnKey Linux.