Sorry you merged so fast, by fixing the infinite loop on oneshot run, I introduced a bug for the one-shot option: loop thread exit right after querying; letting the main thread with no time to retrieve data stored in query buffer. Leaving after the sleep delay in the poll thread resolve the issue. Also I changed the ups_leave test to an else if to prevent an eventual leave without printing data.
I had in hands an inverter to test this out yesterday and it seams to work well now.
Sorry you merged so fast, by fixing the infinite loop on oneshot run, I introduced a bug for the one-shot option: loop thread exit right after querying; letting the main thread with no time to retrieve data stored in query buffer. Leaving after the sleep delay in the poll thread resolve the issue. Also I changed the ups_leave test to an else if to prevent an eventual leave without printing data.
I had in hands an inverter to test this out yesterday and it seams to work well now.