Skip to content

Examples make/compile fix#5

Open
MortenMiddelthon wants to merge 2 commits intostanleyseow:masterfrom
MortenMiddelthon:examples_make_fix
Open

Examples make/compile fix#5
MortenMiddelthon wants to merge 2 commits intostanleyseow:masterfrom
MortenMiddelthon:examples_make_fix

Conversation

@MortenMiddelthon
Copy link
Copy Markdown

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
Copy Markdown

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