Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples make/compile fix #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MortenMiddelthon
Copy link

For raspberry pi library examples, added missing header file for sleep(), unistd.h.
Also changed pingpair_dyn.cpp to define variable "len" to 0 before trying to read from function. This would otherwise give me a compiler warning:

pingpair_dyn.cpp:172:42: warning: ‘len’ may be used uninitialized in this function [-Wmaybe-uninitialized]
radio.write( receive_payload, len );
^

@IANQIN99
Copy link

IANQIN99 commented Apr 6, 2019

change sleep() to delay(milliseconds)
change len to sizeof(receive_payload)
you should get the file compiles=d
had encountered the same issues also

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants