Created attachment 565 [details] code example in python I own a Voltcraft K204 temperature datalogger for k type thermocouples. https://sigrok.org/wiki/Voltcraft_K204 If i read temperatures via libsigrok e.g. via smuview (https://github.com/knarfS/smuview) i get nonsense values in negative temperatur range. I dont really understand C code, but the protokoll seems to be implemented in https://sigrok.org/gitweb/?p=libsigrok.git;a=blob;f=src/hardware/center-3xx/protocol.c I wrote a tiny python script to decode the positive temperatures (eg. T1) this way: if data(byte8) < 240: T1 = (data[byte8]*256 + data[byte9])*0.1 For negative temp values i have to do: if data(byte1) >= 240: T1 = ((data[byte8]-255)*256 + (data[byte9]-256))*0.1 It looks a bit weired, but i get right values over the whole temp range. Byte 4 to 7 contains some status Bits fpr channel 1-4. Byte 4, Bit 2 -> T1 "OL" Byte 4, Bit 1 -> T1 "normal Operation" and so on. I attached my python script. Maybe there is somebody who can fix decodeing negative temperatures in libsigrok.
Fixed in b8226ade4039c68d43b6d78ab3fecd4374a33fbd, thanks!