Update transmit.py add gpsd check before programming FM

pi-sensors-auto-gps
Alan Johnston 2 days ago committed by GitHub
parent 748c791200
commit df3189a288
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -11,6 +11,7 @@ from os import system
from PIL import Image, ImageDraw, ImageFont, ImageColor
import serial
import random
import subprocess
def sim_failure_check():
try:
@ -395,7 +396,11 @@ if __name__ == "__main__":
card = "Headphones" # default using pcm audio output of Pi Zero
# card = "Device" # using USB sound card for audio output
if (mode != 'e'):
query = ["sudo", "systemctl", "is-active", "gpsd.socket.service"]
result = subprocess.run(query, capture_output=True, text=True, check=True)
print(result.stdout)
if (mode != 'e') and (result.stdout != "active"):
print("Programming FM module!\n");
output(pd, 1)
output (ptt, 1)

Loading…
Cancel
Save

Powered by TurnKey Linux.