Hello.
Just in case it has not been discussed yet, the QT framework provides a QTSerialPort module triggering events in the QT main loop when bytes are received on the serial port.
I am not familiar enough with nanovna-saver to make a suggestion or even be sure that this module can be used, but my experience on a simpler project is that QT callbacks are way easyer to maintain than a separate thread blocking on the serial port and locks.
Hello. Just in case it has not been discussed yet, the QT framework provides a QTSerialPort module triggering events in the QT main loop when bytes are received on the serial port. I am not familiar enough with nanovna-saver to make a suggestion or even be sure that this module can be used, but my experience on a simpler project is that QT callbacks are way easyer to maintain than a separate thread blocking on the serial port and locks.