Hi
i'm doing this, using a modified version of the RF24Network lib by tmrh20:
...
// Read the beginning of the frame as the header
RF24NetworkHeader *header = (RF24NetworkHeader*)(&frame_buffer);
...
if ((header->type != 128 && header->type != 129 && header->type != 194 && header->type != 195))
when execution hits the if statement, the teensy crashes and resets. i've put serial outputs before and after the statements to verify the exact crash location.
This works well on arduino (i am in the process of porting a software from arduino mega to teensy).
is there anything obvious? strangely if the conditions do not apply, code execution continues and everything works. so only if header type does contain something different than 128, 129, 194 or 195, the teensy crashes.
any ideas? header.type is unsigned char but i also tried to declare it as uint8_t. didn't change anything.
thanks!
i'm doing this, using a modified version of the RF24Network lib by tmrh20:
...
// Read the beginning of the frame as the header
RF24NetworkHeader *header = (RF24NetworkHeader*)(&frame_buffer);
...
if ((header->type != 128 && header->type != 129 && header->type != 194 && header->type != 195))
when execution hits the if statement, the teensy crashes and resets. i've put serial outputs before and after the statements to verify the exact crash location.
This works well on arduino (i am in the process of porting a software from arduino mega to teensy).
is there anything obvious? strangely if the conditions do not apply, code execution continues and everything works. so only if header type does contain something different than 128, 129, 194 or 195, the teensy crashes.
any ideas? header.type is unsigned char but i also tried to declare it as uint8_t. didn't change anything.
thanks!