Update transmit.py os_status to detect trixie

master-bt
Alan Johnston 5 days ago committed by GitHub
parent 071fc9aa48
commit 4c24c32290
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -174,7 +174,7 @@ def camera_photo():
system("sudo rm /home/pi/CubeSatSim/camera_out.jpg") system("sudo rm /home/pi/CubeSatSim/camera_out.jpg")
stored_image = False stored_image = False
try: try:
if os_status == "bookworm": if os_status == "bookworm" or os_status == "trixie":
system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1")
else: else:
system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256")
@ -907,8 +907,10 @@ if __name__ == "__main__":
os_status = e.stdout.strip() os_status = e.stdout.strip()
print(f"Output of the command (stdout): {e.stdout}") print(f"Output of the command (stdout): {e.stdout}")
# print(f"Error output of the command (stderr): {e.stderr}") # print(f"Error output of the command (stderr): {e.stderr}")
if os_status != "VERSION_CODENAME=bullseye": if os_status == "VERSION_CODENAME=bookworm":
os_status = "bookworm" os_status = "bookworm"
elif os_status == "VERSION_CODENAME=trixie":
os_status = "trixie"
else: else:
os_status = "bullseye" os_status = "bullseye"
print (os_status) print (os_status)
@ -1175,7 +1177,7 @@ if __name__ == "__main__":
# from pysstv.sstv import SSTV # from pysstv.sstv import SSTV
# camera = PiCamera() # camera = PiCamera()
print("Testing for camera") print("Testing for camera")
if os_status == "bookworm": if os_status == "bookworm" or os_status == "trixie":
system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1")
else: else:
system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256")

Loading…
Cancel
Save

Powered by TurnKey Linux.