pololu.github.com/wixel-sdk/radi … tml#l00098 tells me never to depend on radioComRxAvailable for a specific value greater than one.
I suppose the following code is using it correctly then?
alarm = 0;
while (1) {
if (alarm) { // ALARM STATE
if (radioComRxAvailable()) {
alarm=0;
}
} else {
if (radioComRxAvailable()) {
while (radioComRxAvailabe()) {
radioComRxReceiveByte();
count = 0;
}
} else {
count++;
}
if (count > 10000) {
alarm = 1;
}
}
}