Communication for BK powersupply
With the updated libCom, we can't talk anymore with the BK power supply. I tried different configurations in json:
"protocol" : "SerialCom", "port" : "/dev/ttyUSB0", "baudrate" : "B9600"
and
"protocol" : "TextSerialCom", "port" : "/dev/ttyUSB0", "baudrate" : "B9600" "termination" : "\r"
and neither work. (note that I had to temporarily add "\r" to the call to send(cmd+'\r') to make the SerialCom communication work). When using SerialCom configuration, the ::read function returns always 1 - it only reads one byte. When using TextSerialCom with the termination set to '\r', the issue is that the PS return a bunch of value xxxx\rOK\r so the OK\r part of the message is kept in the buffer until the subsequent read.
I have been looking quite some time into this, but it's not clear to me how to fix this. Any suggestions, @kkrizka?
Elisabetta