I have 2 python codes that run in subprocess, both calling vehicle = connect('/dev/ttyS0', heartbeat_timeout = 30, baud = 57600) simultaneously for different tasks (for radio controller's channels logging, automation, etc).
the codes work as intended but the connection between Raspberry Pi and PixHawk over serial sometime drop before reconnect automatically. This make me worried because it might affect the accuracy of data logging.
I tried passing the vehicle variable to other python and wrap vehicle into modules but both doesn't work. There's any way to share vehicle variable between 2 python code or I'm stuck with combining my codes to utilize threading for global variable?
Thanks in advance.