It sounds like your trying to convert a byte (8bit) value into a signed representation in a float variable.. if so a simple solution would be:
char a = 188;
float f = a;
if( f > 127 ) {
f -= 256;
}
It sounds like your trying to convert a byte (8bit) value into a signed representation in a float variable.. if so a simple solution would be:
char a = 188;
float f = a;
if( f > 127 ) {
f -= 256;
}