c++ - Qt: receive serial port data as unsigned char -



c++ - Qt: receive serial port data as unsigned char -

with main app i'm sending bytes , i'm sending them unsigned chars (0x80 , above). created 1 little supporting app receives these data, writes them terminal , sends them confirmation of successful transfer. code in back upwards app:

switch(c) // c beingness byte received qbytearray { case 0xff: cout << "header 1" << endl; break; case -1: cout << "0xff = 255 = -1" << endl; break; } //other case statements , default omitted

if send 0xff through serial port, "0xff = 255 = -1" on cout. understand number represented 1111 1111 (and in fact 255 equals -1 in case) post here on sof. how supposed receive code "header 1" on terminal?

c++ qt qtserialport

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -