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

Update RF24Network_config.h #90

Merged
merged 1 commit into from
Apr 14, 2016
Merged

Update RF24Network_config.h #90

merged 1 commit into from
Apr 14, 2016

Conversation

aaddame
Copy link
Contributor

@aaddame aaddame commented Apr 13, 2016

Don't enable sleep on ESP8266

Don't enable sleep on ESP8266
@Avamander
Copy link
Member

What's the issue when you do enable sleep on ESP8266? I am not familiar with the device so sorry for asking.

@aaddame
Copy link
Contributor Author

aaddame commented Apr 14, 2016

Compilation error

"/home/aad/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/aad/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/tools/sdk/include" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DARDUINO=10608 -DARDUINO_ESP8266_ESP12 -DARDUINO_ARCH_ESP8266 -DESP8266 "-I/home/aad/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/cores/esp8266" "-I/home/aad/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/variants/nodemcu" "-I/home/aad/Arduino/libraries/RF24Mesh" "-I/home/aad/Arduino/libraries/RF24" "-I/home/aad/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/libraries/SPI" "-I/home/aad/Arduino/libraries/RF24Network" "-I/home/aad/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/libraries/ESP8266WiFi/src" "-I/home/aad/Arduino/libraries/ArduinoJson/src" "-I/home/aad/Arduino/libraries/PubSubClient/src" "-I/home/aad/.arduino15/packages/esp8266/hardware/esp8266/2.1.0/libraries/EEPROM" "/home/aad/Arduino/libraries/RF24Network/RF24Network.cpp" -o "/tmp/build207476dfaadc774b71f05f4d703ec648.tmp/libraries/RF24Network/RF24Network.cpp.o"
/home/aad/Arduino/libraries/RF24Network/RF24Network.cpp:30:24: fatal error: avr/sleep.h: No such file or directory
#include <avr/sleep.h>
^
compilation terminated.

@Avamander Avamander merged commit 6c78156 into nRF24:master Apr 14, 2016
@TMRh20
Copy link
Member

TMRh20 commented Apr 15, 2016

I think it might clean things up a bit to use #if defined (ARDUINO_ARCH_AVR) at https://github.com/TMRh20/RF24Network/blob/master/RF24Network.cpp#L1280 instead of the current defines

@aaddame
Copy link
Contributor Author

aaddame commented Apr 15, 2016

That doesn't solve the compilation error.
Defining ENABLE_SLEEP_MODE pulls in <avr/sleep.h> in RF24Network.cpp

#if defined (ENABLE_SLEEP_MODE) && !defined (RF24_LINUX) && !defined
(ARDUINO_X86)
#include <avr/sleep.h>
#include <avr/power.h>
volatile byte sleep_cycles_remaining;
volatile bool wasInterrupted;
#endif

This file cannot be found in the esp8266 include directories

2016-04-15 6:24 GMT+02:00 TMRh20 notifications@github.com:

I think it might clean things up a bit to use #if defined
(ARDUINO_ARCH_AVR) at
https://github.com/TMRh20/RF24Network/blob/master/RF24Network.cpp#L1280
instead of the current defines


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#90 (comment)

@TMRh20
Copy link
Member

TMRh20 commented Apr 15, 2016

Heh, thanks, I guess that line should be changed to #if defined (ENABLE_SLEEP_MODE) && defined (ARDUINO_ARCH_AVR) to match.

@aaddame
Copy link
Contributor Author

aaddame commented Apr 15, 2016

Yes, changing both defines does the job

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

Successfully merging this pull request may close these issues.

3 participants