2s complement rssi
I was parsing the output of my access point in C++. The raw data coming from COM port is saved into a vector buffer, where one unit is defined as uint8_t. One of the bytes is RSSI and that is signed integer. So I did my usual stuff: int32_t rssi = static_cast<int32_t>(packet[3]);
oh yeah I should now have signed integer out of the byte. But turns out that it is not so, one should use additional intermediate casting: int32_t rssi = static_cast<int32_t>((int8_t)packet[3]); Sorry for the ugly old school c cast in the intermediate, I have no time and one more static_cast makes the code so ugly. So here it is, I have now the correct RSSI coming from the deep registers of MSP430 transceiver into my excel spreadsheet :)...














