sizeof(eventCode)/sizeof(int) == 1;
So you can do like this:
tempHandle5.value.len = sizeof(eventCode); ----->Wrong
tempHandle5.value.len = sizeof(eventCode)/sizeof(int); ----->Right
void Send_Event_Code_To_Sensor(uint8_t eventCode)
By doing this I am still getting the same results a my original post. My thought is that the problem is either in the decoding of the value on my receiving side, or the fact that I'm trying to send a pointer?
Maybe you can send your project to me,let me check it.This should be a very simple question.
The issue seems to be with the line: tempHandle5.value.val = (uint8*)eventCode;
Change it to tempHandle5.value.val = (uint8*)&eventCode;
tempHandle5.value.val is of type (uint8 *), so it is necessary that you pass the address and not the value. By making the change that I mentioned, you will be passing the address rather than the value. This should do the trick!
Ah that's did it!!! Thank you very much for the help :)
Hey Helon, I really appreciate the help and sorry I can't send you the project. It's for a client and wrapped under a bunch of NDA and legal stuff so pretty sure I'd get in trouble :( . Anyways, adding the & in was the trick!