hi
im using qbytearray to store hexadecimals and process it.
ba.resize(1);
ba[0] = 0x7e;
if(ba.at(0)==0x7e)
{
//write the data to serial port
}
QByteArray ba;
ba.resize(1);
ba[0] = 0x7e;
if(ba.at(0)==0x7e)
{
//write the data to serial port
}
To copy to clipboard, switch view to plain text mode
the above code works
my problem is if i use the hex value as 80 (ie greater t han integer 127)
im unable to process the condition like below
ba.resize(1);
ba[0] = 0x80;
if(ba.at(0)==0x80)
{
//write the data to serial port
}
QByteArray ba;
ba.resize(1);
ba[0] = 0x80;
if(ba.at(0)==0x80)
{
//write the data to serial port
}
To copy to clipboard, switch view to plain text mode
it does not work ,is there any settings?? to be done??
or it accepts from -127 to 127
can anyone help me???
thanks

Bookmarks